Hasty allows you to export your project in the very well-known COCO dataset format. You can find more information about this format here.

Please note that the main COCO project has tasks for object and keypoint detection, panoptic and stuff segmentation, densepose, and image captioning.
There are external extensions that include things like attributes, but it is not in the standard one. So, when exporting your project in the COCO format you will not get any attribute data.
python
      #Decode binary masks encoded via RLE.
from pycocotools.mask import decode

ann = {
    "id": 0,
    "image_id": 53,
    "category_id": 1,
    "segmentation": {
    "size": [ 
    2211,
    2097
    ],
    "counts": "WRQR14oT20K?D5M0O7I6K3M005K3M004L0N4N001O02N001N2O0001O2N00001O02N0000N3O0000002N00001O000O1O1000000000001O00000N20000000O01000000000000N2000O10O1000N20O10000N200000O01000000N11000000000000N20000000000O3N00001O2N001O0N3O002M2O002M3L7J101H>A_SbS3"
    },  
    "area": 6718,
    "bbox": [
    504,
    842,
    117,
    75
    ],
    "iscrowd": 0
}

mask = decode(ann["segmentation"])
    

id (string)
The annotation ID

image_id (integer)
The ID of the image

category_id (integer)
The ID of the category of the object instance

segmentation

  • size (list of integers)
    Height and width of the image
  • counts (string)
    An RLE-encoded binary mask of an object instance

area (float)
The total area of the encoded mask in squared pixels

bbox (list of integers)
List of bounding box values

iscrowd (boolean)
Indicates if the ground truth (gt) object is marked as a crowd region (1) or not (0). If it is, then the predicted bounded box can match any subregion of the ground truth. Currently, Hasty does not provide an option to mark objects as iscrowd, so the value will be set as 0

In image annotation, crowd regions are areas in the image where multiple instances overlap and it is hard to differentiate individual objects.

As of today, Hasty does not have functionality to mark crowded regions in app.

You can learn more about pycocotools Python package in the documentation.

Boost model performance quickly with AI-powered labeling and 100% QA.

Learn more
Last modified