Skip to content

Commit 1f522c1

Browse files
rename stuff_names to stuff_classes which is used in Visualizer
Summary: `stuff_classes` is the correct metadata name that' recognized by visualizer Pull Request resolved: #2620 Reviewed By: theschnitz Differential Revision: D26456369 Pulled By: ppwwyyxx fbshipit-source-id: 157ed4bb0d460d78490916671f8b39ca934181be
1 parent 0efef64 commit 1f522c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

detectron2/data/datasets/cityscapes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ def _cityscapes_files_to_dict(files, from_json, to_polygons):
315315
dicts = load_cityscapes_semantic(args.image_dir, args.gt_dir)
316316
logger.info("Done loading {} samples.".format(len(dicts)))
317317

318-
stuff_names = [k.name for k in labels if k.trainId != 255]
318+
stuff_classes = [k.name for k in labels if k.trainId != 255]
319319
stuff_colors = [k.color for k in labels if k.trainId != 255]
320-
meta = Metadata().set(stuff_names=stuff_names, stuff_colors=stuff_colors)
320+
meta = Metadata().set(stuff_classes=stuff_classes, stuff_colors=stuff_colors)
321321

322322
for d in dicts:
323323
img = np.array(Image.open(PathManager.open(d["file_name"], "rb")))

0 commit comments

Comments
 (0)