Pictograph Research

PG-Pathformer

Pictograph Research · Semantic segmentation · Trained 2h ago · CC-BY-NC-4.0

Sign in to import View on Hugging Face

Model Card

PG-Pathformer

A semantic segmentation model (Segformer), trained on 32 classes, scoring 39.9% mIoU.

Pictograph Research · Semantic Segmentation · Segformer · FP32 · CC-BY-NC-4.0 · Public

Overview

This is a semantic segmentation model built on Segformer, trained on the Sidewalks-1k dataset. It expects 672x576 input and runs in FP32 precision. It predicts flat-road, flat-sidewalk, flat-crosswalk, flat-cyclinglane, flat-parkingdriveway, flat-curb, and 26 more.

Performance

Headline: 39.9% mIoU.

Metric Value
mIoU39.9%
Pixel accuracy83.5%
Dice49.3%

Per-class mIoU

Class mIoU
iou_background2.2%
iou_construction-bridge4.5%
iou_construction-building72.4%
iou_construction-door14.6%
iou_construction-fenceguardrail43.7%
iou_construction-stairs35.4%
iou_construction-wall41.5%
iou_flat-crosswalk63.9%
iou_flat-curb43.5%
iou_flat-cyclinglane67.4%
iou_flat-parkingdriveway42.3%
iou_flat-road73.2%
iou_flat-sidewalk86.5%
iou_human-person68.4%
iou_human-rider17.0%
iou_nature-terrain75.3%
iou_nature-vegetation82.0%
iou_object-pole35.0%
iou_object-trafficlight7.3%
iou_object-trafficsign32.5%
iou_sky94.1%
iou_vehicle-bicycle56.6%
iou_vehicle-bus0.0%
iou_vehicle-car83.6%
iou_vehicle-caravan0.0%
iou_vehicle-cartrailer0.0%
iou_vehicle-motorcycle0.0%
iou_vehicle-tramtrain0.0%
iou_vehicle-truck12.5%
iou_void-dynamic18.7%

Classes

Class index matches the model's output order.

# Class
0flat-road
1flat-sidewalk
2flat-crosswalk
3flat-cyclinglane
4flat-parkingdriveway
5flat-curb
6human-person
7human-rider
8vehicle-car
9vehicle-truck
10vehicle-bus
11vehicle-tramtrain
12vehicle-motorcycle
13vehicle-bicycle
14vehicle-caravan
15vehicle-cartrailer
16construction-building
17construction-door
18construction-wall
19construction-fenceguardrail
20construction-bridge
21construction-stairs
22object-pole
23object-trafficsign
24object-trafficlight
25nature-vegetation
26nature-terrain
27sky
28void-ground
29void-dynamic
30void-static
31void-unclear

Training

Setting Value
Base datasetSidewalks-1k
ExportSidewalks-1k-base
Dataset size1,000 images
Input size672x576
Epochs35
Batch size24
Learning rate0.0001
PrecisionFP32
Version1.0.0

Use this model

Run inference with the Pictograph SDK:

from pictograph import Client, get_model, SemanticSegmentationModel, SemanticSegmentationResult

client = Client(api_key="pk_live_...")  # Settings -> API Keys

# Downloads + caches the weights on first use
model: SemanticSegmentationModel = get_model(
    name="PG-Pathformer",
    task="semantic_segmentation",
    format="onnx",
    precision="fp32",
    device="cpu",
    client=client,
)
result: SemanticSegmentationResult = model.predict(image="photo.jpg")
print(result)
# Fully offline (no API key) once you have the weights + config.json
from pictograph import load_model, SemanticSegmentationModel, SemanticSegmentationResult

model: SemanticSegmentationModel = load_model(
    "/path/to/weights.onnx",
    "/path/to/config.json",
    task="semantic_segmentation",
    format="onnx",
)
result: SemanticSegmentationResult = model.predict(image="photo.jpg")

License

Released under CC-BY-NC-4.0.

Download the model files

Exports to ONNX · 26 MB · FP32. Sign in to download the weights and config, or pull it from the SDK with the Get code snippet.

Sign in to download
Creative Commons Attribution-NonCommercial 4.0 Data / content

Allows use and adaptation with credit, but not for commercial purposes.

Read the full Creative Commons Attribution-NonCommercial 4.0 →

Join the discussion

Comments and reactions live in the app.

Sign in to comment

Build your first vision tool

$25 of free compute to start. No card required.