![見出し画像](https://assets.st-note.com/production/uploads/images/129054544/rectangle_large_type_2_42d5ec6622421ef2dd1dead7b57e01b1.jpeg?width=1200)
yolov8でとroboflowでアニメキャラの顔を見分ける(後編)
\Programs\Python\Python310\Lib\site-packages\ultralytics\cfg\datasets 環境により場所は違うかも。にできている、coco.yaml(ココヤムルと読むらしい)をコピーして、mycoco.yamlを作る。
![](https://assets.st-note.com/img/1706950027602-YyWbVowbMd.png?width=1200)
賢い人コメントをつけてほしい
\Python\Python310\Lib\site-packages\ultralytics\cfgの中に
![](https://assets.st-note.com/img/1706948371529-OwUVNAVhlW.png?width=1200)
![](https://assets.st-note.com/img/1706948506685-wyM2pjtXd3.png?width=1200)
![](https://assets.st-note.com/img/1706949050060-mEoiy5xiWm.png)
yolov8.yaml クラスの修正 お手本はこれだが
# Parameters #nc : 80 # number of classes
nc: 4 # number of classes
おれのはこう・・ncのあとの数字をmycoco.yamlのnamesの数に変更。0も入れる事に注意!
![](https://assets.st-note.com/img/1706950377857-Xw1ecpeCjv.png?width=1200)
学習・・・させる。適当な場所にyolo8train.pyを作ります。
![](https://assets.st-note.com/img/1706967877583-NKIbjbL1vH.png?width=1200)
myyalov8.ptはどこで出てきたんだ.…筆者にも分からぬ。最初yolo8ダウンロードしたときじゃね?検索して出てこなかったらgithubで探して。
![](https://assets.st-note.com/img/1707009247490-uv51BnSM1F.png?width=1200)
yolo8train.pyと同じ階層にrunsというファイルが出来て、結果がホカホカとできております。
![](https://assets.st-note.com/img/1707009652985-e88fBj6eYN.png)
![](https://assets.st-note.com/img/1707009286390-KviLokOIy7.png?width=1200)
![](https://assets.st-note.com/img/1707009712691-SA8ysCaHKe.jpg?width=1200)
この記事が気に入ったらサポートをしてみませんか?