Skip to content

2 stage keypoint regression and transformation to 3D via depth map

License

Notifications You must be signed in to change notification settings

cds-mipt/keypoint_regression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Door handle keypoint regression

Before installation

Change the script start.sh with correct paths to your code and other params.

Install framework

bash start.sh
# now you are inside docker container
bash # to change default command manager
source /opt/ros/noetic/setup.bash # to activate ROS
export PYTHONPATH="${PYTHONPATH}:/home/yolox:/home/mmdetection:/home/mmpose" # to activate installed libs

Download rosbags from here and weights from here

To run in on single image

python3 tools/rosbag_eval.py image \
    --path assets/000.jpg \ # put your image path here 
    --save_result \
    --name yolox-s \
    --exp_file_det src/detector/config.py \
    --ckpt_det weights/yolox-s_door_handle.pth \
    --device_det cuda:0 \
    --conf 0.1 \
    --exp_file_reg src/regressor/config.py \
    --ckpt_reg weights/hrnet_w32_256x192_door_handle.pth \
    --device_reg cuda:0

To run in on ros bag

rosbag play data/ros_bags/2022-07-06-08-37-01-002.bag # as an example
# needed topics inside a rosbag:
# 1) /realsense_back/color/image_raw
# 2) /realsense_back/aligned_depth_to_color/image_raw
# 3) /realsense_back/color/camera_info
# the result should be compared with topic:
# 1) /door_handle
python3 tools/rosbag_eval.py rosbag \
    --save_result \
    --name yolox-s \
    --exp_file_det src/detector/config.py \
    --ckpt_det weights/yolox-s_door_handle.pth \
    --device_det cuda:0 \
    --conf 0.7 \
    --exp_file_reg src/regressor/config.py \
    --ckpt_reg weights/hrnet_w32_256x192_door_handle.pth \
    --device_reg cuda:0