Commit eab82b2d authored by Yuxin Wu's avatar Yuxin Wu

update docs

parent 691375cd
...@@ -162,7 +162,7 @@ class COCODetection(DatasetSplit): ...@@ -162,7 +162,7 @@ class COCODetection(DatasetSplit):
y2 = min(max(y2, 0), height) y2 = min(max(y2, 0), height)
w, h = x2 - x1, y2 - y1 w, h = x2 - x1, y2 - y1
# Require non-zero seg area and more than 1x1 box size # Require non-zero seg area and more than 1x1 box size
if obj['area'] > 1 and w > 0 and h > 0 and w * h >= 4: if obj['area'] > 1 and w > 0 and h > 0:
all_boxes.append([x1, y1, x2, y2]) all_boxes.append([x1, y1, x2, y2])
all_cls.append(self.COCO_id_to_category_id.get(obj['category_id'], obj['category_id'])) all_cls.append(self.COCO_id_to_category_id.get(obj['category_id'], obj['category_id']))
iscrowd = obj.get("iscrowd", 0) iscrowd = obj.get("iscrowd", 0)
......
...@@ -25,6 +25,7 @@ class DatasetSplit(): ...@@ -25,6 +25,7 @@ class DatasetSplit():
Each list of numpy arrays corresponds to the mask for one instance. Each list of numpy arrays corresponds to the mask for one instance.
Each numpy array in the list is a polygon of shape Nx2, Each numpy array in the list is a polygon of shape Nx2,
because one mask can be represented by N polygons. because one mask can be represented by N polygons.
Each row in the Nx2 array is a (x, y) coordinate.
If your segmentation annotations are originally masks rather than polygons, If your segmentation annotations are originally masks rather than polygons,
either convert it, or the augmentation will need to be changed or skipped accordingly. either convert it, or the augmentation will need to be changed or skipped accordingly.
......
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