YOLOv9 Tutorial: Train Model on Custom Dataset | How to Deploy YOLOv9

Roboflow
4 Mar 202420:33

Summary

TLDRYOLO v9の紹介と実践的な使用方法を解説したビデオスクリプトです。最新のリアルタイムオブジェクト検出モデルであるYOLO v9は、速度と精度の両面で競合を凌駕していると報告されています。ビデオでは、事前トレーニングされたモデルを使用した推論の実行方法、カスタムデータセットでのモデルのトレーニングと評価、そして推論パッケージを使用したYOLO v9モデルの展開方法を紹介します。また、Roboflowを使用したデータセットのダウンロード、モデルの微調整、評価、および展開のプロセスも解説しています。

Takeaways

  • 😀 YOLO v9は速さと精度の両面で競合を凌駕していると発表されています。
  • 🎯 YOLO v9はリアルタイムオブジェクト検出の新しいスタンダードを設けているとされています。
  • 📚 このビデオでは、事前トレーニングされたモデルを使用して推論を実行し、カスタムデータセットでモデルをトレーニング、評価し、推論パッケージを使用してYOLO v9モデルを展開する方法が紹介されています。
  • 🔗 ビデオで使用されるノートブックへのリンクは説明欄にあり、roofflow notebooksリポジトリからもアクセス可能です。
  • 💻 Google Colabで作業を進める際、GPUへのアクセス権を確認することが推奨されています。
  • 📥 YOLO v9はpipパッケージとして配布されておらず、リポジトリをクローンしてすべての必要なライブラリを手動でインストールする必要があります。
  • 🐶 モデルの推論テストには、ビデオ作成者の犬の画像が使用されていますが、ユーザーは自分のデータを使用してテストすることもできます。
  • 🔧 YOLO v9は専用のCLIやSDKを持っていないため、detect.pyスクリプトを使用して推論を実行します。
  • 🏆 YOLO v9eは同じパラメーターでより多くのオブジェクトを検出でき、YOLO v9ペーパーで報告された性能と一致しています。
  • 🤖 モデルのファインチューニングには、roofflowパッケージを使用してデータセットをダウンロードし、YOLO v9のフォーマットに適合させる必要があります。
  • 📈 トレーニング後、モデルの評価は必須であり、新しい画像とビデオでのオブジェクト検出のパフォーマンスを確認するのに役立ちます。
  • 🛠️ YOLO v9はSDKがなく、モデルを展開するより堅牢なソリューションとしてroofflowを使用することが提案されています。
  • 📊 YOLO v9は新しいプロジェクトですが、スピードと精度で競争を抜きにしていますが、まだドキュメント化が不十分です。
  • 🏆 YOLO v9はサッカー場の選手検出に適していますが、他にも多くのシナリオで適用可能です。

Q & A

  • YOLO v9はどのような特徴を持っていますか?

    -YOLO v9は速さと精度の両面で競合を凌駕する新しいモデルで、リアルタイムオブジェクト検出における最新の技術を誇っています。

  • YOLO v9を実行するにはどのような環境が必要ですか?

    -YOLO v9を実行するにはGPU環境が必要です。特に、モデルのファインチューニングを行う場合はCPUでは遅くなりがちです。

  • YOLO v9のリポジトリをクローンするにはどうすればよいですか?

    -YOLO v9はPeepパッケージでは配布されておらず、リポジトリを手動でクローンしてすべての依存関係をインストールする必要があります。

  • YOLO v9のファインチューニングに必要なデータセットはどのように準備すればよいですか?

    -ファインチューニングに必要なデータセットは、RoofFlowのUniverseからダウンロードし、YOLO v9に適合する形式にエクスポートします。

  • YOLO v9のモデルをトレーニングするにはどのようなパラメーターを指定する必要がありますか?

    -トレーニングにはバッチサイズ、画像解像度、エポック数、データのパス、ウェイト、および設定ファイルの指定が必要です。

  • YOLO v9のモデルを評価する際には何を確認するべきですか?

    -モデルの評価では、トレーニングセッションの進化を示すグラフ、混同行列、ラベル分布の可視化を確認することが重要です。

  • YOLO v9のモデルをどのようにデプロイすればよいですか?

    -RoofFlowを使用してモデルのウェイトを管理し、ローカルまたはAPIを介してモデルを展開することができます。

  • YOLO v9を使用して新しいモデルをトレーニングする際にはどのデータセットが推奨されますか?

    -YOLO v9を使用してトレーニングする際には、フットボールプレイヤー検出データセットが使用されていますが、他のデータセットも選択可能です。

  • YOLO v9のモデルをテストする際にはどのようなコマンドを使用しますか?

    -テストにはdetect.pyスクリプトを使用し、ウェイトとソース画像のパスを指定します。また、信頼度閾値やデバイスも設定できます。

  • YOLO v9のモデルをファインチューニングした後のベンチマークはどのように行われますか?

    -ファインチューニング後のモデルのベンチマークは、precision, recall, およびmapを測定するpy scriptを使用して行われます。

