Labelme annotations are not recognised

Hi,

I have a dataset of annotated .png images that were created in labelme. I also having the segmentation information for image in a json file.

So each image has a .json file with the same name that looks something like the example below:

{
“version”: “5.4.1”,
“imagePath”: “…\0001.png”,
“imageHeight”: 256,
“imageWidth”: 256,
“shapes”: [
{
“label”: “SolarPanel”,
“group_id”: null,
“description”: “”,
“shape_type”: “polygon”,
“flags”: {},
“mask”: null,
“points”: [
[
87.47826086956525,
127.4247491638796
],
[
140.3210702341138,
137.79264214046827
],
[
156.70903010033442,
21.070234113712445
],
[
104.86956521739137,
12.374581939799327
],
[
87.47826086956525,
127.4247491638796
]
]
},
{
“label”: “SolarPanel”,
“group_id”: null,
“description”: “”,
“shape_type”: “polygon”,
“flags”: {},
“mask”: null,
“points”: [
[
215.98504819988204,
0.0
],
[
212.561872909699,
29.09698996655527
],
[
253.0301003344482,
34.78260869565224
],
[
253.0301003344482,
0.0
],
[
215.98504819988204,
0.0
]
]
}
]
}

I need to get my dataset into a format suitable for finetuning a yolov8 model but roboflow will not recogise the annotations.

It will accept my uploaded images but uploading the json files yields nothing (no error but also no upload).

I have also tried getting it done via the API but then I get this error.

InvalidAnnotationFormat', 'hint': 'We were unable to parse your annotation format or it is not supported via the upload API at this time. Ensure that the annotations file provided in the request contains annotations for the provided image.

I get this error when i upload as .labelme.json and when I upload as normal .json.

I have also tried converting to a coco dataset but again no annotations are added when I put them into the roboflow uploader.

Any help here would be massively appreciated, could it be the filenames?

Hey @Ben_Field

Sorry to hear that you’re having some trouble. I’m looking into your issue now, but it would be very helpful if you were willing and able to share the LabelMe dataset that you are trying to upload.

If you could share that (you can use the forum’s personal message feature if you don’t want it publicly shared), that would be very helpful

Thanks Leo!

Here’s a sample json

I have 2700 of these alongside numbered png files corresponding to the same numbered json files.

Hey @Ben_Field

Could you also send the corresponding image associated with this annotation file? Looks like ..\\0031.png.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.