colors.txt in FCN-ResNet18-Cityscapes-512x256.tar.gz has duplicate/incorrect RGB values for several classes
Describe the bug
The colors.txt bundled inside FCN-ResNet18-Cityscapes-512x256.tar.gz (release tag model-mirror-190618) contains RGB values that don't match the official Cityscapes color palette, including two exact duplicate rows. This causes segNet overlays to render the wrong color for those classes.
Steps to reproduce
wget https://github.com/dusty-nv/jetson-inference/releases/download/model-mirror-190618/FCN-ResNet18-Cityscapes-512x256.tar.gz tar -xzf FCN-ResNet18-Cityscapes-512x256.tar.gz cat -n FCN-ResNet18-Cityscapes-512x256/colors.txt
Class-to-color mapping (from classes.txt + colors.txt, 0-indexed)
| idx | class | current color | official Cityscapes | issue |
|---|---|---|---|---|
| 1 | ego_vehicle | 128 64 128 180 | 0 0 0 | exact duplicate of road (idx 3) |
| 3 | road | 128 64 128 180 | 128 64 128 | (correct, but see above) |
| 4 | sidewalk | 150 75 200 | 244 35 232 | wrong value (not a dupe, just off-palette) |
| 9 | traffic_light | 250 170 30 | 250 170 30 | correct |
| 10 | traffic_sign | 250 170 30 | 220 220 0 | exact duplicate of traffic_light (idx 9) |
Impact
Because traffic_sign maps to the identical RGB as traffic_light, segNet overlays draw traffic signs in the same orange as traffic lights instead of the expected yellow. Similarly ego_vehicle renders identical to road.
Notes for maintainer
I checked the repo for a script that generates this colors.txt (e.g. under tools/) -- cityscapes-prep.sh / cityscapes-prep2.sh only handle dataset file reorganization, not color assignment, so this file appears to be hand-authored and packaged directly into the release tarball rather than generated from source.
data/images/qa/groundtruth/cityscapes-512x256 in the repo were generated with the current (incorrect) colors, so they'd need regenerating alongside any fix.
I've opened a PR with a small tool (tools/cityscapes-colors.py) that regenerates colors.txt deterministically from the official Cityscapes label colors, which fixes this and would prevent this kind of drift in the future: https://github.com/dusty-nv/jetson-inference/pull/1953
Environment
Downloaded from: model-mirror-190618 release tag Affected file: FCN-ResNet18-Cityscapes-512x256/colors.txt
Source: dusty-nv/jetson-inference