Skip to content

Latest commit

 

History

History
executable file
·
108 lines (58 loc) · 4.08 KB

README.md

File metadata and controls

executable file
·
108 lines (58 loc) · 4.08 KB

pytorch_scene_recognition_ros

1. Overview

A ROS package to use LibTorch, a PyTorch C++ API, for inference with our scene recognition models.

A Docker environment for running this package is here. This package is only tested in the virtual environment.

2. Requirements

3. Nodes

3.1 pytorch_seg_trav_path_node

A node to use a multi-task model for semantic segmentation, traversability estimation, and path estimation.

3.1.1 Subscribed topics

3.1.2 Published topics

3.1.3 Service

3.2 visualizer.py

3.2.1 Subscribed topics

3.2.2 Published topics

4. How to run the node

roslaunch pytorch_enet_ros.launch image:=<image topic name> model_name:=<model name>

5. Weight files

The ROS nodes in this package use models saved as a serialized Torch Script file.

At this moment, we don't provide a script to generate the weight files.

Refer to this page to get the weight file.

CAUTION

If the version of PyTorch that runs this ROS package and that you generate your weight file (serialized Torch Script) do not match, the ROS node may fail to import the weights.

For example, if you use our Docker environment, the weights should be generated using PyTorch 1.5.0.

6. Color map

For visualization of semantic segmentation, we use a color map image.

It is a 1xC PNG image file (C: The number of classes), where the color of class i is stored in the pixel at (1, i).

7. Publications

This repository is used in experiments in the publication as follows:

Shigemichi Matsuzaki, Hiroaki Masuzawa, Jun Miura, Image-Based Scene Recognition for Robot Navigation Considering Traversable Plants and Its Manual Annotation-Free Training, IEEE Access, vol. 10, pp. 5115-5128, 2022 [paper]