tentone / monodepth

Python ROS depth estimation from RGB image based on code from the paper "High Quality Monocular Depth Estimation via Transfer Learning"

Home Page:https://tentone.github.io/monodepth/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mono Depth ROS

Configuration

  • Topics subscribed by the ROS node
    • /image/camera_raw - Input image from camera (can be changed on the parameter topic_color)
  • Topics published by the ROS node, containing depth and point cloud data generated.
    • /image/depth - Image message containing the depth image estimated (can be changed on the parameter topic_depth).
    • /pointcloud - Pointcloud2 message containing a estimated point cloud (can be changed on the parameter topic_pointcloud).
  • Parameters that can be configurated
    • frame_id - TF Frame id to be published in the output messages.
    • debug - If set true a window with the output result if displayed.
    • min_depth, max_depth - Min and max depth values considered for scaling.
    • batch_size - Batch size used when predicting the depth image using the model provided.
    • model_file - Keras model file used, relative to the monodepth package.

Setup

  • Install Python 2 and ROS dependencies
apt-get install python python-pip curl
pip install rosdep rospkg rosinstall_generator rosinstall wstool vcstools catkin_tools catkin_pkg
  • Install project dependencies
pip install tensorflow keras pillow matplotlib scikit-learn scikit-image opencv-python pydot GraphViz tk
  • Clone the project into your ROS workspace and download pretrained models
git clone https://github.com/tentone/monodepth.git
cd monodepth/models
curl –o nyu.h5 https://s3-eu-west-1.amazonaws.com/densedepth/nyu.h5

Launch

  • Example ROS launch entry provided bellow, for easier integration into your already existing ROS launch pipeline.
<node pkg="monodepth" type="monodepth.py" name="monodepth" output="screen" respawn="true">
    <param name="topic_color" value="/camera/image_raw"/>
    <param name="topic_depth" value="/camera/depth"/>
</node>

Pretrained models

Datasets for training

  • NYU Depth V2 (50K)
    • The NYU-Depth V2 data set is comprised of video sequences from a variety of indoor scenes as recorded by both the RGB and Depth cameras from the Microsoft Kinect.
    • Download dataset (4.1 GB)
  • KITTI Dataset (80K)
    • Datasets captured by driving around the mid-size city of Karlsruhe, in rural areas and on highways. Up to 15 cars and 30 pedestrians are visible per image.

About

Python ROS depth estimation from RGB image based on code from the paper "High Quality Monocular Depth Estimation via Transfer Learning"

https://tentone.github.io/monodepth/

License:GNU General Public License v3.0


Languages

Language:Python 90.4%Language:Shell 5.1%Language:CMake 4.5%