I'm trying to generate a json for my training data, tried manually first and then tried using roboflow and I still get the same error:
_annotations.createml.json file contains field "Index 0" that is not of type String.
the json format provided by roboflow was
[{"image":"menu1_jpg.rf.44dfacc93487d5049ed82952b44c81f7.jpg","annotations":[{"label":"100","coordinates":{"x":497,"y":431.5,"width":32,"height":10}}]}]
any help would be greatly appreciated
Hello @Shakawkaw,
The JSON format for a Create ML object detector is documented on this page:
https://developer.apple.com/documentation/createml/building-an-object-detector-data-source
Your JSON has a couple issues, the "image" key is incorrect, it should be "imagefilename". Also, the "annotations" key is incorrect, it should be "annotation".
Here is a full example in the correct format:
[
{
"imagefilename": "example.png",
"annotation": [
{
"label": "example",
"coordinates": {
"x": 0,
"y": 0,
"width": 20,
"height": 30
}
}
]
},
]
Best regards,
Greg