Skip to content

Commit

Permalink
Checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Kadir Yilmaz committed Jan 12, 2024
1 parent af02fa2 commit c4e6efd
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Mask4D: Mask Transformer for 4D Panoptic Segmentation
# MASK4D: Mask Transformer for 4D Panoptic Segmentation
<div align="center">
<a href="https://github.com/YilmazKadir/">Kadir Yilmaz</a>,
<a href="https://jonasschult.github.io/">Jonas Schult</a>,
Expand All @@ -7,7 +7,7 @@

RWTH Aachen University

Mask4D is a transformer-based model for 4D Panoptic Segmentation, achieving a new state-of-the-art performance on the SemanticKITTI test set.
MASK4D is a transformer-based model for 4D Panoptic Segmentation, achieving a new state-of-the-art performance on the SemanticKITTI test set.

<a href="https://pytorch.org/get-started/locally/"><img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-ee4c2c?logo=pytorch&logoColor=white"></a>
<a href="https://pytorchlightning.ai/"><img alt="Lightning" src="https://img.shields.io/badge/-Lightning-792ee5?logo=pytorchlightning&logoColor=white"></a>
Expand Down Expand Up @@ -66,22 +66,34 @@ python -m datasets.preprocessing.semantic_kitti_preprocessing make_instance_data
```

### Training and testing
Train Mask4D:
Train MASK4D:
```bash
python main_panoptic.py
```
Please refer to the [config scripts](https://github.com/YilmazKadir/Mask4D/tree/main/scripts) for detailed instructions how to reproduce our results.

In the simplest case the inference command looks as follows:
```bash
python main_panoptic.py \
general.mode="validate" \
general.ckpt_path='PATH_TO_CHECKPOINT.ckpt'
```

Or you can use DBSCAN to boost the scores even further:
```bash
python main_panoptic.py \
general.mode="validate" \
general.ckpt_path='PATH_TO_CHECKPOINT.ckpt' \
general.dbscan_eps=1.0
```
## Trained checkpoint
[MASK4D](https://omnomnom.vision.rwth-aachen.de/data/mask4d/mask4d.ckpt)

The provided model, trained after the submission, achieves 71.1 LSTQ without DBSCAN and 71.5 with DBSCAN post-processing.

## BibTeX
```
@articl{yilmaz2023mask4d,
title = {{Mask4D: Mask Transformer for 4D Panoptic Segmentation}},
@article{yilmaz2023mask4d,
title = {{MASK4D: Mask Transformer for 4D Panoptic Segmentation}},
author = {Yilmaz, Kadir and Schult, Jonas and Nekrasov, Alexey and Leibe, Bastian},
journal = {arXiv prepring arXiv:2309.16133},
year = {2023}
Expand Down
2 changes: 1 addition & 1 deletion conf/config_panoptic_4d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ general:
ckpt_path: null
project_name: mask4d
workspace: kadiryilmaz
instance_population: 10
instance_population: 20
dbscan_eps: null
experiment_name: ${now:%Y-%m-%d_%H%M%S}
save_dir: saved/${general.experiment_name}
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h2 class="title is-3">Video</h2>
<section class="section" id="BibTeX">
<div class="container is-max-desktop content">
<h2 class="title">BibTeX</h2>
<pre><code>@articl{yilmaz2023mask4d,
<pre><code>@article{yilmaz2023mask4d,
title = {{Mask4D: Mask Transformer for 4D Panoptic Segmentation}},
author = {Yilmaz, Kadir and Schult, Jonas and Nekrasov, Alexey and Leibe, Bastian},
journal = {arXiv prepring arXiv:2309.16133},
Expand Down
5 changes: 4 additions & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ export OMP_NUM_THREADS=12 # speeds up MinkowskiEngine
export CUDA_LAUNCH_BLOCKING=1
export HYDRA_FULL_ERROR=1

EXPERIMENT_NAME="2024-01-01_000000"

python main_panoptic.py \
general.mode="test" \
general.ckpt_path='/home/yilmaz/fix/Mask4D/saved/2023-09-30_153832/last-epoch.ckpt'
general.ckpt_path="saved/$EXPERIMENT_NAME/last-epoch.ckpt" \
general.dbscan_eps=1.0
5 changes: 4 additions & 1 deletion scripts/val.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ export OMP_NUM_THREADS=12 # speeds up MinkowskiEngine
export CUDA_LAUNCH_BLOCKING=1
export HYDRA_FULL_ERROR=1

EXPERIMENT_NAME="2024-01-01_000000"

python main_panoptic.py \
general.mode="validate" \
general.ckpt_path='/home/yilmaz/fix/Mask4D/saved/2023-09-30_153832/last-epoch.ckpt'
general.ckpt_path="saved/$EXPERIMENT_NAME/last-epoch.ckpt" \
general.dbscan_eps=1.0
3 changes: 3 additions & 0 deletions trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ def validation_epoch_end(self, outputs):
dd["val_mean_loss_dice"] = statistics.mean(
[item for item in [v for k, v in dd.items() if "loss_dice" in k]]
)
dd["val_mean_loss_box"] = statistics.mean(
[item for item in [v for k, v in dd.items() if "loss_box" in k]]
)

self.log_dict(dd)

Expand Down

0 comments on commit c4e6efd

Please sign in to comment.