Closed jaskiratsingh2000 closed 3 years ago
@jaskiratsingh2000 for new modules you may need to add them to the L248 module list, and optionally provide custom code to deal with them in the yolo.py parse_model() function: https://github.com/ultralytics/yolov5/blob/90b7895d652c3bd3d361b2d6e9aee900fd67f5f7/models/yolo.py#L232-L283
@glenn-jocher I made changes but by adding the names of the modules in that specific line but it is till showing me the same error:
Traceback (most recent call last):
File "models/yolo.py", line 294, in <module>
model = Model(opt.cfg).to(device)
File "models/yolo.py", line 93, in __init__
self.model, self.save = parse_model(deepcopy(self.yaml), ch=[ch]) # model, savelist
File "models/yolo.py", line 238, in parse_model
m = eval(m) if isinstance(m, str) else m # eval strings
File "<string>", line 1, in <module>
NameError: name 'conv3x3' is not defined
@glenn-jocher consider helping me out with the specific things if possible since I am new to it.
@jaskiratsingh2000 python requires imports to function correctly.
@glenn-jocher I already did that but still, the error is the same You can check here:
and this one adding the modules.
@glenn-jocher Please let me know what do you think and how we can rectify that.
@jaskiratsingh2000 custom code is up to you my friend, we only assist with bugs or features we'd like to see integrated.
Okay! so I would really like to request if ultralytics can also have the tiniest version of yolo that is yolo-nano with the YAML file. Is that possible? @glenn-jocher
@jaskiratsingh2000 the smallest current version is YOLOv5s. Accuracy for smaller versions is not suitable for production use-cases, so we've not reduced size any smaller. https://github.com/ultralytics/yolov5/blob/develop/models/yolov5s.yaml
For a smaller-sized model with minimal accuracy losses you should probably simply use YOLOv5s-ghost in https://github.com/ultralytics/yolov5/issues/3234
Model | size (pixels) |
mAPval 0.5:0.95 |
mAPtest 0.5:0.95 |
mAPval 0.5 |
Speed T4 (ms) |
params (M) |
FLOPS 640 (B) |
|
---|---|---|---|---|---|---|---|---|
YOLOv5s | 640 | 37.0 | - | 56.4 | 4.7 | 7.3 | 17.0 | |
YOLOv5s-ghost1 | 640 | 35.2 | - | 54.0 | 4.8 | 5.1 | 11.2 | |
YOLOv5s-ghost2 | 640 | 35.6 | - | 54.1 | 4.9 | 3.9 | 8.8 |
@glenn-jocher How can I access the YAML file for the YOLOv5s-ghost? I was not able to find that on this repo. Please let me know Thanks!
@jaskiratsingh2000 follow https://github.com/ultralytics/yolov5/issues/3234, and also see branch ghost
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!
Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐!
Hi @glenn-jocher I created this yaml file:
So when I am trying to run this with
python3 model/yolo.py
it is giving me the following errors:Even I have tried importing the module that contains these layers class. You can check within the forked version here - https://github.com/jaskiratsingh2000/yolov5/tree/master/models with the name
yolo_layers_network.py
andbasic_layers.py
@glenn-jocher Can you please help me simplify the things because I really want to check the profiling of the yolo-nano