Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yolov5m architecture #6094

Closed
1 task done
karl-gardner opened this issue Dec 24, 2021 · 8 comments
Closed
1 task done

Yolov5m architecture #6094

karl-gardner opened this issue Dec 24, 2021 · 8 comments
Labels
question Further information is requested

Comments

@karl-gardner
Copy link

Search before asking

Question

Hello Glenn,

I see that you have said that the architecture is correct for this architecture:

image

from the following issue:

#280

Is this correct for all the different types of yolov5 models: yolov5n, yolov5s, yolov5m, yolov5l ? I used the yolov5m and am wondering if I can use the previous image to report the architecture of the yolov5m model?

Thanks,

Karl Gardner

Additional

No response

@karl-gardner karl-gardner added the question Further information is requested label Dec 24, 2021
@glenn-jocher
Copy link
Member

glenn-jocher commented Dec 27, 2021

@karl-gardner yes all YOLOv5 modes use the same architecture, simply the compound scaling constants very:

depth_multiple: 0.33 # model depth multiple
width_multiple: 0.50 # layer channel multiple

Also note that the above diagram is for a P5 model, i.e. YOLOv5s. P6 variants, i.e. YOLOv5s6 have 4 output layers for improved large object detection. The P5/P6 differences are explained in the v5.0 release notes:
https://github.com/ultralytics/yolov5/releases/tag/v5.0

@karl-gardner
Copy link
Author

@glenn-jocher Thanks for the heads up. So the P6 variants are used for higher resolution images. Does this mean that the code automatically will use the P6 when images with higher resolution is used? Since I trained all my models with a resolution of 544 x 544 then I just used the P5 with only 3 output layers right?

Karl Gardner

@glenn-jocher
Copy link
Member

@karl-gardner if your images contains large objects then P6 will perform better. COCO is an example where P6 models outperform P5 models.

@karl-gardner
Copy link
Author

karl-gardner commented Dec 28, 2021

@glenn-jocher ok thanks. I'm actually confused about something else now, should I start a different issue? It seems like you can run both the yolov5-P5 and yolov5-P6 models with the detect.py:

image

but can you only train with just one of the models as the P6 model? I only see configuration files for the n/s/m/l/x models and not for both P5 and P6.

Karl Gardner

@glenn-jocher
Copy link
Member

@karl-gardner see models/hub for all additional model yamls:
https://github.com/ultralytics/yolov5/tree/master/models/hub

@karl-gardner
Copy link
Author

@glenn-jocher so the standard models in the yolov5/models directory:

image

This is the P5 model with only 3 output layers? The ones for larger objects (P6 with 4 output layers) are in the models/hub right?

Thanks,

Karl Gardner

@glenn-jocher
Copy link
Member

@karl-gardner yes that's right!

@karl-gardner
Copy link
Author

Great, I will close this issue and cite it when I am reporting the architecture.

Karl Gardner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants