/LabelFusion

LabelFusion: A Pipeline for Generating Ground Truth Labels for Real RGBD Data of Cluttered Scenes

Primary LanguagePythonOtherNOASSERTION

Setup

Recommended setup is through our Docker.

If instead you'd prefer a native install, go to: Setup_Instructions.

For every-time use, add the following lines (with paths adjusted) to your ~/.bashrc

LABELFUSION_SOURCE_DIR=/path/to/LabelFusion
    DIRECTOR_INSTALL_DIR=/path/to/Director/install
    source $LABELFUSION_SOURCE_DIR/setup_environment.sh

Quick Pipeline Instructions

This is the quick version. If you'd prefer to go step-by-step manually, see Pipeline_Instructions.

Collect raw data from Xtion

First, cdlf && cd data/logs, then make a new directory for your data. In one terminal, run:

openni2-camera-lcm

In another, run:

lcm-logger

Your data will be saved in current directory as lcmlog-*.

Process into labeled training data

First we will launch a log player with a slider, and a viewer. The terminal will prompt for a start and end time to trim the log, then save the outputs:

run_trim

Next, we prepare for object pose fitting, by running ElasticFusion and formatting the output:

run_prep

Next, launch the object alignment tool. See Pipeline_Instructions for how to use the alignment tool:

run_alignment_tool

After the alignment outputs have been saved, we can create the labeled data:

run_create_data

Train SegNet on labeled data

Navigate to /SegNet/MovingCamera/

Copy all the data you want to use (created by run_create_data from different datasets) into ./train

Use a different subdirectory inside /train/ for each log, i.e.:

/train/log-1
/train/log-2

Then resize all of the training images to a better size for training:

python resize_all_images.py

Finally, create the description of image-label pairs needed as SegNet input:

python create_traiing_set_list.py

To train SegNet:

cd /
./SegNet/caffe-segnet/build/tools/caffe train -gpu 0 -solver /SegNet/Models/moving_camera_solver.prototxt