Here is an example of creating a new dataset and uploading images to it with categories and annotations.


#Create a dataset



#Create a category


When using the API to upload images from categories, you will need to create the categories you need in advance so that when you upload images, you provide the correct id of the categories used in the dataset.






#Start and end of upload

You must start the upload manually. The dataset will then be locked and you will be able to upload photos. Once you have finished uploading photos, you need to stop uploading to unlock the dataset. If you forget to do this, the dataset will automatically unlock itself after a certain period of time of not receiving new photos.




#Send images



Photos are sent as multipart/form-data, which must include:



ImagsMetadata - containing data such as:

  1. name
  2. annotationType
  3. annotation
  4. classifyCategoryId





#Get image metadata


To make it easier to manage uploaded images, you can break down information about a photo by uploading classifications and annotations to it.




#Add categories to upload


In this example, we use the parent folder to assign the classification.




#Add .xml annotation to upload


The .xml files require that the metadata for the images include a valid annotationType so that the server will know how to decode the information it has. The .xml file should be uploaded as a encoded string in base64.