Skip to content

Mask2Former examples

Each example is a complete JSON file with one epoch, batch size 2, and no pretrained weight download. Prepare your dataset first, then activate .venv and run commands from the Fusion checkout.

The config

ZOD with both camera and LiDAR (configs/examples/zod/mask2former/fusion.json):

configs/examples/zod/mask2former/fusion.json
{
  "extends": "mask2former",
  "Summary": "ZOD: mask2former fusion, one epoch",
  "tags": [
    "zod",
    "mask2former",
    "fusion",
    "one-epoch"
  ],
  "CLI": {
    "mode": "fusion"
  },
  "Dataset": {
    "dataset_root": "$ZOD_DATA_DIR",
    "annotation_path": "annotation_fusion"
  },
  "Log": {
    "logdir": "logs/zod/mask2former/fusion"
  },
  "General": {
    "device": "cuda:0",
    "epochs": 1,
    "batch_size": 2,
    "seed": 0,
    "early_stop_patience": 1,
    "max_checkpoints": 1
  },
  "Mask2Former": {
    "warmup_epochs": 0,
    "pretrained": false
  }
}

Other datasets and inputs

Download the file for your dataset and input. Save it under any name and pass it to -c.

Dataset Camera only LiDAR only Camera + LiDAR
ZOD ($ZOD_DATA_DIR) rgb.json lidar.json fusion.json
Waymo ($WAYMO_DATA_DIR) rgb.json lidar.json fusion.json
Iseauto ($ISEAUTO_DATA_DIR) rgb.json lidar.json fusion.json

The files differ only in these keys:

Key Values
CLI.mode rgb, lidar, or fusion
Dataset.dataset_root $ZOD_DATA_DIR, $WAYMO_DATA_DIR, or $ISEAUTO_DATA_DIR: export the folder you prepared
Dataset.annotation_path ZOD: annotation_camera_only, annotation_lidar_only, annotation_fusion; Waymo and Iseauto: annotation
Log.logdir logs/<dataset>/mask2former/<mode>, so runs do not overwrite each other
Summary, tags the run's name and labels in Visin

Run

Run all four stages
visin-fusion run -c configs/examples/zod/mask2former/fusion.json --upload --benchmark-device cuda

On a CPU host, replace cuda with cpu. --upload enables prediction-image uploads when Visin reporting is configured. One epoch is a pipeline check, not an accuracy baseline. extends names a built-in model preset, so no parent config file is required.

Next: Run and inspect the outputs or customize a run.