|
@@ -49,6 +49,32 @@ class BaseINAT_Annotations(BBoxMixin, PartsMixin, BaseAnnotations):
|
|
|
def meta(self):
|
|
|
raise NotImplementedError
|
|
|
|
|
|
+class INAT20_Annotations(BaseINAT_Annotations):
|
|
|
+
|
|
|
+ name="INAT20"
|
|
|
+
|
|
|
+ @property
|
|
|
+ def meta(self):
|
|
|
+ info = _MetaInfo(
|
|
|
+ images_folder="images",
|
|
|
+ content="trainval.json",
|
|
|
+ val_content="val.json",
|
|
|
+
|
|
|
+ # fake bounding boxes: the whole image
|
|
|
+ bounding_box_dtype=np.dtype([(v, np.int32) for v in "xywh"]),
|
|
|
+
|
|
|
+ parts_file=join("parts", "part_locs.txt"),
|
|
|
+ part_names_file=join("parts", "parts.txt"),
|
|
|
+ )
|
|
|
+
|
|
|
+ info.structure = [
|
|
|
+ [info.content, "_content"],
|
|
|
+ [info.val_content, "_val_content"],
|
|
|
+ [info.parts_file, "_part_locs"],
|
|
|
+ [info.part_names_file, "_part_names"],
|
|
|
+ ]
|
|
|
+ return info
|
|
|
+
|
|
|
class INAT19_Annotations(BaseINAT_Annotations):
|
|
|
|
|
|
name="INAT19"
|