|
| 1 | +# Example for running and evaluating EM-Fusion |
| 2 | + |
| 3 | +## 1. Download dynamic scene datasets |
| 4 | + |
| 5 | +Go to the [Co-Fusion repository](https://github.com/martinruenz/co-fusion#synthetic-sequences) |
| 6 | +and download one or more of the sequences. For the synthetic sequences, we used |
| 7 | +the *.tar.gz archives. |
| 8 | + |
| 9 | +The real-world scenes are provided in the *.klg format, so you need to convert |
| 10 | +them first. A tool for doing this can be found [here](https://github.com/martinruenz/dataset-tools/tree/master/convert_klg). |
| 11 | +After building this tool with CMake (together with the rest of the repository), |
| 12 | +we used |
| 13 | +```bash |
| 14 | +convert_klg -i <path/to/klg> -o <output/path> -frames -sub -png |
| 15 | +``` |
| 16 | +to generate folders for the real-world scenes. Please check |
| 17 | +`build/bin/convert_klg -h` for what the options do. We additionally renamed the |
| 18 | +`color` subfolder to `colour` to match the synthetic sequences. |
| 19 | + |
| 20 | +## 2. Run EM-Fusion |
| 21 | + |
| 22 | +### 2.0 (Optional) Preprocess masks |
| 23 | +In order to preprocess masks, run |
| 24 | +```bash |
| 25 | +preprocess_masks -d <dataset/path> [--depthdir depth_noise] [-c <path/to/config>] -m <output/mask/path> |
| 26 | +``` |
| 27 | +The program output will contain a lot of "Buffering failure." outputs. This is |
| 28 | +normal since we do not process every frame and just skip over non-mask frames. |
| 29 | +Thus, the buffering thread cannot always keep up pre-loading the next frame. |
| 30 | + |
| 31 | +The `--depthdir` argument is only needed for the synthetic scenes since the |
| 32 | +depth subfolder has this name. |
| 33 | + |
| 34 | +The `-c` option is needed e.g. for the robust tracking experiment with the |
| 35 | +TUM-RGBD-scenes where Mask R-CNN is instructed to only detect persons. |
| 36 | + |
| 37 | +### 2.1 Run EM-Fusion |
| 38 | + |
| 39 | +Go to the `build` folder of EM-Fusion and run the EM-Fusion executable. |
| 40 | + |
| 41 | +This is an example running EM-Fusion with preprocessed masks (the car4-full |
| 42 | +dataset extracted to `~/co-fusion-datasets/car4-full/` and preprocessed masks in |
| 43 | +a subfolder called `preproc_masks`). The output will contain more of the |
| 44 | +TensorFlow output seen in `preprocess_masks` if Mask R-CNN is run on-the-fly |
| 45 | +from EM-Fusion. |
| 46 | + |
| 47 | +```bash |
| 48 | +./EM-Fusion -d ~/co-fusion-datasets/car4-full/ --depthdir depth_noise \ |
| 49 | + -c ../config/default.cfg \ |
| 50 | + -m ~/co-fusion-datasets/car4-full/preproc_masks/ \ |
| 51 | + --3d-vis |
| 52 | +Reading from /home/streckus/co-fusion-datasets/car4-full// |
| 53 | +Buffer thread started with id: 139871750289152 |
| 54 | +Created new Object with ID: 1 |
| 55 | +Created new Object with ID: 2 |
| 56 | +Created new Object with ID: 3 |
| 57 | +Created new Object with ID: 4 |
| 58 | +Deleting Object 4 because it is not visible! |
| 59 | +Finished processing, press any key to end the program! |
| 60 | +Program ended successfully! |
| 61 | +``` |
| 62 | + |
| 63 | +While the program is running, you will see the following windows: |
| 64 | + |
| 65 | +| Main window | 3D visualization | |
| 66 | +| ---------------------------- | ------------------------ | |
| 67 | +|  |  | |
| 68 | +| This is the main window. It will be visible if not disabled with `--background`. When this window is active, you can pause the processing by pressing "P" or cancel the program with "Q". When the commandline output says "press any key to end the program", this window should be active for the program to register the key. | This is the 3D visualization window showing object and background meshes with their bounding boxes. It will only be visible when the `--3d-vis` flag is given. | |
| 69 | + |
| 70 | +# 3. Evaluate EM-Fusion |
| 71 | + |
| 72 | +If you export the results of EM-Fusion with `-e`, you can evaluate the poses |
| 73 | +numerically. For dynamic scene datasets, EM-Fusion has to "guess" the object |
| 74 | +centers, thus the object coordinate systems might not be well aligned with the |
| 75 | +ground truth. The authors of Co-Fusion provide a program to convert these poses: |
| 76 | +[convert_poses](https://github.com/martinruenz/dataset-tools/tree/master/convert_poses). |
| 77 | +The second bullet point (**How to compare an object-trajectory of your non-static SLAM-method with ground-truth data?**) |
| 78 | +[here](https://github.com/martinruenz/dataset-tools#howtos) explains how to use |
| 79 | +it. |
| 80 | + |
| 81 | +After converting the poses by using the first frame in the object trajectory as |
| 82 | +a reference, we evaluated numerical accuracy by scripts from the |
| 83 | +[TUM RGB-D benchmark](https://vision.in.tum.de/data/datasets/rgbd-dataset), |
| 84 | +namely [evaluate_ate.py](https://svncvpr.in.tum.de/cvpr-ros-pkg/trunk/rgbd_benchmark/rgbd_benchmark_tools/src/rgbd_benchmark_tools/evaluate_ate.py) |
| 85 | +and [evaluate_rpe.py](https://svncvpr.in.tum.de/cvpr-ros-pkg/trunk/rgbd_benchmark/rgbd_benchmark_tools/src/rgbd_benchmark_tools/evaluate_rpe.py). |
0 commit comments