Unverified Commit c399c3f4 authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

add background category to prototype VOC dataset (#5687)

parent 9a9ae1ef
......@@ -219,4 +219,8 @@ class VOC(Dataset):
dp = Filter(archive_dp, self._filter_anns)
dp = Mapper(dp, self._parse_detection_ann, input_col=1)
return sorted({instance["name"] for _, anns in dp for instance in anns["object"]})
categories = sorted({instance["name"] for _, anns in dp for instance in anns["object"]})
# We add a background category to be used during segmentation
categories.insert(0, "__background__")
return categories
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment