YOLOv5 🚀 is a family of object detection architectures and models pretrained on the COCO dataset.
This repo shows how to accelerate YOLOv5 model by pruning and quantization.
See the YOLOv5 Docs for full documentation on training, testing and deployment.
See the ENOT Docs for documentation on pruning and quantization.
Clone repo and install requirements.txt in a Python>=3.8.0 environment, including PyTorch==1.13.1.
git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install
Note: We recommend to install enot-autodl==3.4.6 and enot-lite==0.8.1 following these instructions:
enot-autodl installation instruction
enot-lite installation instruction
mkdir -p $HOME/.hasplm
echo -e 'broadcastsearch = 0\nserveraddr = 65.109.162.71\ndisable_IPv6 = 0' > $HOME/.hasplm/hasp_26970.ini
pip install enot-autodl==3.4.6
wget -O - https://raw.githubusercontent.com/ENOT-AutoDL/ONNX-Runtime-with-TensorRT-and-OpenVINO/master/install.sh | bash
pip install enot-lite==0.8.1
There is demo notebook which shows how to prune and quantize YOLOv5 model.