1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

学習済みのYoloをcoreML変換すると推定がうまく機能しなくなる場合の対処法

Posted at

発生している問題

公式のYOLO(person,laptopとかを認識できるやつ)を変換すると正しく物体を検知できるが、学習させると検知した物体の座標等が正しく機能しない

上記の問題が発生する条件について

実機のiosのバージョンが17以降であり、pythonコードにてptファイルを指定してcoreMLに変換している場合

修正方法

ターミナルにて以下のコードを実行してくだい
※pythonにて import yoloやultralytics が使えるなら実行できると思います

yolo export model=best.pt format=mlmodel nms=True

pythonでのcoreML変換と上記のコードによるyoloの微妙な違い

・変換後には、mlpackageではなくmlmodelとして変換される
(xcode上では微妙に違うがどちらもcoreMLの一種だと認識されているっぽい)

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?