lx704612715 / Scenario-analyse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dokumentation for Project SINA Perception

SINA is the ros package for Free Space and Object Detection based on deep Learning. This tutorial will introduce included files and necessary steps for starting the program.

  1. Create a virtual enviroment with virtualenvwrapper. Please install all dependency pacakges from Requirment.txt is in SINA/src
  pip install -r requirements.txt
  1. Modify ros path in Semantic.py line 3-4 in order to import 3.4.4 opencv instead ros-opencv-3.3.1 dev
  2. Modify file path in Semantic.py line 33-35 so that deep learning weights could be imported. The parameter Object_name is to be changed to the traget object name
  3. Run these commands
  roscore
  cd catkin_ws/
  rosrun SINA Semantic.py
  rosbag play -l rgbd_dataset_freiburg1_desk_validation.bag
  1. Here a rosbag recorded by Realsense from TUM is used to test the algorithm, if you want to run the package for your own camera or dataset, please modify the subscriber in Semantic.py line 148
  2. Result

SINA rospackage contains a whole pipline for training a semantic segmentation netzwork. Relevante files are

  1. Data Augmentation (automatically).ipynb
  2. Training for Unet.ipynb
  3. data
A semantic neural network can be trained by Training for Unet.ipynb after doing data augmentation with Data Augmentation (automatically).ipynb. The data for training will be automatically saved in data file. Please check the path before training.
  1. The first thing you need to do is to modify the path in Training for Unet.ipynb and Data Augmentation (automatically).ipynb. The data augmentation algorithm based on https://keras.io/preprocessing/image/

  1. After finishing the setting up, you can start training Unet

  2. To Use the trained Unet, the path of weights in main programm Semantic.py need to be modified

unet = unet_class.Unet('/home/xing_usrqj/catkin_ws/src/SINA/src/fourth_training.h5')
  1. Run the programm
rosrun SINA Semantic.py
  1. The annotation tool for semantic segmentation is “labelme” from MIT. https://github.com/wkentaro/labelme
  2. A Demo video could be found under SINA/src/Demo

About


Languages

Language:Jupyter Notebook 99.4%Language:Python 0.6%