Object Detection Dataset Format

I’m building an object detection model to detect if a person is wearing a helmet. For this, I’m using this dataset: Free Computer Vision Datasets. This allows me to download datasets in various formats (COCO, Pascal VOC, YOLO, etc.). I tried to upload the dataset on the Edge Impulse in all these formats. But EI isn’t assigning labels to the images using the label file. What should be the format of the dataset? I did take a look at this: Uploader - Edge Impulse Documentation. How should I go about uploading the data?

Hello @Mohit0928 ,

I’ve actually been working on the same project some time ago (including the open dataset from Roboflow).
Here is the related blog post:

I’ve created a Google Colab notebook so you can easily convert the Yolov5 Pytorch export to EI ingestion format: Google Colab

Basically, you need to create a bounding_boxes.labels file, place it in your images folder and respect the follow the following format:

{
    "version": 1, 
    "type": "bounding-box-labels", 
    "boundingBoxes": {
        "resized_10406.png": [
            {
                "label": "face", 
                "x": 352, 
                "y": 144, 
                "width": 342, 
                "height": 342
            }
        ], 
        "resized_10360.png": [
            {
                "label": "face", 
                "x": 133, 
                "y": 116, 
                "width": 194, 
                "height": 194
            }, 
            {
                "label": "face", 
                "x": 468, 
                "y": 160, 
                "width": 193, 
                "height": 193
            }
        ]
    }
}

Regards,

Louis

1 Like

Thanks a lot @louis.

Hi @louis , I’m using your Google Colab notebook to convert the dataset from Roboflow. At first, I thought the dir format is wrong when facing this problem.

However, it shows nothing in the bounding.boxes.labels when I change the dir. I also have a problem with !npm install -g --unsafe-perm edge-impulse-cli code. Looking forward to your reply. :slight_smile:

Hello @Mohit0928, @sio_yx,

FYI, we just released the support of new image dataset acquisition formats (COCO JSON, Pascal VOC, YOLO TXT, OpenImage, Plain CSV): Uploader - Edge Impulse Documentation

Best,

Louis