-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Some tricks to improve v5~(Including biFPN, ASFF, and all kinds of data augmentations~)Call for everyone~ #3993
Comments
🚀 Feature@glenn-jocher |
@SpongeBab BiFPN is used in EfficientDet models, the YOLOv5 heads are PANets. Adaptive average pooling is used in classification models to reduce the spatial dimensions down to 1. I use this in the YOLOv5 classifier branch for example in the Classify model (equivalent of Detect() module): Lines 378 to 388 in 8ee9fd1
|
@glenn-jocher oh,I missed that.Thank you! |
I would like to try to do this,if I get a big improvement,I will tell you. |
@SpongeBab yeah absolutely, if you see improvements please let us know! |
At first, I tired yolov5-four-FPN.
And I begin to retrain my custom dataset.
Modified:
Unfortunately, I only have a 2070, 8GB graphics card. My batch-size is both 2. |
Some results about four output v5-p5:
Original:
Unfortunately, the mAP is even lower. |
@SpongeBab the YOLOv5-P6 models use 4 outputs, you may want to start with them if you are interested in a 4 output model, i.e.: yolov5/models/hub/yolov5s6.yaml Lines 1 to 58 in 62409ee
|
Yeah,I am following the V5 method to modify the network. I'm conducting more experiments. |
Hiiii, have you tried to replace the nms with softer nms? |
@Cassieyy |
@SpongeBab good news 😃! Your original issue may now be fixed ✅ in PR #4195. This PR adds a new YOLOv5-BiFPN yaml to the models/hub directory. It turns out the current heads are very similar to BiFPN and the only remaining difference was to add a shortcut to the backbone layers on the intermediate outputs (P4 only for P5 models, or P4 and P5 for P6 models). One key differnece is I think EfficientDet weighted-sums their shortcuts whereas we concatenate our shortcuts togethor, so some study needs to be done on the effects there. To receive this update:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
@glenn-jocher Oh! Great! I am also working on this, but it is not finished. Ah, I don't need to do it.:) |
I have done this: common.py:
yolo.py:
I used yolov5x.yaml:
Although the code is ok, but I think it is incomplete.There is no complete implementation of bi-FPN. |
@SpongeBab the new yolov5-bifpn.yaml file implements a BiFPN head: |
@glenn-jocher yeah, I saw it. Have you trained it? |
@SpongeBab yes, it performs similarly to the baseline model. |
@glenn-jocher And I think it’s yolov5l-bifpn, more correctly.Can I try v5s, m, x-bifpn? |
@SpongeBab sure, it's easy to apply to any size. Just compare yolov5l.yaml with yolov5-bifpn.yaml, and apply the same change to the other sizes. |
when I use 0 -1 1 7040 models.common.Focus [3, 64, 3] I don't know how to handle it. |
@SpongeBab good news 😃! Your original issue may now be fixed ✅ in PR #4208. To receive this update:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
👋 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! I'm reviewing on BiFPN implementations for a personal project and just stumbled upon this discussion. Were you able to eventually finish this imlementation of yours? |
Hi! It seems like you're making great progress. If you haven't already, you might want to check the latest updates in the YOLOv5 repository for any new implementations or improvements related to BiFPN. If you have specific questions or need further assistance, feel free to ask! |
Hi! Yup I have been looking around forums and playing around with the code. I was just wondering if the bifpn yaml architecture reflects the "repeated blocks" nature from its source in the EfficientDet model. Here^ In the yolov5-bifpn.yaml, only one line of code was added to simulate this model, and I am struggling to understand how that was already suffiicient. Also, I was also wondering if this was able to incorporate the learnable weights implemented in the original EfficientDet architecture. Thanks! |
The YOLOv5 BiFPN implementation simplifies the architecture by using concatenation instead of weighted sums, which might not fully replicate the repeated block nature of EfficientDet. For learnable weights, you may need to modify the architecture further to align with EfficientDet's approach. |
I see! When you say to modify the architecture further, would this entail only playing around with yaml file or tinkering with common/yolo.py? Also where in the repository can I find where the weights are concatenated? Thank you for your time! ^-^ |
To modify the architecture for learnable weights, you'll likely need to adjust both the YAML file and the model's code in |
🚀 Feature
@glenn-jocher
Hi, Do you have a plan to implement the yolov5 with biFPN?
Motivation
We can see the advance of biFPN in this paper: https://arxiv.org/pdf/1911.09070.pdf. It is better than PANet.
Additional context
I think it can improves the mAP a lot.
Edit:A list of tricks( TBC ): What I want to do.
modified yolov5-p5 to Four Head prediction.
The text was updated successfully, but these errors were encountered: