LabelMe JSON format
The files of the LabelMe annotation tool: one JSON per image with a list of shapes, each with a label, a shape type and points in pixels.
- Data
- Images
- Labels
- BoxesPolygonsMasksPolylinesPoints
- Files
.json- Import / export
- Yes / No
What is the LabelMe format?
LabelMe is an open-source image annotation tool written in Python. It supports polygons, rectangles, circles, lines and points, as well as AI-assisted annotation, and saves one JSON file per image.
The file holds imagePath, imageHeight, imageWidth, an optional base64 copy of the image in imageData, and a shapes list. Each shape has a label, a shape_type and points in pixels; a mask shape carries a base64 PNG in mask.
Folder structure and an example
input_folder
├── ann
│ ├── IMG_0748.json
│ └── IMG_8144.json
└── img
├── IMG_0748.jpeg
└── IMG_8144.jpeg{
"version": "5.5.0",
"flags": {},
"shapes": [
{
"label": "cat_polygon",
"points": [[1038.0, 91.0], [2363.0, 1311.0], [2373.0, 3236.0]],
"group_id": null,
"description": "",
"shape_type": "polygon",
"flags": {},
"mask": null
},
{
"label": "cat_rectangle",
"points": [[1033.0, 76.0], [2368.0, 1311.0]],
"group_id": null,
"description": "",
"shape_type": "rectangle",
"flags": {},
"mask": null
}
],
"imagePath": "IMG_0748.jpeg",
"imageData": null,
"imageHeight": 3382,
"imageWidth": 2536
}Import and export LabelMe in Supervisely
Import LabelMe into Supervisely
- Import data (Auto Import)
Reads LabelMe
.jsonfiles next to their images, with the shape typespolygon,rectangle,circle,point,line,linestripandmask.
Export from Supervisely to LabelMe
The Supervisely Ecosystem has no LabelMe exporter. Export the project in Supervisely JSON or COCO and convert from there if a tool needs LabelMe files.
All apps are in the Ecosystem, under Import and Export. Every project is stored in Supervisely JSON in between.
Converting LabelMe to and from Supervisely JSON
Import only: there is no export to LabelMe.
| LabelMe | Supervisely JSON | Notes |
|---|---|---|
label | class title | One class per label. |
polygon | polygon | Points become the exterior. |
rectangle | rectangle | Two corner points. |
circle | polygon | The circle (centre and a point on it) is approximated by a polygon. |
line, linestrip | line (polyline) | |
point | point | |
mask | bitmap | The base64 PNG becomes the bitmap, placed at the first point. |