Preparing images for training a Visual Recognition custom model

You can train an IBM Watson Visual Recognition custom model to classify images according to classes you define. You need to define a minimum of two classes, with at least 10 images in each class, and then upload your training images to IBM Watson Studio.

 

Procedure

  1. Collect images for your classes
  2. [Recommended] Organize your images in .zip files
  3. Upload your files to your project

 

1. Collect images for your classes

For each class you want your model to recognize, collect at least 10 images.

Image file requirements

  • Supported image file formats: JPEG (.jpg) and PNG (.png)
  • Minimum image size: 32 x 32 pixels

Examples

If you don't have any images yet, you can try out creating a custom model using these sample training images: Sample images.

 

You can upload your training images to Watson Studio one at a time. But you can save time by organizing your images in .zip files and then uploading those .zip files.

.zip file requirements

  • Minimum number of image files: 10
  • Maximum: 10,000 images or 100 MB per .zip file

.zip file structure

Imagine you want to train a custom model to classify fruit based on images you have of apples, bananas, and pears. Defining classes in the model builder in Watson Studio will run most smoothly if you organize those image files in one of the following ways before uploading them to your project:

Option 1
Create one .zip file for each class, containing all the training images for that class.
Shows three .zip files

Option 2
Create one .zip file for all images, with images separated into one folder for each class.
Shows one .zip file with folders

Option 3
You can divide the images of a class into multiple .zip files.
Shows four .zip files

 

3. Upload your files to your project

From the Assets tab of your project in Watson Studio or from within the Visual Recognition model builder in Watson Studio, upload your individual image files or .zip files using the data panel. (If the data panel isn't open, you can open the data panel by clicking the Find and add data icon (The find data icon).)

 

Next steps