Reputation: 11
I'm working on an object detection model using TensorFlow and the Keras package. My first iteration did not provide great results, so I am now using LabelBox to draw bounding boxes around my images. LabelBox outputs one JSON file with all the images and labels, in a format like below. I'm trying now to import the labeled data, but can't find a good solution to doing so. I researched that I may need to convert the JSON to a TFRecord, but have not been able to find a clean script to do so. I am relatively new to python and machine learning, so any help would be greatly appreciated.
LabelBox OutputJson:
{
"ID":"ck6wf4t9ocmuu0948rgi87ubd",
"DataRow ID":"ck6wd5n327ea50bofdgbe9tz0",
"Labeled Data":"https://storage.labelbox.com/ck5x5ecl07i3f0932i797y27k%2Fa9bb10c6-14dd-cc02-1cf6-ccec2b4905e7-Apple_DVI_Adapter_TRAIN_Table_19.jpg?Expires=1585607947466&KeyName=labelbox-assets-key-1&Signature=6Nf7YIr3gjsIkOEZtH2rMy5PJPg",
"Label":{
"objects":[
{
"featureId":"ck6wf4s5s1ndg0z79nv3x96pf",
"schemaId":"ck6wdqfe9xqpy0c16ysemtuda",
"title":"DVI",
"value":"dvi",
"color":"#FF0000",
"bbox":{
"top":142,
"left":575,
"height":694,
"width":234
}, "instanceURI":"https://api.labelbox.com/masks/feature/ck6wf4s5s1ndg0z79nv3x96pf?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjazV4NWVjbG9mcXd5MDc3NnEwem9leGpyIiwib3JnYW5pemF0aW9uSWQiOiJjazV4NWVjbDA3aTNmMDkzMmk3OTd5MjdrIiwiaWF0IjoxNTg0Mzk4MzQ3LCJleHAiOjE1ODY5OTAzNDd9.hvNXnIiVNKWfHc_CUONYyXMQWKeY7IqSpqE3z3qNZJQ"
}
],
"classifications":[
]
},
"Created By":"",
"Project Name":"",
"Created At":"",
"Updated At":"",
"Seconds to Label":12.423,
"External ID":"",
"Agreement":null,
"Benchmark Agreement":null,
"Benchmark ID":null,
"Benchmark Reference ID":null,
"Dataset Name":"",
"Reviews":[
],
"View Label":"https://editor.labelbox.com?project=ck68mszgktd0f0700beuachz5&label=ck6wf4t9ocmuu0948rgi87ubd"
}
Upvotes: 1
Views: 868
Reputation: 11
I was looking for a similar solution. What worked well for me was utilizing Roboflow. I made a free account and was able to convert LabelBox JSON output to TFRecords for model training. https://roboflow.com/convert/labelbox-json-to-tensorflow-tfrecord
Upvotes: 1