Skip to content

Implementation of Yolo using Facebook's Detectron2 (https://github.com/facebookresearch/detectron2) Framework with Quantization support based on AQD: Towards Accurate Quantized Object Detection (https://github.com/aim-uofa/model-quantization)

License

Notifications You must be signed in to change notification settings

ShechemKS/Yolo_Detectron2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yolo for Detectron2

Implementation of Yolo using Facebook's Detectron2 Framework.

With added quantization support following the work in

Chen, Peng, et al. "Aqd: Towards accurate quantized object detection." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021.

Description

This repo implements YoloV5 within Facebook's Detectron2 framework. Currently, only YoloV5m has been fully tested. Support is included for YoloV4-tiny. Support will be extended for other Yolo versions.

This repo also enables quantization and quantization-aware-training using the framework provided in

Chen, Peng, et al. "Aqd: Towards accurate quantized object detection." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021.

The quantization framework is implemented in QTool: A low-bit quantization toolbox for deep neural networks in computer vision. Use the quantization branch to train and test quantized models.

Setup

  • This repo requires installation of the Detectron2 framework.
  • Installation instructions can be found on their own GitHub page.
  • However, if you intend on using the quantization modules, follow the instructions given in QTool - Detection to install the quantization fork of the detectron framework. Currently, Yolo has only been tested within this framework.
  • Once Detectron2 has been installed, clone this repo. You can clone it anywhere you like, but it is convenient to clone it to the detectron2/projects directory for consistency.
git clone https://github.com/ShechemKS/Yolo_Detectron2.git

That's it! It will just work.

Training and Inference

To train the model run

python train_net.py --config-file configs/yolov5-Full.yaml

You may include any of the usual Detectron2 config options.

To use the model for inference, run

python inference_net.py --config-file configs/yolov5-Full.yaml --inputs path/to/image-dir/ --output path/to/save-dir/

TODO

  • Create a non-quantization branch for compatibility with the main detectron framework
  • Add support for other Yolo versions

References

About

Implementation of Yolo using Facebook's Detectron2 (https://github.com/facebookresearch/detectron2) Framework with Quantization support based on AQD: Towards Accurate Quantized Object Detection (https://github.com/aim-uofa/model-quantization)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages