Skip to content

Commit

Permalink
refactor(opendataset): remove relucdant attributes of BDD100K dataset
Browse files Browse the repository at this point in the history
remove the "areaType" of "POLYGON" and the "laneTypes" of "POLYLINE2D"
  • Loading branch information
marshallmallows committed Nov 22, 2021
1 parent 5d5cf30 commit 5ee0e40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
21 changes: 1 addition & 20 deletions tensorbay/opendataset/BDD100K/catalog_100k.json
Expand Up @@ -64,13 +64,7 @@
]
},
"POLYGON": {
"categories": [{ "name": "direct" }, { "name": "alternative" }, { "name": "unknown" }],
"attributes": [
{
"name": "areaType",
"enum": ["direct", "alternative"]
}
]
"categories": [{ "name": "direct" }, { "name": "alternative" }, { "name": "unknown" }]
},
"POLYLINE2D": {
"isBeizerCurve": true,
Expand All @@ -92,19 +86,6 @@
{
"name": "laneStyle",
"enum": ["solid", "dashed"]
},
{
"name": "laneTypes",
"enum": [
"crosswalk",
"double other",
"double white",
"double yellow",
"road curb",
"single other",
"single white",
"single yellow"
]
}
]
}
Expand Down
5 changes: 3 additions & 2 deletions tensorbay/opendataset/BDD100K/loader.py
Expand Up @@ -265,14 +265,15 @@ def _add_poly2d_label_100k(
labeled_polygon = LabeledPolygon(
points=poly2d_info["vertices"],
category=label_info["category"],
attributes=label_info["attributes"],
)
polygon.append(labeled_polygon)
else:
attributes = label_info["attributes"]
attributes.pop("laneTypes", None)
labeled_polyline2d = LabeledPolyline2D(
points=poly2d_info["vertices"],
category=label_info["category"],
attributes=label_info.get("attributes", {}),
attributes=attributes,
beizer_point_types=poly2d_info["types"],
)
polyline2d.append(labeled_polyline2d)
Expand Down

0 comments on commit 5ee0e40

Please sign in to comment.