Publish PG-Pathformer from Pictograph
Browse filesFiles changed (3)
- README.mdAdded+163
- config.jsonAdded+152
- pg-pathformer.onnxAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163---license: cc-by-nc-4.0library_name: onnxpipeline_tag: image-segmentationpretty_name: "PG-Pathformer"datasets: - pictograph/sidewalks-1ktags: - computer-vision - onnx - image-segmentation - segformer - pictographmodel-index: - name: "PG-Pathformer" results: - task: type: image-segmentation dataset: type: "pictograph/sidewalks-1k" name: "Sidewalks-1k" metrics: - type: "mIoU" value: 0.3985 name: "mIoU" - type: "pixel_accuracy" value: 0.8353 name: "Pixel accuracy" - type: "dice" value: 0.4929 name: "Dice"---
[](https://pictograph.io/models/pictograph-research/pg-pathformer)
[](https://pictograph.io/models/pictograph-research/pg-pathformer)    [](https://creativecommons.org/licenses/by-nc/4.0/)
**[View on Pictograph](https://pictograph.io/models/pictograph-research/pg-pathformer)** · [Pictograph Research](https://pictograph.io/org/pictograph-research) · Semantic Segmentation · Segformer · FP32 · [Creative Commons Attribution-NonCommercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
## Overview
This is a semantic segmentation model built on **Segformer**, trained on the [Sidewalks-1k](https://huggingface.co/datasets/pictograph/sidewalks-1k) dataset. It expects **672x576** input and runs in FP32 precision. The ONNX weights are in this repo; run them with the Pictograph SDK (below) or [open the model on Pictograph](https://pictograph.io/models/pictograph-research/pg-pathformer) to test it in-browser, call the hosted API, or deploy it as an always-on endpoint.
## Performance
Headline: **39.9% mIoU**.
| Metric | Value || :--- | ---: || mIoU | 39.9% || Pixel accuracy | 83.5% || Dice | 49.3% |
## Classes
Class index matches the model's output order.
| # | Class || ---: | :--- || 0 | flat-road || 1 | flat-sidewalk || 2 | flat-crosswalk || 3 | flat-cyclinglane || 4 | flat-parkingdriveway || 5 | flat-curb || 6 | human-person || 7 | human-rider || 8 | vehicle-car || 9 | vehicle-truck || 10 | vehicle-bus || 11 | vehicle-tramtrain || 12 | vehicle-motorcycle || 13 | vehicle-bicycle || 14 | vehicle-caravan || 15 | vehicle-cartrailer || 16 | construction-building || 17 | construction-door || 18 | construction-wall || 19 | construction-fenceguardrail || 20 | construction-bridge || 21 | construction-stairs || 22 | object-pole || 23 | object-trafficsign || 24 | object-trafficlight || 25 | nature-vegetation || 26 | nature-terrain || 27 | sky || 28 | void-ground || 29 | void-dynamic || 30 | void-static || 31 | void-unclear |
## Training
| Setting | Value || :--- | :--- || Base dataset | [Sidewalks-1k](https://huggingface.co/datasets/pictograph/sidewalks-1k) || Dataset size | 1,000 images || Input size | 672x576 || Epochs | 35 || Batch size | 24 || Learning rate | 0.0001 || Precision | FP32 || Version | 1.0.0 |
## Use this model
The weights ship as ONNX (`pg-pathformer.onnx`) with a `config.json`. The Pictograph SDK applies the model's exact pre/post-processing for you:
### [Pictograph SDK](https://pictograph.io/docs)
```bashpip install "pictograph[inference]"```
```pythonfrom huggingface_hub import hf_hub_downloadfrom pictograph import load_model, SemanticSegmentationModel
onnx = hf_hub_download("pictograph/pg-pathformer", "pg-pathformer.onnx")config = hf_hub_download("pictograph/pg-pathformer", "config.json")
model: SemanticSegmentationModel = load_model(onnx, config, task="semantic_segmentation")result = model.predict("scene.jpg") # SemanticSegmentationResult: per-class regionsfor p in result.predictions: print(f"{p.name} region {len(p.polygon.paths[0])} pts")```
**Example output** (illustrative; your exact values depend on the image):
```textflat-road region 86 ptsflat-sidewalk region 34 pts```
<details><summary><b>Raw ONNX Runtime</b> (no SDK)</summary>
```pythonfrom huggingface_hub import hf_hub_downloadimport onnxruntime as ort
onnx = hf_hub_download("pictograph/pg-pathformer", "pg-pathformer.onnx")sess = ort.InferenceSession(onnx, providers=["CPUExecutionProvider"])inp = sess.get_inputs()[0]print(inp.name, inp.shape) # NCHW float32; input size + normalization in config.json# outputs = sess.run(None, {inp.name: preprocessed_batch})# Decoding is architecture-specific; the Pictograph SDK (above) does it for you.```
</details>
- Test it in-browser, call the hosted API, or deploy an endpoint: [open the model on Pictograph](https://pictograph.io/models/pictograph-research/pg-pathformer).- SDK + local inference guide: [docs](https://pictograph.io/docs/local-inference).
## License
Released under [Creative Commons Attribution-NonCommercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/), the license of its training data, [sidewalk-semantic (Segments.ai)](https://huggingface.co/datasets/segments/sidewalk-semantic). Non-commercial use only: when you use this model, please credit **Segments.ai (2021)**.
---
*Trained and published with [Pictograph](https://pictograph.io/models/pictograph-research/pg-pathformer) - annotate, train, and deploy from one API.*
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152{ "_pictograph": { "architecture": "sm_pytorch", "class_mapping": { "classes": [ "flat-road", "flat-sidewalk", "flat-crosswalk", "flat-cyclinglane", "flat-parkingdriveway", "flat-curb", "human-person", "human-rider", "vehicle-car", "vehicle-truck", "vehicle-bus", "vehicle-tramtrain", "vehicle-motorcycle", "vehicle-bicycle", "vehicle-caravan", "vehicle-cartrailer", "construction-building", "construction-door", "construction-wall", "construction-fenceguardrail", "construction-bridge", "construction-stairs", "object-pole", "object-trafficsign", "object-trafficlight", "nature-vegetation", "nature-terrain", "sky", "void-ground", "void-dynamic", "void-static", "void-unclear" ] }, "class_names": [ "flat-road", "flat-sidewalk", "flat-crosswalk", "flat-cyclinglane", "flat-parkingdriveway", "flat-curb", "human-person", "human-rider", "vehicle-car", "vehicle-truck", "vehicle-bus", "vehicle-tramtrain", "vehicle-motorcycle", "vehicle-bicycle", "vehicle-caravan", "vehicle-cartrailer", "construction-building", "construction-door", "construction-wall", "construction-fenceguardrail", "construction-bridge", "construction-stairs", "object-pole", "object-trafficsign", "object-trafficlight", "nature-vegetation", "nature-terrain", "sky", "void-ground", "void-dynamic", "void-static", "void-unclear" ], "created_at": "2026-12-03T21:34:54.508621+00:00", "dataset_name": "Sidewalks-1k", "export_name": "Sidewalks-1k-base", "frameworks": [ "onnx", "pytorch" ], "input_shape": [ 576, 672 ], "model_type": "semantic_segmentation", "name": "PG-Pathformer", "num_classes": 32, "pipeline": "sm_pytorch", "precision": "fp32", "schema_version": 1 }, "training": { "architecture": "Segformer", "augmentation": { "framework": { "perspective": 0.0 }, "ops": [ { "op": "flip", "p": 0.5 } ] }, "batch_size": 24, "classes": [ "flat-road", "flat-sidewalk", "flat-crosswalk", "flat-cyclinglane", "flat-parkingdriveway", "flat-curb", "human-person", "human-rider", "vehicle-car", "vehicle-truck", "vehicle-bus", "vehicle-tramtrain", "vehicle-motorcycle", "vehicle-bicycle", "vehicle-caravan", "vehicle-cartrailer", "construction-building", "construction-door", "construction-wall", "construction-fenceguardrail", "construction-bridge", "construction-stairs", "object-pole", "object-trafficsign", "object-trafficlight", "nature-vegetation", "nature-terrain", "sky", "void-ground", "void-dynamic", "void-static", "void-unclear" ], "early_stopping": true, "early_stopping_patience": 5, "encoder": "efficientnet-b1", "encoder_weights": "imagenet", "epochs": 35, "freeze_epochs": 5, "image_height": 576, "image_width": 672, "learning_rate": 0.0001, "precision": "fp32", "two_stage_training": true }}123version https://git-lfs.github.com/spec/v1oid sha256:bfc0c53c671ffbcf1e943fbc2c3e4d6613e3c957472cbe6200bf99b6404215d9size 26378075README.mdAdded+163
config.jsonAdded+152
pg-pathformer.onnxAdded+3