Hasty support an import of existing annotations of the following types:
bbox - Bounding boxes (as a JSON file)
polygon - Polygons (as a JSON file)
semantic - Semantic segmentation (as a PNG image)
label_class - Label classes (as a JSON file)
hasty_export - JSON File with a structure of the Hasty JSON V1.1
The JSON should be of the following format:
As an example, here are two annotations, one bounding box (cat) and one polygon (dining table):
Hello, thank you for using the code provided by Hasty. Please note that some code blocks might not be 100% complete and ready to be run as is. This is done intentionally as we focus on implementing only the most challenging parts that might be tough to pick up from scratch. View our code block as a LEGO block - you can’t use it as a standalone solution, but you can take it and add to your system to complement it. If you have questions about using the tool, please get in touch with us to get direct help from the Hasty team.
"bbox": [128, 13, 340, 308]
"polygon": [[122, 222], [73, 236], [72, 250], [2, 256], [2, 332], [498, 332],
[498, 295], [429, 260], [339, 231], [282, 223], [297, 246], [306, 285], [280, 302],
[255, 271], [224, 260], [222, 304], [199, 310], [171, 290], [171, 265],
[131, 244], [128, 222]]
Each file with a semantic segmentation should be an image in *.png
format. The filename should be the same (without extension) as the
corresponding image's name. The image file can contain one or three
Label classes can be imported through the use of a JSON-file with in the following schema:
As an example:
As you can see, there are two types of classes: object (1) and
background (2). These correspond to the foreground (1) and semantic (2)
classes you see in the tool.
If you are looking to import masks or do other, more complex imports with attributes and image tags as well as annotations, you need to format your data into our own supported Hasty JSON v1.1.