﻿# ScanNet200 labels: valid category IDs are not contiguous classifier indices

Keep the ScanNet200 category mapping, updated annotation table and network output ordering together so compact training indices return to the correct benchmark labels.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-scannet200-valid-class-ids-not-contiguous-output-index/
Language: en

## Identify the vocabulary before the tensor

A scene segmenter exports a dense class index for every mesh vertex, and its output file is accepted by a local parser. Acceptance does not prove those indices identify the intended ScanNet200 categories. The output channel position, the dataset’s valid category identifier and the original annotation name belong to related but different spaces. Preserve their mapping explicitly instead of inferring semantic identity from array length or the fact that the prediction contains integers.

## Use the benchmark’s annotation mapping

The [ScanNet200 preprocessing documentation](https://raw.githubusercontent.com/ScanNet/ScanNet/master/BenchmarkScripts/ScanNet200/README.md) explains that the benchmark shares raw scans with ScanNet while using an expanded vocabulary and an updated annotation mapping table. Reusing an older cached table can therefore change how a raw annotation enters the evaluation vocabulary. Keep the table revision with preprocessing results. A successful scene download does not demonstrate that an unrelated local label cache implements the intended benchmark’s semantic conversion.

## Distinguish IDs from positions

The [author constants](https://raw.githubusercontent.com/ScanNet/ScanNet/master/BenchmarkScripts/ScanNet200/scannet200_constants.py) enumerate valid identifiers and corresponding class names. Those identifiers are not a simple consecutive channel numbering. Construct the compact training mapping and its inverse from the selected vocabulary, then test that each named category survives a round trip. A channel permutation can leave tensor dimensions and overall value ranges unchanged while systematically exchanging the meaning of predicted furniture or structural classes across every scene.

## Trace the preprocessing output contract

The [preprocessing implementation](https://raw.githubusercontent.com/ScanNet/ScanNet/master/BenchmarkScripts/ScanNet200/preprocess_scannet200.py) builds semantic and instance annotations as separate outputs. Keep those concepts separate when writing a compact model cache: an object-instance identifier is not a semantic category merely because both are integer arrays over vertices. Document how excluded or unannotated elements enter the loss and the final prediction file. Any ignore policy should remain explicit rather than silently borrowing the meaning of a convenient background channel.

## Test a named-category round trip

Choose annotated vertices from recognizable categories, pass them through preprocessing, training-index conversion and prediction export, then verify the restored dataset identifiers against the retained table. Repeat after changing vocabularies or loading a checkpoint from another segmentation setup. [Entity-aware splits](/journal/data-guide-entity-group-split-design/) preserve scene independence; [software reproducibility](/journal/software-stack-reproducibility/) preserves label tables and mapping code. Report the vocabulary and conversion together, so a functioning classifier interface does not conceal a semantic mismatch at the benchmark boundary.
