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

Yolov5 last version - architecture explanation #5541

Closed
1 task done
Guemann-ui opened this issue Nov 6, 2021 · 9 comments
Closed
1 task done

Yolov5 last version - architecture explanation #5541

Guemann-ui opened this issue Nov 6, 2021 · 9 comments
Labels
question Further information is requested Stale

Comments

@Guemann-ui
Copy link

Search before asking

Question

Hi! I'm trying to understand how the last Yolo version works layer by layer from backbone to detect, currently, I'm using Yolov5n as my model, unfortunately, until now I didn't find any paper to help me to understand more the architecture, all the guides talked only about the function of each part but they didn't explain how the architecture work layer by layer and the function of each layer! Does any help please to understand all the architectural details?
Thanks.

Additional

No response

@Guemann-ui Guemann-ui added the question Further information is requested label Nov 6, 2021
@glenn-jocher
Copy link
Member

@besmaGuesmi yes I'm sorry we don't have a publication out yet, but the best place to start learning is to read the first 3 YOLO papers for v1-v3 by Redmon here:
https://pjreddie.com/publications/

@Guemann-ui
Copy link
Author

Hi @glenn-jocher thank you for your reply! where can I find the internal architecture of C3/SPPF of Yolov5n? I really need to understand it! Thanks

@glenn-jocher
Copy link
Member

@besmaGuesmi SPPF was introduced in v6.0 and is simply a faster (i.e. better implemented, eliminates redundant ops) version of SPP, the outputs are mathematically identical. See PR #4420

C3 was introduced in v4.0, it is an CSPBottleneck() layer with one of the 4 main convolutions removed, i.e. hence the name '3', bringing additional architecture simplification. See https://github.com/ultralytics/yolov5/tree/v4.0

@Guemann-ui
Copy link
Author

Thank you!

@Guemann-ui
Copy link
Author

Hi, @glenn-jocher I designed this architecture as SPPF according to the link that you sent me, I would check with you if there are any missing details. Thanks
SSPF architecture

@glenn-jocher
Copy link
Member

@besmaGuesmi yes that seems correct. You can also visualize individual modules with TensorBoard once you start training. This is SPPF:

Screenshot 2021-11-07 at 00 09 23

@glenn-jocher
Copy link
Member

@besmaGuesmi a second option for module visualization is ONNX. You can export a module and visualize it with Netron:

import torch
from models.common import SPPF

torch.onnx.export(model=SPPF(128,128,5), args=torch.zeros(1,128,80,80), f='SPPF.onnx')

Screenshot 2021-11-07 at 00 15 48

@Guemann-ui
Copy link
Author

Great! Thank you @glenn-jocher

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2021

👋 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 ⭐!

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

No branches or pull requests

2 participants