WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Object detection using SSD (Single Shot MultiBox Detector). Nodelet implementation version

License

Notifications You must be signed in to change notification settings

TeamSOBITS/ssd_ros

Repository files navigation

JA | EN

Contributors Forks Stargazers Issues License

SSD for ROS

目次
  1. 概要
  2. 環境構築
  3. 実行・操作方法
  4. パラメーター
  5. マイルストーン
  6. 参考文献

概要

本レポジトリは,Single Shot MultiBox Detector(SSD)による物体検出をROS2環境で行うためのパッケージです.

(上に戻る)

環境構築

本レポジトリのセットアップ方法について説明します.

(上に戻る)

環境条件

まず,以下の環境を整えてから,次のインストール方法に進んでください.

System Version
Ubuntu 22.04 (Jammy Jellyfish)
ROS Humble Hawksbill
Python >=3.10

(上に戻る)

インストール方法

  1. はじめにROS2のsrcフォルダに移動します.
    cd ~/colcon_ws/src
  2. srcフォルダ内にROSパッケージssd_nodeletをクローンします.
    git clone -b humble-devel https://github.com/TeamSOBITS/ssd_nodelet.git
  3. クローンしたレポジトリフォルダの中へ移動します.
    cd ssd_nodelet
  4. 依存パッケージをインストールします.
    bash install.sh
  5. パッケージをビルドします
    cd ~/colcon_ws/
    colcon build --symlink-install
    source ~/colcon_ws/install/setup.sh

(上に戻る)

実行・操作方法

パッケージのビルドまで完了したら,以下の手順で動作確認を行うことができます.

  1. カメラを起動します.

  2. ssd.launch.pyimage_topic_nameを使用するカメラのトピック名に書き換えます.

    default_value="/camera/camera/color/image_raw",           ## realsense
  3. RGBDカメラを使用する場合は,ssd.launch.pypoint_cloud_topic_nameを使用するカメラの点群トピック名に書き換えます.

    default_value="/camera/camera/depth/color/points",       ## realsense
  4. 物体検出(人を含む)するか,顔検出をするかに応じて使用するモデルを変更するため,ssd.launch.py内の以下のパスを書き換えます.

    • voc_object_prototxt_path
    • voc_object_caffemodel_path
    • voc_object_names_path

    例:物体検出時

    voc_object_prototxt_path = os.path.join(get_package_share_directory('ssd_ros'), 'models', 'voc_object.prototxt')
    voc_object_caffemodel_path = os.path.join(get_package_share_directory('ssd_ros'), 'models', 'voc_object.caffemodel')
    voc_object_names_path = os.path.join(get_package_share_directory('ssd_ros'), 'models', 'voc_object_names.txt')
  5. 顔の検出をする場合は,パスの変更に加えてssd.launch.pyin_scale_factorを書き換えます.

    # default_value="0.007843",     # 物体検出時
    default_value="1.00",           # 顔検出時
  6. 必要な変更が完了したら,ssd.launch.pyを起動して動作確認することが可能です.

    ros2 launch ssd_ros ssd_ros.launch.py

(上に戻る)

パラメーター

ssd.launch.py内で設定可能なパラメータは以下のとおりです.

パラメーター名 説明 デフォルト値
image_show_flag 画像を表示するかどうかの制御 true
execute_default SSD (Single Shot MultiBox Detector) がデフォルトで起動するかどうかを決定 true
image_topic_name sensor_msgs/msg/Image型メッセージのROSトピック名を指定 /camera/camera/color/image_raw(realsense用)
point_cloud_topic_name sensor_msgs/msg/PointCloud2型メッセージのROSトピック名を指定 /camera/camera/depth/color/points(realsense用)
in_scale_factor Caffemodelでデータを処理する際の変換時に使用されるスケールパラメータ 0.007843(物体検出用)
confidence_threshold 検出結果の信頼度に対するしきい値 0.5
ssd_prototxt_name Caffemodelの構造を記述したファイルパス /install/ssd_ros/share/ssd_ros/models/voc_object.prototxt
ssd_caffemodel_name 学習済みモデルのファイルパス /install/ssd_ros/share/ssd_ros/models/voc_object.caffemodel
ssd_class_names_file 学習済み物体名リストのファイルパス /install/ssd_ros/share/ssd_ros/models/voc_object_names.txt
object_specified_enabled 特定の物体検出の有効化フラグ true
specified_object_name object_specified_enabledtrueに設定されている場合に検出する物体の名前を指定 person
use_3d 3D検出の有効化フラグ true
cluster_tolerance どの程度離れた点群までは同一の物体とみなすかのしきい値 0.01
min_clusterSize 一定数以下の点群クラスタを対象から棄却するかのしきい値 100
max_clusterSize 一定数以上の点群クラスタを対象から棄却するかのしきい値 20000
noise_point_cloud_range 対象の物体の点群からノイズ面を除去する量 0.01
fast_shot fast_shotの有効化フラグ true
enable_id 検出した物体のラベルにIDを付与するかのフラグ false

(上に戻る)

マイルストーン

  • image_to_positionの更新に伴うlaunchパラメータに更新の可能性あり.

現時点のbugや新規機能の依頼を確認するためにIssueページ をご覧ください.

(上に戻る)

参考文献

(上に戻る)

About

Object detection using SSD (Single Shot MultiBox Detector). Nodelet implementation version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published