ultralytics / yolov5

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

More intuitive model construct way and pruning #88

Closed lucasjinreal closed 4 years ago

lucasjinreal commented 4 years ago

What's the quickest way to change the backbones in this repo and applying some Attention machanisim ?

How to make it more easier to do pruning in this repo?

glenn-jocher commented 4 years ago

@jinfagang these are great points!

Attention and backbone swapping are great things we might be able to add in the future, and pruning as well.

For the present we are focused on much more simple stuff, mainly increasing the maturity level of the basic operations in the repo, which means that we want training, testing and inference to operate as error free and smoothly as possible, and to work as well as possible 'out of the box' for custom datasets.

On the architecture side are also experimenting with some simple architecture modifications, including trying different FPN, PANet and BiFPN heads. Modifying the architecture is easy to do by simply updating the model yaml file. To replace a backbone for example you would modify this section of a model: https://github.com/ultralytics/yolov5/blob/5a50491fa12a515f829407b2cfc4ec0acb05311d/models/yolov5s.yaml#L12-L26

seekFire commented 4 years ago

@glenn-jocher Hello! If I use BiFPN as neck, should I choose original BiFPN that comes from EfficientDet, which has 5 inputs, or rectified version which has 3 inputs as follows: yolov3_bifpn

glenn-jocher commented 4 years ago

BiFPN head should be readable with any number of output layers. The current head outputs P3-5, just like your diagram shows.

seekFire commented 4 years ago

@glenn-jocher OK! Thank you very much!

glenn-jocher commented 4 years ago

Just tried pruning now and ran into errors. Seems like the pytorch pruning code may have a bug: https://github.com/pytorch/tutorials/issues/1054

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.