Bayesian semantic mapping

Fuses noisy observations into an occupancy (log-odds) + semantic-label map that converges to ground truth.

Trained from scratch in Ropedia Academy β€” an interactive, bilingual course on embodied & spatial AI. Educational model: small and quick to train; the value is the method and a reproducible pipeline, not a leaderboard score. Try it live in the Ropedia demos Space.

At a glance

Base model Trained from scratch (random initialization) β€” no pretrained base model.
Task occupancy + semantic mapping
Training objective Bayesian log-odds occupancy + per-cell semantic-label counting (no gradient training).
Track D Β· Scene & world models
Notebook Open In Colab

Dataset

  • Name: 2D grid world
  • Type: synthetic β€” procedural
  • Size / stats: 32Γ—32 cells, 4 semantic classes; ~60 noisy observations/step (p_occ=0.8, p_label=0.7)
  • Split: single map
  • Source: procedural

Training config

No gradient training β€” Bayesian log-odds occupancy + label counting over ~300 observation rounds.

Evaluation results

metric value meaning
history (final) 1.0

figure

Inference example

import torch
state = torch.load("labels.npy", map_location="cpu")   # this repo's checkpoint
# Rebuild the exact module from the lab notebook (see "Reproduce"), then:
# model.load_state_dict(state); model.eval()

Limitations

Educational scale. Trained quickly on CPU on small or synthetic data, so absolute numbers are not competitive with production systems β€” the value is the method and a reproducible pipeline. No large-scale data, no hyperparameter sweep, and no multi-seed variance is reported. Not for production use.

Failure cases

Mis-set sensor probabilities make the map over/under-confident; dynamic objects smear across cells.

Reproduce / train your own

One click: open the notebook in Colab β†’ Runtime β†’ GPU β†’ Run all, then run its Publish to the Hugging Face Hub cell.

Open In Colab

From a shell:

git clone https://github.com/ChaoYue0307/ropedia-academy.git && cd ropedia-academy
pip install torch numpy matplotlib scikit-learn scikit-image gymnasium
jupyter nbconvert --to notebook --execute notebooks/training/D_semantic_mapping.ipynb --output run.ipynb
# optional: override training length, e.g.  STEPS=2000  (or EPISODES=600)  before running

Files

  • figure.png
  • labels.npy
  • metrics.json
  • occ.npy

License

Code & weights: MIT (this repository) β€” educational use encouraged.
Data: generated procedurally in the notebook β€” no external dataset.

Citation

If you use this model or the course materials, please cite:

@misc{ropedia_academy,
  title  = {Ropedia Academy: an interactive course on embodied & spatial AI},
  author = {Ropedia Academy},
  year   = {2026},
  howpublished = {\url{https://chaoyue0307.github.io/ropedia-academy/}}
}

Method / original work: Moravec & Elfes, High-Resolution Maps from Wide-Angle Sonar (occupancy grids), 1985; McCormac et al., SemanticFusion, ICRA 2017.

Related assets


Part of the Ropedia Academy trained-model collection. Contributions & issues welcome on GitHub.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including cy0307/d-semantic-mapping