docs: add Trans4Map model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: image-segmentation
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- vision-transformer
|
| 7 |
+
- bird-eye-view
|
| 8 |
+
- semantic-mapping
|
| 9 |
+
- egocentric-vision
|
| 10 |
+
- matterport3d
|
| 11 |
+
- replica
|
| 12 |
+
- pytorch
|
| 13 |
+
- wacv-2023
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Trans4Map Model Zoo
|
| 17 |
+
|
| 18 |
+
Official model repository for **Trans4Map: Revisiting Holistic Bird's-Eye-View Mapping from Egocentric Images to Allocentric Semantics with Vision Transformers** (WACV 2023).
|
| 19 |
+
|
| 20 |
+
- **GitHub Repository:** [InSAI-Lab/Trans4Map](https://github.com/InSAI-Lab/Trans4Map)
|
| 21 |
+
- **Paper:** [arXiv:2207.06205](https://arxiv.org/abs/2207.06205)
|
| 22 |
+
- **Dataset / Ground Truth:** [InSAI-Lab/Trans4Map (Dataset Hub)](https://huggingface.co/datasets/InSAI-Lab/Trans4Map)
|
| 23 |
+
- **Demo Video:** [Trans4Map Video Demo](https://yangkailun.com/videos/trans4map.mp4)
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## Architecture
|
| 28 |
+
|
| 29 |
+
Trans4Map proposes an end-to-end one-stage Transformer-based framework for Bird's-Eye-View mapping:
|
| 30 |
+
1. **Transformer Encoder:** Efficient Transformer backbone (e.g. SegFormer MiT-B2, MiT-B4) extracts rich contextual features from egocentric image batches.
|
| 31 |
+
2. **Bidirectional Allocentric Memory (BAM):** Projects egocentric features into an allocentric memory space.
|
| 32 |
+
3. **Map Decoder:** Parses accumulated memory and predicts the complete top-down semantic segmentation map.
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## Benchmark Results (Matterport3D)
|
| 37 |
+
|
| 38 |
+
| Method | Backbone | mIoU (%) | Checkpoint |
|
| 39 |
+
| :--- | :--- | :---: | :---: |
|
| 40 |
+
| ConvNeXt | ConvNeXt-T | 35.91 | - |
|
| 41 |
+
| ConvNeXt | ConvNeXt-S | 36.49 | - |
|
| 42 |
+
| FAN | FAN-T | 31.07 | - |
|
| 43 |
+
| FAN | FAN-S | 34.62 | - |
|
| 44 |
+
| Swin | Swin-T | 34.19 | - |
|
| 45 |
+
| Swin | Swin-S | 36.80 | - |
|
| 46 |
+
| **Trans4Map** | **MiT-B2** | **40.02** | [`Tran4Map_B2_20points.pkl`](https://huggingface.co/InSAI-Lab/Trans4Map/resolve/main/Tran4Map_B2_20points.pkl) |
|
| 47 |
+
| **Trans4Map** | **MiT-B4** | **40.88** | [`Tran4Map_B4_20points.pkl`](https://huggingface.co/InSAI-Lab/Trans4Map/resolve/main/Tran4Map_B4_20points.pkl) |
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Quick Start & Evaluation
|
| 52 |
+
|
| 53 |
+
### Download Checkpoints:
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
# Download MiT-B2 model
|
| 57 |
+
hf download InSAI-Lab/Trans4Map Tran4Map_B2_20points.pkl --local-dir ./checkpoints
|
| 58 |
+
|
| 59 |
+
# Download MiT-B4 model
|
| 60 |
+
hf download InSAI-Lab/Trans4Map Tran4Map_B4_20points.pkl --local-dir ./checkpoints
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
### Python Evaluation Example:
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
python build_test_data_feature.py
|
| 67 |
+
python test.py
|
| 68 |
+
python eval/eval.py
|
| 69 |
+
python eval/eval_bfscore.py
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## Citation
|
| 75 |
+
|
| 76 |
+
```bibtex
|
| 77 |
+
@inproceedings{chen2023trans4map,
|
| 78 |
+
title={Trans4Map: Revisiting Holistic Bird's-Eye-View Mapping from Egocentric Images to Allocentric Semantics with Vision Transformers},
|
| 79 |
+
author={Chen, Chang and Zhang, Jiaming and Yang, Kailun and Peng, Kunyu and Stiefelhagen, Rainer},
|
| 80 |
+
booktitle={2023 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
|
| 81 |
+
year={2023}
|
| 82 |
+
}
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
## License
|
| 86 |
+
|
| 87 |
+
This repository is licensed under the [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
|