mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-22 13:47:29 +02:00
Fix yolov9 export script (#17744)
* Fix yolov9 export script * Fix typo * Update object_detectors.md
This commit is contained in:
parent
6a487a5dc7
commit
8744da3bf8
@ -980,6 +980,16 @@ YOLOv9 models can be exported using the below code or they [can be downloaded fr
|
|||||||
```sh
|
```sh
|
||||||
git clone https://github.com/WongKinYiu/yolov9
|
git clone https://github.com/WongKinYiu/yolov9
|
||||||
cd yolov9
|
cd yolov9
|
||||||
wget -O yolov9-t.pt "https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-t-converted.pt"
|
|
||||||
python3 export.py --weights ./yolov9-t-converted.pt --imgsz 320 --simplify
|
# setup the virtual environment so installation doesn't affect main system
|
||||||
|
python3 -m venv ./
|
||||||
|
bin/pip install -r requirements.txt
|
||||||
|
bin/pip install onnx onnxruntime onnx-simplifier>=0.4.1
|
||||||
|
|
||||||
|
# download the weights
|
||||||
|
wget -O yolov9-t.pt "https://github.com/WongKinYiu/yolov9/releases/download/v0.1/yolov9-t-converted.pt" # download the weights
|
||||||
|
|
||||||
|
# prepare and run export script
|
||||||
|
sed -i "s/ckpt = torch.load(attempt_download(w), map_location='cpu')/ckpt = torch.load(attempt_download(w), map_location='cpu', weights_only=False)/g" ./models/experimental.py
|
||||||
|
python3 export.py --weights ./yolov9-t.pt --imgsz 320 --simplify --include onnx
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user