Data format: Instance segmentation
Introduce
Instance segmentation is based on the format of object detection data. Added a mask for the detection box in the two-point box (mask)Boundary positioning, use JSON File as annotation, 001.jpg It's an original picture, 001.json Then there are annotations and corresponding labels for the segmentation of several instances in the figure.
Example
train_meta.csv
json_Label,image_Source
labels/001.json,images/001.jpg
Instance segmentation JSON Annotated content. It is the annotation box and its corresponding content and attributes. The annotation box includes a two-point box and a mask (mask)boundary:
- The two-point box is located in the upper left corner (x_min and y_min)And the bottom right corner (x_max and y_max)Two points
- mask It is the coordinates of several points in a clockwise direction starting from the upper left point of the region. The closed pattern represents the shape of the object.
All annotated coordinates use the relative positions of points on the image, for example: Image size (800, 600), Point coordinates (10, 30), The representation of the annotation box is (10/800, 30/600), That is (0.125, 0.05).
Field Description
- image_width - The width of this image
- image_height - The height of the image
- image_path - The relative path of the image file
- num_box - The number of annotation boxes on this image
- bboxes - List of annotation boxes on this image
- attributions - Custom attribute values used in the dataset (Training not used. But there are reserved annotations)
- label - The annotation label of this box
- x_min / y_min - Coordinates of the upper left corner of the two-point box
- x_max / y_max - Coordinate at the bottom right corner of the two-point box
- x_arr - Mask Edge points in sequence x coordinate
- y_arr - Mask Edge points in sequence y coordinate
Example of instance segmentation annotation
{
"num_box": 1,
"bboxes": [
{
"id": 0,
"attributions": {
"group": 2
},
"label": "people",
"x_max": 0.08816,
"x_min": 0.00001,
"y_max": 0.20833,
"y_min": 0.00001,
"x_arr": [
0.0, 0.0, 0.0861, 0.0875, 0.2083, 0.2097, 0.3292, 0.3306, 0.4514,
0.4528, 0.57222, 0.5736, 0.6347, 0.6347
],
"y_arr": [
0.0, 0.0652, 0.0652, 0.0707, 0.0706, 0.0761, 0.0761, 0.0815, 0.0815,
0.0869, 0.0869, 0.0924, 0.0924, 0.0
]
}
],
"image_height": 2019,
"image_width": 2048,
"image_path": "images/1.jpg"
}