ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.49k stars 16.29k forks source link

Question on whether these features are implemented in YOLOV5 #370

Closed linzzzzzz closed 4 years ago

linzzzzzz commented 4 years ago

Thanks for the great work.

In the YOLOv4 paper (https://arxiv.org/pdf/2004.10934.pdf) they claim to use numbers of features named under Bag of Freebies and Bag of Specials. image

I know that Mosaic augmentation and SPP-block are used in this YoloV5 implementation. Can I ask if any other trick of BoF and BoS claimed in the paper is also included in YOLOv5 as of right now? The several ones I'm particularly interested are: self-adversarial training, SAM-block and Mish activation.

Thank you!

github-actions[bot] commented 4 years ago

Hello @linzzzzzz, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note that Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

For more information please visit https://www.ultralytics.com.

glenn-jocher commented 4 years ago

@linzzzzzz I used almost none of these in YOLOv5. I like to keep it simple.

The major items we use, Mosaic dataloading and hyperparameter evolution we developed ourselves first for ultralytics/yolov3 and then contributed to yolov4. We've also adopted CSP bottlenecks from CSPnet like yolov4.

glenn-jocher commented 4 years ago

@linzzzzzz you might want to see https://github.com/ultralytics/yolov5/issues/357 for an interesting Mixed Mosaic idea.

Mish helps mAP in the same way as Swish, smooth gradients are always better than discontinuities, but It can never be an in-place activation like ReLU, and above and beyond that it has severe memory requirements during training (and a lack of export support) that render it highly undesirable when considered for adoption here.

linzzzzzz commented 4 years ago

@glenn-jocher

Thanks for your quick response! I agree that keeping things simple is a good strategy.

The authors of YOLOv4 paper seem to have tried Mix up training(without Mosaic though) and it seems to give some negative results (as shown in Table 2 of the paper). However, I feel it would still be interesting to try given its simplicity and see if it combines well with Mosaic augmentation.

glenn-jocher commented 4 years ago

One way to think about it is that as the beta distribution parameters drop to zero, the mixup ratio will trend towards either 0 or 1, at which point the mixup implementation is identical to the current one (no mixup). So it might be interesting to implement mixup, start from small parameters, verify similar performance as baseline, and then slowly increase and observe the effect.

I'd be surprised if it didn't help a bit, but this is something that intuition really fails us in, the only way to know is to try.