Image annotations to dataset¶
Start using Dataiku computer vision feature on your datasets by using Convert object detection annotations recipe. With this plugin, you will be able to convert image annotations into a dataset compatible with object detection in Dataiku.
How to set up¶
This capability is provided by the Image annotations to Dataset plugin, which you need to install.
How to use¶
Let’s assume that you have a Dataiku project with a folder containing images & annotations in COCO or Pascal VOC format.
To create your first recipe, navigate to the Flow, click on the + RECIPE button and access the recipe from there. If your folder is selected, you can directly find the plugin on the right panel.
Select the input managed folder and create or select an output dataset. Configure the settings described below, then run the recipe to populate the output dataset.
Convert object detection annotations recipe¶
Input¶
A folder with images and object detection annotations under COCO or Pascal VOC .
Output¶
A dataset with two columns : images_annotations & images_path, compatible with object detection in Dataiku.
Settings¶
The settings modal lets you choose first the input format (see official documentations to know which format match your data: COCO or Pascal VOC).
Images Folder¶
For both formats you need to enter the path to the subfolder containing your images. The image folder path must be relative to the managed folder root and can be left empty if the images files are directly at the root of your managed folder. Example: enter B if your managed folder contains a subfolder B which contains the images.
Annotations file path (COCO)¶
Coco annotations are all stored into a single JSON file, you must specify the relative path to this file from your managed folder root. This path must include the file name and be relative to the managed folder root. Example: annotations/_annotations.coco.json if your managed folder contains a subfolder annotations which contains your annotations file.
Annotations folder (Pascal VOC)¶
For Pascal VOC, annotations are split into different files: one XML file for each image. You must specify the path of the subfolder containing these XML files. This annotation folder path must be relative to the managed folder root and can be left empty if your annotations files are directly at the root of your managed folder.
Example: Annotations/ if your managed folder contains a subfolder Annotations which contains the XML annotations files.
Pascal VOC category names are converted to lowercase, and surrounding whitespace is removed.
Note
From Pascal VOC documentation “The top-left pixel in the image has coordinates (1,1)”. Running this recipe will remove this offset to be compliant with Dataiku.