Ultralytics YOLO27: Join the waitlist.
License YOLO
Back to Ultralytics Glossary

Semantic Mapping

Semantic mapping builds a map that records what is where, such as roads, walls, doors, or people, by fusing segmentation, depth, and pose over time.

Semantic mapping is the process of building a spatial map of an environment in which every location carries a meaning, a class label such as road, sidewalk, wall, door, chair, or person, on top of its geometry. A geometric map tells a robot where surfaces are, and a semantic map also tells it what they are, so it can follow a request like "go to the kitchen table", keep off the lawn, or expect pedestrians near a crosswalk. Semantic maps combine semantic segmentation or object detection with depth sensing and localization, and they are a core part of perception for robotics, autonomous vehicles, and spatial computing.

How Semantic Mapping Works#

Each new camera frame goes through three steps. A segmentation model labels every pixel with a class. Depth from LiDAR, a stereo or RGB-D camera, or monocular depth estimation lifts the labeled pixels into 3D points, and the robot's pose, estimated by visual SLAM or odometry, places those points into the cells of a shared map. Finally, sensor fusion over time merges the new labels with everything each cell has accumulated so far, and moving objects get separate handling so that a person walking by does not become a permanent wall.

Ultralytics YOLO26 semantic segmentation models pretrained on Cityscapes label every pixel with one of 19 urban classes, including road, sidewalk, building, vegetation, person, and car, the per-frame input a street-level semantic map fuses.

Fusion is what turns noisy per-frame predictions into a reliable map. SemanticFusion, by John McCormac and colleagues at Imperial College London in 2017, kept a probability distribution over classes for every surface element and multiplied in each new network prediction, a recursive Bayesian update. This simulation applies the same update to a map of 1,000 cells observed by a segmentation model that is right 70% of the time:

import numpy as np

rng = np.random.default_rng(0)
num_cells, num_classes = 1000, 4  # map cells; classes such as road, sidewalk, building, vegetation
truth = rng.integers(0, num_classes, num_cells)

# Sensor model: segmentation labels a cell correctly 70% of the time, otherwise picks another class
likelihood = np.full((num_classes, num_classes), 0.1)
np.fill_diagonal(likelihood, 0.7)
log_belief = np.zeros((num_cells, num_classes))  # uniform prior in every cell

for frame in range(1, 11):
    # A new frame observes every cell from a new viewpoint, with independent errors
    wrong = rng.random(num_cells) > 0.7
    labels = np.where(wrong, (truth + rng.integers(1, num_classes, num_cells)) % num_classes, truth)

    # Recursive Bayesian update: add the log-likelihood of this observation to each cell's belief
    log_belief += np.log(likelihood[labels])
    if frame in (1, 3, 10):
        print(f"Frame {frame:>2}: {(log_belief.argmax(axis=1) == truth).mean():.1%} of cells correct")

The map is 69.6% correct after one frame, 80.6% after three, and 98.2% after ten. The gain depends on errors changing between observations, so fusion helps most when the robot sees each place from varied viewpoints, while a mistake the model repeats from every angle stays in the map. SemanticFusion reported the same pattern, with a larger improvement over single-frame labels on a dataset with more viewpoint variation.

Semantic maps range from 2D grids, where each cell of an occupancy map also stores a class, to labeled 3D point clouds, voxels, and meshes. MIT's Kimera builds a metric-semantic 3D mesh in real time, and 3D scene graphs organize the same information into objects, rooms, and buildings linked by relations. Open-vocabulary maps store CLIP embeddings instead of fixed classes, so a robot can search its map for any text query, such as "fire extinguisher".

Semantic mapping builds on several related tasks. Visual SLAM supplies the camera poses and geometric map. Occupancy mapping records only whether space is free, occupied, or unknown. Instance segmentation and panoptic segmentation separate individual objects, which object-level maps need to count chairs or track parked cars. Semantic search is an unrelated retrieval technique that shares only the word.

Real-World Applications#

  • Autonomous driving: High-definition maps record lanes, crosswalks, traffic lights, and curbs at centimeter-level accuracy, and online semantic mapping builds a bird's-eye-view map of the same elements from the car's own sensors.
  • Mobile robots: The ROS 2 navigation stack, Nav2, offers a semantic segmentation costmap layer that assigns a traversal cost to each class, so a robot plans paths over preferred surfaces.
  • Agriculture: Field robots and drones map crops and weeds row by row for targeted spraying and yield estimates.
  • Augmented reality: Apple's ARKit classifies each face of its reconstructed room mesh as wall, floor, ceiling, table, seat, window, door, or none.

Explore solutions

Computer vision in sports

Computer vision in sports

Discover how Ultralytics YOLO powers sports vision with player and ball tracking, performance analytics, coaching insights, and athlete rehabilitation.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning