0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Yolov7でた!〜2022夏〜高速・高精度物体検出

Last updated at Posted at 2022-07-10

より高速な物体検出モデルを使いたい!!

1427b9c1-5d23-4db2-bafe-45b2f0299c11.jpeg

かんたんに使える物体検出モデル、家電と同じで、どうせなら一番新しくていいやつを選びたいじゃないですか。

Yolov7〜高速物体検出シリーズの新しいバージョンでました、2022夏〜

Yolov5より120%高速とのこと。

【オリジナル・リポジトリより】

使い方

学習済みモデルによる推論

python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg

sourceには画像パス、もしくは画像フォルダ・パス、もしくは0(Webカメラ)を指定します。

ColabのGPUで0.057sで推論できました。

学習

python train.py --workers 8 --device 0 --batch-size 32 --data data/coco.yaml --img 640 640 --cfg cfg/training/yolov7.yaml --weights '' --name yolov7 --hyp data/hyp.scratch.p5.yaml

モバイル・デバイスでの使用

リポジトリには、TorchScript、ONNX、CoreMLへのエクスポート・スクリプトがあり、かんたんにモバイル形式に変換して、アプリで使えます。

python models/export.py --weight yolov7.pt

僕がCoreMLに変換したモデルはこちら(NMSつき)

オリジナル・データでトレーニングして、便利なアプリを作りましょう!

🐣


フリーランスエンジニアです。
お仕事のご相談こちらまで
rockyshikoku@gmail.com

Core MLやARKitを使ったアプリを作っています。
機械学習/AR関連の情報を発信しています。

Twitter
Medium
GitHub

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?