Outlines

00:00

🚀 YOLO v9の登場とリアルタイム物体検出の進歩

YOLO v9は速さと精度の両面で競合他を凌駕した最新のモデルで、以前のバージョンであるYOLO V4, V7, Xの開発者が発表しました。このビデオでは、事前トレーニングされたモデルを使用して推論を実行し、カスタムデータセットでモデルをトレーニング、評価し、推論パッケージを使ってYOLO v9モデルを展開する方法を紹介します。ビデオでは、Google Colabで実行するためのノートブックへのリンクも提供されていますが、GPU環境での実行が推奨されています。また、YOLO v9はpeepパッケージでは配布されておらず、リポジトリをクローンして手動で依存関係をインストールする必要があります。

05:00

🔍 YOLO v9の推論実行とモデルのファインチューニング

YOLO v9を使用した推論の実行方法と、カスタムデータセットに対してモデルをファインチューニングする手順が説明されています。推論の結果を比較するために、YOLO v9eを使用した結果も提示されています。また、コミュニティセッションでの議論や、モデルのトレーニングに必要なデータセットの準備方法も紹介されています。トレーニングにはtrain.pyスクリプトを使用し、重要なパラメータとしてバッチサイズ、画像解像度、エポック数などを指定します。

10:01

📈 YOLO v9のトレーニング結果とモデルの評価

YOLO v9のトレーニングが完了した後、モデルの評価と新しい画像およびビデオでの物体検出のパフォーマンスを確認する方法について説明されています。トレーニング成果物を分析し、様々な可視化ツールを使ってトレーニングセッションの進展を理解します。また、混同行列やラベルの分布を分析して、モデルの特性を深く掘り下げます。最後に、whale.pyスクリプトを使ってモデルをベンチマークし、検出の正確性とmAPを評価します。

15:08

🛠 YOLO v9モデルの展開とロボフローの活用

YOLO v9モデルを展開する方法と、ロボフローを使用してモデルの重みを管理し、モデルを展開するプロセスが紹介されています。inferenceとsupervisionパッケージをインストールし、ロボフローのdeployメソッドを使ってモデルを展開します。その後、モデルをローカルで実行し、supervisionを使って推論結果を視覚化します。さらに、YOLO v9のコミュニティの規模、使いやすさ、ライセンスなどを考慮して他の物体検出モデルと比較し、さまざまなユースケースでの適用可能性も触れています。

20:12

👋 ビデオの締めくくりと次回予告

ビデオの最後に、作成者が視聴者に対して感謝の言葉を述べ、次回のビデオに期待をかける場面が示されています。また、チャンネルへの登録、いいね、および今後のコンピュータビジョンに関するコンテンツへのご期待を呼びかけています。

Mindmap

Keywords

💡YOLO v9

YOLO v9はリアルタイムオブジェクト検出において競合他社を凌駕する新しいモデルです。このビデオでは、事前トレーニングされた重みを使用して推論を実行し、カスタムデータセットでモデルをトレーニング、評価し、推論パッケージを使用してモデルを展開する方法が説明されています。ビデオのテーマは、YOLO v9の機能とその応用方法です。

💡リアルタイムオブジェクト検出

リアルタイムオブジェクト検出とは、画像やビデオフレーム内のオブジェクトを迅速かつ正確に識別するプロセスです。YOLO v9は、この分野で新しい基準を設定しており、スピードと正確さを両立して他のアルゴリズムを上回るとされています。ビデオでは、YOLO v9がリアルタイムでの検出においてどのように優れているかが強調されています。

💡推論

