Running on yolov4 wrapper gives error #658
-
Hello - I am getting error when trying to run with my custom yolov4 model I am running with code from this discussion: https://github.com/obss/sahi/issues/139 I am running this part in my Colab
Here is the error:
Here is my model.py updated with YoloV4 wrapper
If someone could help figure this out, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
this is clear. let this function return a list. 593 def category_names(self):
--> 594 return list(self.model.config.names.values()) you can change this function @property
def category_names(self):
if type(self.model.CLASSES) == str:
# https://github.com/open-mmlab/mmdetection/pull/4973
return (self.model.CLASSES,)
else:
return self.model.CLASSES |
Beta Was this translation helpful? Give feedback.
-
changing the function to that still gives me this error
I try changing code but still cannot get to work it seems all ok |
Beta Was this translation helpful? Give feedback.
-
AttributeError: 'NoneType' object has no attribute 'CLASSES' !!!!! be careful |
Beta Was this translation helpful? Give feedback.
-
@asluborski98 this error means you are not able to initialize the model. You have to be sure you are properly loading the weights from the given path. |
Beta Was this translation helpful? Give feedback.
-
Must have been something wrong with my colab path as I got it working locally. |
Beta Was this translation helpful? Give feedback.
@asluborski98 this error means you are not able to initialize the model. You have to be sure you are properly loading the weights from the given path.