flatbug
All format examples · Machine-readable schema · Convert outputs to COCO
Parallel arrays describe one image. A contour contains all x coordinates followed by all y coordinates, not point pairs. Class 1 is Flatbug’s detection label. This example uses matching image/mask grids.
Example
Illustrative values, not predictions from a model. Unless stated otherwise, the image is 200 pixels wide and 100 pixels high.
{
"areas": [1600],
"boxes": [
[10, 20, 50, 60]
],
"classes": [1],
"confs": [0.8],
"contours": [
[
[10, 50, 50, 10],
[20, 20, 60, 60]
]
],
"identifier": null,
"image_height": 100,
"image_path": "frame.jpg",
"image_width": 200,
"mask_height": 100,
"mask_width": 200,
"scales": [1]
}Convert to a standard format
Use Converter.convert with source="flatbug" and target="coco". Your application supplies the predictions and any required image context or producer settings. The adapter validates whether the output contains the information the target needs.
General conversion example and required context
Inspect the intermediate representation for this example
This developer example prints ISIR, the internal representation used between adapters. Run from the repository checkout; no model download is needed.
python3 examples/formats/to_isir.py flatbugHow to interpret it
Boxes: [x1,y1,x2,y2] in original-image pixels with top-left origin.
Contours: Each contour is [x_coordinates, y_coordinates], with equal-length arrays. Author json_data derives contours in original-image coordinates, including the non-polygon mask path.
Classes: Since the flatbug models do not try to do classification, the values in classification is actually just all ones (1).