推論は、機械学習モデルがトレーニングされた後に新しいデータに対して予測を行うプロセスです。ビデオでは、YOLO v9を使用して事前トレーニングされた重みで推論を実行し、モデルの機能性を確認する方法が説明されています。

💡カスタムデータセット

カスタムデータセットとは、特定のタスクやアプリケーションに合わせて作成されたデータセットです。ビデオでは、カスタムデータセットを使用してYOLO v9をファインチューニングし、特定のオブジェクト検出タスクにモデルを適応させる方法が紹介されています。

💡ファインチューニング

ファインチューニングは、事前トレーニングされたモデルを特定のデータセットに対してさらにトレーニングすることで、モデルの性能を向上させるプロセスです。ビデオでは、YOLO v9をカスタムデータセットにファインチューニングし、特定のスポーツ選手検出タスクを改善する例が示されています。

💡GPU

GPU(グラフィックプロセッシングユニット)は、画像やビデオの処理に特化したハードウェアです。ビデオでは、GPUを利用してYOLO v9のトレーニングと推論を高速化する重要性が強調されています。

💡モデルの展開

モデルの展開とは、トレーニングされた機械学習モデルを実際のアプリケーションやサービスに統合するプロセスです。ビデオでは、YOLO v9モデルをローカル環境やAPIを介して展開する方法が説明されています。

💡精度と速度

精度と速度は、オブジェクト検出モデルの性能を評価する重要な指標です。ビデオでは、YOLO v9が他のモデルと比較して精度と速度の両面で優れていることが強調されています。

💡データセットの不均衡

データセットの不均衡とは、データセット内のあるクラスが他に比べて多く存在する状態です。ビデオでは、データセットの不均衡がモデルの性能にどのように影響を与えるかが分析されており、プレイヤーの検出においては良好なパフォーマンスが期待できる一方、ボールの検出においては課題が指摘されています。

💡Roboflow

Roboflowは、データセットの管理、モデルの展開、そして結果の注釈を行うためのプラットフォームです。ビデオでは、Roboflowを使用してYOLO v9モデルの重みを管理し、モデルを展開する方法が紹介されています。

Highlights

YOLO v9模型发布,速度和准确性超越竞争对手。

YOLO v9由YOLO V4、YOLO X和YOLO V7的创造者推出。

YOLO v9在实时目标检测方面达到了新的最佳状态。

视频教程将展示如何使用预训练模型进行推理、训练和评估自定义数据集,并部署YOLO v9模型。

提供了用于运行YOLO v9的notebook链接。

确保访问GPU以优化模型训练和推理过程。

YOLO v9不通过pip包分发,需要手动克隆仓库和安装依赖。

安装了roofflow pip包以简化数据集下载。

YOLO v9不支持自动下载模型权重,但提供了GitHub下载链接和自动化命令。

使用tech.py脚本进行模型推理。

YOLO v9e模型在相同参数下能检测出更多对象。

YOLO v9社区会议讨论了实时零样本目标检测器。

YOLO v9训练需要准备自定义数据集。

训练YOLO v9模型使用train.py脚本,并需要指定多个参数。

模型评估是微调模型后的必经步骤,以了解模型在新图像上的表现。

YOLO v9提供了有用的可视化工具,帮助理解训练过程和模型特性。

部署YOLO v9模型可以使用roofflow管理权重并部署模型。

YOLO v9可以应用于多种场景,如智能自助结账。

YOLO v9是一个年轻的项目,尽管速度快且准确,但缺乏SDK、CLI和文档。

Transcripts

play00:00

YOLO v9 is out and it's beating out the

play00:03

competition in both speed and

play00:06

accuracy the creators of YOLO V4 YOLO X

play00:10

and YOLO V7 have released new model and

play00:13

according to the paper is new state of

play00:16

the art in realtime object

play00:18

detection in this video I'll show you

play00:21

how to run the inference using

play00:23

pre-trained cooes train and evaluate the

play00:26

model on custom data set and deploy the

play00:29

YOLO v9 model using inference package so

play00:33

without further Ado let's dive

play00:35

in the link to notebook I'll be using is

play00:39

in the description below but you can

play00:41

also find it in roof flow notebooks

play00:43

repository I strongly encourage you to

play00:46

open it in separate Tab and follow along

play00:50

we navigate into model section and

play00:53

search for YOLO v9 object detection

play00:56

notebook then click open in collab

play00:59

button and after a few seconds we should

play01:02

get redirected to Google collab page

play01:05

before we start we need to make sure

play01:07

that we have access to GPU it is

play01:09

especially important if we plan not only

play01:12

to run the inference but also fine-tune

play01:15

the model on custom data set this

play01:17

process can be unbearably slow in CPU

play01:21

only environments to do this we scroll

play01:23

slightly down into before you start

play01:25

section and execute Nvidia SMI command

play01:29

this command will only execute

play01:31

successfully in GPU accelerated

play01:33

environments with Nvidia gpus if your

play01:37

result is similar to mine then you're

play01:39

probably good to go however if you see a

play01:42

message saying that Nvidia SMI command

play01:45

is not recognize it probably means that

play01:47

you do not have access to GPU in this

play01:50

case click runtime and from extended

play01:53

dropdown select change runtime type then

play01:57

choose version with Nvidia T4 G GPU the

play02:00

next step is to clone YOLO v9 repository

play02:03

and install all necessary libraries

play02:06

unlike YOLO V8 and yolon Nas YOLO v9 is

play02:09

not distributed through peep package at

play02:11

least at the time of the recording this

play02:14

means we need to clone the repository

play02:16

and manually install all

play02:18

dependencies after installation instead

play02:21

of CLI or SDK we'll have a set of script

play02:25

to detect train evaluate and Export the

play02:28

model the project structure is quite

play02:31

familiar to the one known from older

play02:33

models like YOLO V5 or YOLO V7 so if you

play02:36

have any experience with them you should

play02:38

feel quite familiar if you don't don't

play02:41

worry I'll still guide you for the whole

play02:43

process additionally to make our life

play02:46

easier we'll also install roof flow peep

play02:48

package it will allow us to download the

play02:51

data set in format compatible with yolo

play02:53

v9 I will use the football player

play02:56

detection data set but you can download

play02:59

whichever you you like there are already

play03:01

more than 500,000 data set on rlow

play03:04

Universe the links to both universe and

play03:07

my data set are in the description below

play03:10

unfortunately YOLO v9 lacks support for

play03:12

automatic model weights download you can

play03:15

download them manually from GitHub but

play03:17

inside the notebook you'll find set of

play03:19

commands allowing you to do that

play03:22

automatically so let's run them now to

play03:24

finalize the setup

play03:26

process our next step is to run

play03:28

inference with pre-trained I think

play03:31

it's a great way to get familiar with

play03:33

new model and at the same time it will

play03:36

allow us to confirm that the

play03:37

installation was successful and

play03:40

everything works as

play03:42

expected to test the model I will use

play03:44

the image of my dog but if you want to

play03:46

run it with your data simply drag and

play03:48

drop your image into the left panel of

play03:51

Google collab and replace the source

play03:53

image path value with path leading to

play03:56

your image as I said before YOLO v9 does

play03:59

not have dedicated CLI or SDK so to

play04:03

perform the inference we will need to

play04:05

use the tech py script the most

play04:07

important arguments that we need to

play04:09

provide are weights and Source the first

play04:12

one is simply path to weights file that

play04:15

we already downloaded from GitHub The

play04:17

Source can be a path leading to

play04:20

individual image or video but also to

play04:23

the whole directory with multimedia

play04:25

files or if you run locally to webcam

play04:28

stream on top of that we will set values

play04:31

for two extra parameters confidence

play04:33

threshold and device I set the

play04:36

confidence Threshold at 0.1 because I

play04:39

want to capture as many detections as

play04:41

possible even those that the model is

play04:44

not entirely sure about the device

play04:46

specified the hardware we want to use

play04:48

during the inference we could pass the

play04:50

CPU here but given that we have a GPU

play04:53

will pass the Cuda device index in our

play04:56

case Zero now let's run the inference

play05:00

using two architectures and compare the

play05:02

results the commands we will use are

play05:05

almost identical the only difference

play05:07

lies in path to model weights let's

play05:10

start with Gan C by default YOLO v9 save

play05:14

inference results in yolow v9 detect exp

play05:18

directory we can override this Behavior

play05:21

by passing custom values for project and

play05:24

name

play05:25

arguments now let's run the inference

play05:28

for YOLO v9e and compare the results

play05:31

this time the results of the inference

play05:33

were saved in X to directory we can see

play05:37

that using the same parameters YOLO v9e

play05:40

is capable of detecting more objects in

play05:43

the same image and that's consistent

play05:45

with the performance reported in Yolo v9

play05:48

paper last week we had our first

play05:51

Community session where we discussed

play05:53

yellow World a almost Real Time Zero

play05:56

shot object detector and I would like to

play05:59

use this opportunity to thank to

play06:01

everyone who joined the stream I really

play06:03

had an awesome time meeting you all and

play06:05

answering your questions we decided to

play06:08

continue this initiative so if you have

play06:09

any questions about the code or demos

play06:12

that I will show today or about YOLO v9

play06:15

in general make sure to leave them in

play06:17

the comments and I will make sure to

play06:19

answer all of them during the upcoming

play06:21

stream and of course it would make me

play06:23

even more happy if you could join it

play06:25

live you can find more details along

play06:28

with exact day and time in the

play06:30

description below and once again thank

play06:35

you okay we know how to run Yola v9

play06:38

using pre-trained weights now it's time

play06:41

to learn how to fine-tune the model but

play06:43

before we can do that we need to prepare

play06:45

our data set as I mentioned earlier I

play06:48

will train my model on football player

play06:51

detection data set if you'd like to try

play06:53

a different one feel free to browse for

play06:55

universe and pick one that seems

play06:57

interesting then from left panel select

play07:00

data set and click download data set

play07:03

button when the popup window appears

play07:06

pick the export format in our case YOLO

play07:08

v9 make sure that show download code

play07:12

option is checked and click continue

play07:15

after a few seconds a code snippet will

play07:17

be generated you just need to copy and

play07:19

paste it into Google collab and you're

play07:21

good to go I however will stick with my

play07:24

original choice I just press shift enter

play07:27

and once it's done I see a prompt asking

play07:30

me to provide roof flow API key I follow

play07:33

the link that takes me to roof flow

play07:35

website I click generate token copy it

play07:39

and then return to collab paste and hit

play07:43

enter the downloaded data set is divided

play07:46

into three subsets train validate and

play07:49

test the train and validate subsets are

play07:52

going to be used during the training

play07:54

while the test subset will be used for

play07:57

evaluation remember that the test set

play08:00

should not contain any images that were

play08:02

used during the training each part

play08:05

consists of two directories one

play08:07

containing images and the other

play08:09

containing labels each label file is

play08:12

essentially a txt file in standard

play08:14

yellow format known from earlier

play08:16

versions of the model each line

play08:19

describes a single bounding box and

play08:22

consists of five numbers separated by

play08:24

spaces the first one is the index

play08:27

associated with the label for example

play08:30

for Coco data set index zero is class

play08:33

person the other four are relative

play08:36

coordinates describing the position and

play08:38

dimensions of bounding box in the

play08:41

image now that our data set is ready we

play08:44

can finally start the training and to do

play08:47

it we'll use train py script this time

play08:50

however we need to specify a lot more

play08:52

parameters let me briefly introduce you

play08:55

to the most important

play08:57

ones let's start with arguments typical

play09:00

for any computer vision model training

play09:02

batch size image resolution and

play09:06

EPO this affects the amount of GPU

play09:09

memory required during the training as

play09:11

well as the total time needed to

play09:13

complete it bad size regulates how many

play09:16

images pass through the network

play09:18

simultaneously it should be as high as

play09:21

possible naturally limited by the amount

play09:24

of available memory before entering the

play09:27

network all images must be scaled to a

play09:30

common size which is defined by image

play09:33

resolution the higher the value the

play09:35

smaller objects will be able to detect

play09:38

unfortunately this also means increased

play09:41

memory usage and longer training time

play09:44

Epoch Define the number of training

play09:46

iteration it's usually a matter of

play09:48

intuition it needs to be large enough so

play09:51

the model has time to learn but not too

play09:54

long so overfitting wouldn't

play09:57

occur data defines the path to yam file

play10:00

specifying the structure of our train

play10:02

set finally weights and config indicate

play10:06

the checkpoint and architecture we would

play10:08

like to use during the training in this

play10:10

tutorial we will train the smallest

play10:12

architecture available in Yolo V8

play10:15

repository Gan C it's time to press

play10:18

shift plus enter and get it going the

play10:21

training process can take time so let's

play10:24

