コンテンツへスキップ

Ultralytics YOLOv8 🚀を使用した、異なる領域におけるオブジェクトのカウント。

リージョンにおけるオブジェクトカウントとは?

Object counting in regions with Ultralytics YOLOv8 involves precisely determining the number of objects within specified areas using advanced computer vision. This approach is valuable for optimizing processes, enhancing security, and improving efficiency in various applications.



見るんだ: Ultralytics YOLOv8 複数かつ移動可能な領域におけるオブジェクトのカウント

リージョンにおけるオブジェクトカウントの利点は?

  • Precision and Accuracy: Object counting in regions with advanced computer vision ensures precise and accurate counts, minimizing errors often associated with manual counting.
  • 効率の向上:自動化されたオブジェクトカウントは、リアルタイムで結果を提供し、異なるアプリケーション間のプロセスを合理化することで、業務効率を向上させます。
  • 汎用性と応用:地域における物体計数の汎用性により、製造や監視から交通監視に至るまで、様々な領域で応用が可能であり、その有用性と有効性の普及に寄与している。

実世界での応用

小売マーケット・ストリート
各地域での人数の数え方Ultralytics YOLOv8各地域における人混みのカウントUltralytics YOLOv8
各地域での人数の数え方Ultralytics YOLOv8各地域における人混みのカウントUltralytics YOLOv8

ステップ・トゥ・ラン

ステップ 1: 必要なライブラリのインストール

Ultralytics リポジトリをクローンし、依存関係をインストールし、ステップ2で提供されたコマンドを使ってローカルディレクトリに移動することから始める。

# Clone Ultralytics repo
git clone https://github.com/ultralytics/ultralytics

# Navigate to the local directory
cd ultralytics/examples/YOLOv8-Region-Counter

ステップ 2: 領域カウントの実行Ultralytics YOLOv8

推論のために以下の基本コマンドを実行する。

リージョンは移動可能

ビデオ再生中に、マウスの左ボタンをクリックしてドラッグすることで、ビデオ内の領域をインタラクティブに移動することができます。

# Save results
python yolov8_region_counter.py --source "path/to/video.mp4" --save-img

# Run model on CPU
python yolov8_region_counter.py --source "path/to/video.mp4" --device cpu

# Change model file
python yolov8_region_counter.py --source "path/to/video.mp4" --weights "path/to/model.pt"

# Detect specific classes (e.g., first and third classes)
python yolov8_region_counter.py --source "path/to/video.mp4" --classes 0 2

# View results without saving
python yolov8_region_counter.py --source "path/to/video.mp4" --view-img

オプションの引数

名称タイプデフォルト説明
--sourcestrNoneビデオファイルへのパス(ウェブカメラ用) 0
--line_thicknessint2Bounding Box thickness
--save-imgboolFalse予測したビデオ/画像を保存する
--weightsstryolov8n.ptウェイトファイルのパス
--classeslistNone特定のクラスを検出する。
--region-thicknessint2リージョンボックスの厚さ
--track-thicknessint2トラッキングラインの太さ

よくあるご質問

Ultralytics YOLOv8 を使った特定領域でのオブジェクトカウントとは?

Object counting in specified regions with Ultralytics YOLOv8 involves detecting and tallying the number of objects within defined areas using advanced computer vision. This precise method enhances efficiency and accuracy across various applications like manufacturing, surveillance, and traffic monitoring.

Ultralytics YOLOv8 でオブジェクトカウントのスクリプトを実行するには?

Ultralytics YOLOv8 でオブジェクト・カウントを実行するには、以下の手順に従ってください:

  1. Ultralytics リポジトリをクローンし、ディレクトリに移動する:

    git clone https://github.com/ultralytics/ultralytics
    cd ultralytics/examples/YOLOv8-Region-Counter
    
  2. 地域カウントスクリプトを実行する:

    python yolov8_region_counter.py --source "path/to/video.mp4" --save-img
    

その他のオプションについては、ラン・リージョン・カウントのセクションをご覧ください。

リージョンでのオブジェクトカウントにUltralytics YOLOv8 を使うべき理由は?

Ultralytics YOLOv8 をリージョン内のオブジェクトカウントに使用すると、いくつかの利点がある:

  • 精度と正確さ:手作業でよく見られる誤差を最小限に抑えます。
  • 効率の改善:リアルタイムの結果を提供し、プロセスを合理化します。
  • 汎用性と応用性:様々な領域に適用され、実用性を高める。

より深い利点については、「利点」のセクションをご覧ください。

定義された領域は、ビデオ再生中に調整できますか?

Ultralytics YOLOv8 では、ビデオ再生中にリージョンをインタラクティブに移動できます。マウスの左ボタンでクリックしてドラッグするだけで、リージョンを再配置できます。この機能は、ダイナミックな環境での柔軟性を高めます。詳しくは、移動可能なリージョンのヒントセクションをご覧ください。

リージョンにおけるオブジェクトカウントの実際の応用例にはどのようなものがあるか?

Ultralytics YOLOv8 を使った物体計数は、実世界の数多くのシナリオに適用できる:

  • 小売業通行量分析のための人数のカウント。
  • マーケットストリート群集密度管理。

実世界での応用例をご覧ください。

📅 Created 10 months ago ✏️ Updated 29 days ago

コメント