https://github.com/kazuhito00/d-fine-onnx-sample
D-FINEのPythonでのONNX推論サンプル
https://github.com/kazuhito00/d-fine-onnx-sample
colaboratory d-fine object-detection objectdetection onnx python pytorch rt-detr
Last synced: 3 months ago
JSON representation
D-FINEのPythonでのONNX推論サンプル
- Host: GitHub
- URL: https://github.com/kazuhito00/d-fine-onnx-sample
- Owner: Kazuhito00
- License: apache-2.0
- Created: 2024-10-27T06:07:51.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T23:43:02.000Z (11 months ago)
- Last Synced: 2024-11-07T00:45:20.531Z (11 months ago)
- Topics: colaboratory, d-fine, object-detection, objectdetection, onnx, python, pytorch, rt-detr
- Language: Jupyter Notebook
- Homepage:
- Size: 71.8 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# D-FINE-ONNX-Sample
[Peterande/D-FINE](https://github.com/Peterande/D-FINE)のPythonでのONNX推論サンプルです。
変換自体を試したい方は、Google Colaboratory上で[Convert2ONNX.ipynb](Convert2ONNX.ipynb)を使用ください。
# Requirement
* OpenCV 4.5.3.56 or later
* onnxruntime 1.11.0 or later# Convert
[](https://colab.research.google.com/github/Kazuhito00/D-FINE-ONNX-Sample/blob/main/Convert2ONNX.ipynb)
Colaboratoryでノートブックを開き、上から順に実行してください。# Demo
デモの実行方法は以下です。
```bash
python sample_onnx.py
```
* --device
カメラデバイス番号の指定
デフォルト:0
* --movie
動画ファイルの指定 ※指定時はカメラデバイスより優先
デフォルト:指定なし
* --image
画像ファイルの指定 ※指定時はカメラデバイスより優先
デフォルト:指定なし
* --model
ロードするモデルの格納パス
デフォルト:model/dfine_s_obj2coco.onnx
* --score_th
検出閾値
デフォルト:0.6
* --unuse_gpu
GPU推論なし(CPU推論)
デフォルト:指定なし# Reference
* [Peterande/D-FINE](https://github.com/Peterande/D-FINE)# Author
高橋かずひと(https://twitter.com/KzhtTkhs)
# License
D-FINE-ONNX-Sample is under [Apache 2.0 License](LICENSE).# Note
サンプルの画像は[ぱくたそ](https://www.pakutaso.com/)様の「[ものすごい数のバイクの列(ベトナムホーチミン)](https://www.pakutaso.com/20170628178post-12228.html)」を使用しています。