use the magic of Cinema to speed it

play10:28

up

play10:29

[Music]

play10:34

after several minutes our training was

play10:36

completed now it's time to evaluate the

play10:38

model and check how it performs with

play10:41

object detection on new images and

play10:43

videos model evaluation is a must have

play10:46

after fine-tuning the model custom data

play10:49

set after all we need to understand the

play10:51

strengths and weaknesses of our model

play10:54

and check if there are any differences

play10:56

in accuracy across different categor

play10:59

from our data set let's start by going

play11:01

through the directory storing the

play11:03

training

play11:04

artifacts inside besides weights we can

play11:07

find several visualizations that will

play11:10

help us understand the progress of

play11:12

training session let's start with the

play11:15

graph showing change in key metrics over

play11:17

time the six charts on the left display

play11:21

various types of loss function

play11:23

calculated for both the train and

play11:25

validation sets these charts are

play11:28

excellent tool to for detecting

play11:30

overfitting all of them are expected to

play11:32

decrease as training progress however

play11:36

when a model is trained for too long the

play11:38

validation loss function often tends to

play11:41

increase signaling that the model is too

play11:44

closely fitted to images from the train

play11:46

set in our case it's clear that the

play11:49

model could have been trained for much

play11:51

longer without any issues the charts are

play11:54

still steeply decreasing and there is

play11:56

plenty of room for further optimization

play11:59

the remaining four charts are various

play12:01

metrics such as Precision recall and map

play12:06

and their values should increase as the

play12:08

training

play12:09

progress the next chart we can analyze

play12:12

is the confusion metrics it shows how

play12:15

often objects of different categories

play12:17

are confused with each other I like this

play12:19

chart because it allows us to delve

play12:21

deeper into model's characteristics in

play12:24

our case we can clearly see that the

play12:26

model excels at detecting play ERS

play12:29

referees and goalkeepers but performs

play12:32

significantly worse at detecting balls

play12:35

YOLO v9 provides another useful

play12:38

visualization this time focusing on

play12:40

label distribution we can draw deeper

play12:43

conclusions by analyzing both of these

play12:46

charts simultaneously we see that our

play12:49

data set is unbalanced with player class

play12:51

being significantly over represented

play12:54

hence probably the best performance of

play12:56

the model in detecting players the ball

play12:59

class performs the worst not only

play13:02

because it appears the least frequently

play13:05

but also because the bounding box sizes

play13:07

for this class are the

play13:09

smallest since we decided to train our

play13:12

model using 640 input resolution such

play13:15

small bounding boxes might simply be

play13:18

scaled down to Tiny group of pixels

play13:20

possibly not carrying enough information

play13:23

to reliably detect the ball class now

play13:26

let's Benchmark our model using while py

play13:29

script as expected both recall and map

play13:33

for this class are significantly lower

play13:36

than average this is likely to high

play13:38

number of Mis detections a solution to

play13:41

this problem could be training the model

play13:44

using 1280 input resolution but as

play13:47

mentioned the training session would

play13:49

then be slower and require more GPU

play13:52

memory okay it's time to put our newly

play13:55

trained model to the test and see how it

play13:58

performs with previously unseen images

play14:01

and

play14:01

videos the command does not differ much

play14:04

from the one we executed at the

play14:06

beginning of the video we switch the

play14:08

path from the model pre-trained on Coco

play14:10

data set to the one we just ftuned and

play14:14

as the source we pass the entire

play14:17

directory containing the test data set

play14:20

let's take a look at some of the

play14:21

results as expected the model performs

play14:24

relatively well the biggest issue is

play14:26

reliable ball detection where we

play14:29

encounter both false negatives and false

play14:32

positives double detection also occur

play14:34

frequently when a referee is

play14:36

simultaneously detected as both a player

play14:39

and a referee now let's have some fun

play14:43

and see how our model handles sh video

play14:57

clip

play15:08

[Music]

play15:17

so how do we deploy the model that has

play15:20

no SDK we can certainly try to hack a

play15:23

solution based on the detect py script

play15:26

available in the repository however it

play15:29

seems that a much better and certainly

play15:31

more robust solution would be to use

play15:33

roof flow to manage your weights and

play15:35

deploy the model anywhere you want it's

play15:38

super easy you can do it in few lines of

play15:40

code let me show you

play15:42

