Skip to content

Kazuhito00/YuNet-ONNX-TFLite-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YuNet-ONNX-TFLite-Sample

YuNetのPythonでのONNX、TensorFlow-Lite推論サンプルです。
TensorFlow-LiteモデルはPINTO0309/PINTO_model_zoo/144_YuNetのものを使用しています。

Requirement

  • OpenCV 3.4.2 or later
  • onnxruntime 1.5.2 or later
  • tensorflow 2.6.0 or later

Demo

デモの実行方法は以下です。

python sample_onnx.py
  • --device
    カメラデバイス番号の指定
    デフォルト:0
  • --movie
    動画ファイルの指定 ※指定時はカメラデバイスより優先
    デフォルト:指定なし
  • --image
    画像ファイルの指定 ※指定時はカメラデバイスや動画より優先
    デフォルト:指定なし
  • --width
    カメラキャプチャ時の横幅
    デフォルト:960
  • --height
    カメラキャプチャ時の縦幅
    デフォルト:540
  • --model
    ロードするモデルの格納パス
    デフォルト:model/face_detection_yunet_120x160.onnx
  • --input_shape
    モデルの入力サイズ
    デフォルト:160,120
  • --score_th
    クラス判別の閾値
    デフォルト:0.6
  • --nms_th
    NMSの閾値
    デフォルト:0.3
  • --topk
    topk指定値
    デフォルト:5000
  • --keep_topk
    keep_topk指定値
    デフォルト:750
python sample_tlite.py
  • --device
    カメラデバイス番号の指定
    デフォルト:0
  • --movie
    動画ファイルの指定 ※指定時はカメラデバイスより優先
    デフォルト:指定なし
  • --image
    画像ファイルの指定 ※指定時はカメラデバイスや動画より優先
    デフォルト:指定なし
  • --width
    カメラキャプチャ時の横幅
    デフォルト:960
  • --height
    カメラキャプチャ時の縦幅
    デフォルト:540
  • --model
    ロードするモデルの格納パス
    デフォルト:model/model_float16_quant.tflite
  • --input_shape
    モデルの入力サイズ
    デフォルト:160,120
  • --score_th
    クラス判別の閾値
    デフォルト:0.6
  • --nms_th
    NMSの閾値
    デフォルト:0.3
  • --topk
    topk指定値
    デフォルト:5000
  • --keep_topk
    keep_topk指定値
    デフォルト:750

Reference

Author

高橋かずひと(https://twitter.com/KzhtTkhs)

License

YuNet-ONNX-TFLite-Sample is under Apache-2.0 License.

About

YuNetのPythonでのONNX、TensorFlow-Lite推論サンプル

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages