I have an annotated dataset that contains all images(both train & test) in one folder. Each image has an id associated to it. For example the images are like;
id_w55q2qr62fsk.tif, id_fvldv7o1kn9d, id_015i4fpen1ws.tif, etc
The annotations for the images in a csv file with columns id, bbox and category_id;
I want to upload this annotated dataset into Roboflow and turn it into a COCO json format to train further.
How can I arrange and set up the dataset and ensure to have every image get matched to it’s own bbox coordinates and actually have the bounding boxes shown.
How can I upload this dataset onto roboflow using code instead of manual upload since the dataset is not on my PC because of storage issues.
Thanks a lot and I would like to get help on this.
You could write some code to translate the dataset you have to Detections in Supervision
Then, associate them with each image while creating the DetectionDataset
Then, export the dataset as a COCO dataset using the COCO export method in the DetectionsDataset class
Finally, upload the dataset to Roboflow
Although, if your end goal is to upload to Roboflow, I would recommend you export with the Pascal VOC dataset format, since that exports in a 1 image to 1 annotation file format which works well for the project.upload() function in the Roboflow Python SDK or through the REST API.
The above image is one of the images that got uploaded to my roboflow, it is wrong because;
Classes are not shown as expected. The image has only 1 class called ‘objects’ yet it should have classes of 1, 2, 3
Annotations are being displayed on the wrong coordinates. In fact all images are having their bounding boxes at that top corner
Essentially, the whole purpose of this task is to convert the images & annotations into a COCO json format. If there’s an easier way of having it in COCO json, I might need to upload into roboflow. My initial thinking was to upload the dataset into roboflow then export it as COCO json, but if there’s a more direct way, I will do that.