how we start where we left off with our

play15:46

model already trained in collab first we

play15:48

need to install two additional packages

play15:51

inference and supervision we will use

play15:53

inference to deploy our YOLO v9 model

play15:56

locally but you can use it to run all

play15:58

all sorts of different computer vision

play16:00

models supervision is a computer vision

play16:03

Swiss army knife that this time we will

play16:05

use for annotating our inference

play16:07

results now we use the deploy method

play16:11

specify the model type in our case yolow

play16:13

v9 and the directory containing the

play16:16

training

play16:17

results this will send the weights to

play16:19

roof flow and enable us to use them both

play16:22

running the model locally and through

play16:24

the API now let's try to load the model

play16:27

back into the inference we specify the

play16:30

model ID which is the end part of the

play16:32

address displayed above the project

play16:35

name/ data set version and we pass our

play16:38

roof flow API

play16:40

key to get your roof flow API key you

play16:43

need to log into your roboplow account

play16:45

and then by expanding the drop-down in

play16:48

the upper right corner go to settings

play16:51

from the panel on left side select

play16:54

workspace and go to roof flow API

play16:57

section now you can simply copy your

play17:00

private key return to collab paste it

play17:03

and press enter to initiate model

play17:06

download Once the model is loaded we can

play17:09

choose a random image from our test set

play17:12

loaded using open CV and run it through

play17:15

the model finally using supervision we

play17:18

visualize the

play17:20

result since supervision offers a

play17:22

variety of different annotators we can

play17:24

choose something more suitable for our

play17:27

use case for examp example the ellipse

play17:29

annotator funny how such a small change

play17:32

can make the results seem much more

play17:34

interesting at the end of last year we

play17:37

released a video covering my favorite

play17:40

object detection

play17:41

models the goal was to evaluate popular

play17:44

detectors not only in terms of speed and

play17:47

accuracy but also take into account less

play17:50

obvious criteria such as Community size

play17:53

ease of use and

play17:55

Licensing I mentioned that the higher

play17:58

accurate accy of the based model on KOCO

play18:00

data set does not always translate into

play18:03

higher accuracy of the fine-tuned model

play18:06

and that the accuracy of detections is

play18:09

usually more affected by the quality of

play18:11

the data set that was used for training

play18:14

than the choice of specific architecture

play18:16

assessing Yolo v9 from similar

play18:18

perspective it's worth to mention that

play18:20

it is still a very young project

play18:24

although according to the paper it has

play18:26

managed to beat the competition in terms

play18:28

of of speed and accuracy on the other

play18:31

hand it has no SDK no CLI and no

play18:34

documentation beyond the GitHub read me

play18:37

so to sum it up I encourage you to try y

play18:39

v9 train your model deploy it with

play18:42

inference however keep in mind that

play18:44

there are still plenty of other popular

play18:46

object detectors that might be just a

play18:50

little bit slower and less accurate but

play18:52

still be a valuable alternative because

play18:54

they have large community great

play18:57

documentation and a lot of examples

play18:59

online that you can use to build your

play19:00

own project of course a powerful

play19:03

realtime object detector can be applied

play19:06

in many scenarios in this tutorial we

play19:08

trained a model for detecting players on

play19:11

a football field but YOLO v9 can be just

play19:13

as well used to Power Smart self-service

play19:16

checkout the customer simply needs to

play19:18

move the product in front of the camera

play19:21

and it is automatically added to the

play19:23

bill I also encourage you to check our

play19:25

hagging face space where you can upload

play19:28

your image and compare YOLO V8 v9 and

play19:31

yolon Nas side by side we are using

play19:34

models pre-trained on Coco data set so

play19:37

detection is limited to only 80

play19:40

classes if you want to go beyond that I

play19:43

encourage you to check our YOLO World

play19:45

space where you can detect any class

play19:48

without any training and that's all for

play19:50

today if you like the video make sure to

play19:53

like And subscribe and stay tuned for

play19:55

more computer vision content coming to

play19:57

this channel soon my name is Peter and I

play20:00

see you next time

play20:12

[Music]

play20:27

bye

play20:31

he

Rate This

5.0 / 5 (0 votes)

Related Tags
YOLO v9物体検出リアルタイムチュートリアル機械学習データセットGPUモデルチューニングデプロイメントコミュニティ
Do you need a summary in English?