Dungeon Maps is a powerful, lightweight PyTorch library for depth map manipulations, which is originally developed as a 2D mapping system for solving navigation problems: it can produce accurate 2D semantic top-down views from the depth map observations along with semantic segmentation predictions. See this Habitat object-goal navigation example:
output.mp4
Dungeon Maps also provides other functionalities, e.g. ego-centric motion flow calculation from depth maps. Scroll down to Demos to see more functionalities of this library.
This code is used by:
- HK Yang, TC Hsiao, et al. (2022). Investigation of Factorized Optical Flows as Mid-Level Representations. IROS 2022. Paper
- "Kemono", a rule-based object-goal navgiation agent for Habitat Challenge 2022. Ending2015a/kemono-habitat-2022
Version: 0.0.3a1
Batching | Multi-channels | GPU acceleration | |
---|---|---|---|
Orthographic projection (Top-down map) |
✔️ | ✔️ | ✔️ |
Egocentric motion flow | ✔️ | ✔️ | ✔️ |
3D affine transformation (Camera space) |
✔️ | ✔️ | ✔️ |
2D affine transformation (Top-down view) |
✔️ | ✔️ | ✔️ |
Map builder | ✔️ | ✔️ | ✔️ |
Basic requirements:
- Python >= 3.6
- PyTorch >= 1.8.0
- PyTorch Scatter
Install from pip
pip install dungeon_maps
Install from GitHub repo
pip install git+https://github.com.Ending2015a/dungeon_map.git@master
Install demos
pip install dungeon_maps[sim]
(Watch this video in high quality)
This example shows how to project depth maps to top-down maps.
- Top left: RGB
- Top right: Depth map
- Bottom left: top-down maps in local space
- Bottom right: top-down maps in global space
Run this example
python -m dungeon_maps.demos.height_map.run
Control: W
, A
, S
, D
. Q
for exit
(Watch this video in height quality)
This example shows how to project arbitrary value maps, e.g. semantic segmentation, to top-down maps.
- Top left: RGB
- Top center: Depth map
- Top right: Semantic segmentation
- Bottom left: top-down maps in local space
- Bottom right: top-down maps in global space
Run this example
python -m dungeon_maps.demos.object_map.run
Control: W
, A
, S
, D
. Q
for exit
(Watch this video in high quality)
This example shows how to calculate the flow fields caused by camera motion.
Run this example
python -m dungeon_maps.demos.ego_flow.run