Skip to content

Commit

Permalink
fix(opendataset): remove Classification and Box2D label in HalpeFullBody
Browse files Browse the repository at this point in the history
the label format of Box2D is not uniform in the dataset
issue link: Fang-Haoshu/Halpe-FullBody#4

annotations for "hoi" in Classification label lack important
information

PR Closed: #452
  • Loading branch information
YiweiLi4 authored and linjiX committed Apr 25, 2021
1 parent e906c96 commit 4e955f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
14 changes: 0 additions & 14 deletions tensorbay/opendataset/HalpeFullBody/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,19 +270,5 @@
"visible": "TERNARY"
}
]
},
"BOX2D": {},
"CLASSIFICATION": {
"attributes": [
{
"name": "hoi",
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 600
}
}
]
}
}
7 changes: 1 addition & 6 deletions tensorbay/opendataset/HalpeFullBody/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from ...dataset import Data, Dataset
from ...geometry import Keypoint2D
from ...label import Classification, LabeledBox2D, LabeledKeypoints2D
from ...label import LabeledKeypoints2D

DATASET_NAME = "HalpeFullBody"

Expand Down Expand Up @@ -83,9 +83,4 @@ def _get_data(image_path: str, annotation: Dict[str, Any]) -> Data:

data.label.keypoints2d = [keypoints]

data.label.box2d = [LabeledBox2D.from_xywh(*annotation["bbox"])]

if "hoi" in annotation.keys():
data.label.classification = Classification(attributes={"hoi": annotation["hoi"]})

return data

0 comments on commit 4e955f0

Please sign in to comment.