MCPcopy Index your code
hub / github.com/Kazuhito00/sahi-yolox-onnx-sample

github.com/Kazuhito00/sahi-yolox-onnx-sample @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
434 symbols 1,312 edges 46 files 240 documented · 55%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

sahi-yolox-onnx-sample

SAHI(Slicing Aided Hyper Inference)YOLOX(ONNX)で動かしたサンプルです。

https://user-images.githubusercontent.com/37477845/154991823-f1b6297f-fd00-48f9-a59f-604e2c7a526a.mp4

左図:通常推論(sample_prediction.py) 右図:SAHI(sample_sliced_prediction.py)

Requirement

  • onnxruntime 1.10.0 or later
  • Shapely 1.8.1 or later

Demo

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

python sample_sliced_prediction.py
  • --device

カメラデバイス番号の指定

デフォルト:0 * --movie

動画ファイルの指定 ※指定時はカメラデバイスより優先

デフォルト:指定なし * --width

カメラキャプチャ時の横幅

デフォルト:960 * --height

カメラキャプチャ時の縦幅

デフォルト:540 * --model

ロードするYOLOXモデルの格納パス

デフォルト:yolox/model/yolox_nano.onnx * --config

YOLOXのコンフィグファイル格納パス

デフォルト:yolox/config.json * --slice_height

SAHIの画像スライス高さ

デフォルト:512 * --slice_width

SAHIの画像スライス幅

デフォルト:512 * --overlap_height_ratio

SAHIの画像スライス時の高さ方向のオーバーラップ率

デフォルト:0.2 * --overlap_width_ratio

SAHIの画像スライス時の幅方向のオーバーラップ率

デフォルト:0.2 * --draw_score_th

描画時のスコア閾値

デフォルト:0.3

Reference

Author

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

License

sahi-yolox-onnx-sample is under MIT License.

License(Movie)

サンプル動画はNHKクリエイティブ・ライブラリーカモメのハンティングを使用しています。

Core symbols most depended-on inside this repo

tolist
called by 43
sahi/postprocess/utils.py
deepcopy
called by 42
sahi/annotation.py
_cocoeval_summarize
called by 20
sahi/scripts/coco_evaluation.py
to_xyxy
called by 19
sahi/utils/shapely.py
get_package_info
called by 14
sahi/utils/import_utils.py
load_json
called by 10
sahi/utils/file.py
check_requirements
called by 9
sahi/utils/import_utils.py
to_xyxy
called by 8
sahi/annotation.py

Shape

Method 255
Function 133
Class 46

Languages

Python100%

Modules by API surface

sahi/utils/coco.py99 symbols
sahi/annotation.py42 symbols
sahi/slicing.py27 symbols
sahi/postprocess/utils.py23 symbols
sahi/utils/cv.py21 symbols
sahi/utils/shapely.py20 symbols
sahi/prediction.py17 symbols
sahi/postprocess/legacy/combine.py17 symbols
sahi/postprocess/combine.py17 symbols
sahi/utils/file.py14 symbols
sahi/models/base.py14 symbols
sahi/models/huggingface.py11 symbols

For agents

$ claude mcp add sahi-yolox-onnx-sample \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page