Skip to content

Commit 114e05a

Browse files
committed
Initial commit
0 parents  commit 114e05a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+9084
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.png filter=lfs diff=lfs merge=lfs -text

CMakeLists.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
##
2+
## This file is part of EM-Fusion.
3+
##
4+
## Copyright (C) 2020 Embodied Vision Group, Max Planck Institute for Intelligent Systems, Germany.
5+
## Developed by Michael Strecke <mstrecke at tue dot mpg dot de>.
6+
## For more information see <https://emfusion.is.tue.mpg.de>.
7+
## If you use this code, please cite the respective publication as
8+
## listed on the website.
9+
##
10+
## EM-Fusion is free software: you can redistribute it and/or modify
11+
## it under the terms of the GNU General Public License as published by
12+
## the Free Software Foundation, either version 3 of the License, or
13+
## (at your option) any later version.
14+
##
15+
## EM-Fusion is distributed in the hope that it will be useful,
16+
## but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
## GNU General Public License for more details.
19+
##
20+
## You should have received a copy of the GNU General Public License
21+
## along with EM-Fusion. If not, see <https://www.gnu.org/licenses/>.
22+
##
23+
24+
cmake_minimum_required(VERSION 3.0)
25+
project(EM-Fusion)
26+
27+
include_directories("${PROJECT_SOURCE_DIR}/include/")
28+
29+
if (NOT MASKRCNN_ROOT_DIR)
30+
set(MASKRCNN_ROOT_DIR "${PROJECT_SOURCE_DIR}/external/Mask_RCNN")
31+
endif()
32+
if (NOT MASKRCNN_VENV_DIR)
33+
set(MASKRCNN_VENV_DIR "${MASKRCNN_ROOT_DIR}/venv")
34+
endif()
35+
36+
add_subdirectory( src )
37+
add_subdirectory( apps )

EXAMPLE.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
| ![Output](images/output.png) | ![3D](images/3d-vis.png) |
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

Comments
 (0)