A set of python scripts implementing MMDetection for object detection with a depth camera.
- Clone this repo to your catkin workspace
cd /catkin_ws/src
git clone https://github.com/petpetpeter/mmdetection_ros.git
- Build your workspace
cd /catkin_ws/
catkin build
source ~/.bashrc
- Install Python Dependencies (Pytorch, MMDetection)
follow: https://mmdetection.readthedocs.io/en/latest/get_started.html#installation (recommend using conda)
ez installation
conda create -n ezmmd python=3.8
conda activate ezmmd
install pytorch (follow here: https://pytorch.org/get-started/locally/)
pip install openmim
mim install mmdet
- Download pretrain weight to /scripts/checkpoints
cd script/checkpoints
wget "https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth"
- Launch depth camera simulation
roslaunch mmd_ros coco_camera.launch
- Run detection script
conda activate ezmmd
cd /script
python rosimage_detector.py
- MMDetection: https://github.com/open-mmlab/mmdetection