Automate visual recognition model training using IBM Visual Insights – IBM Developer


Training a visual recognition model can be repetitive and tedious, since users generally have to manually upload and label each image. This developer code pattern aims to automate these repetitive tasks by monitoring a set of folders using a Python script. As images are added to each folder, they’ll be uploaded and labeled in IBM Visual Insights. Once enough images have been uploaded, an image recognition model will be trained.


This pattern is targeted toward business users who are leveraging custom visual recognition models in their day-to-day operations and would like to reduce the amount of time spent manually tuning and retraining models.

This can be accomplished through the use of a Python script that has the ability to monitor folder(s) for changes. As images are added to each designated folder, images are automatically uploaded to the IBM Visual Insights service and labeled accordingly. This greatly simplifies the training process because business users won’t have to use the UI to upload and label each image. Doing this enables the business user to continuously update IBM Visual Insights models without depending on a system administrator.



  1. Upload images using IBM Visual Inspector app
  2. Train image inference model in IBM Visual Insights via Visual Inspector app
  3. Run Python script to extract inference data as CSV
  4. Upload CSV to dashboard and view results


Ready to get started? Check out the README for detailed instructions on how to:

  1. Upload images using IBM Visual Inspector app
  2. Clone repository
  3. Extract image data as CSV
  4. Load data into dashboard

Kalonji Bankole

Reference: Source link

Sr. SDET M Mehedi Zaman

Currently working as Sr. SDET at Robi Axiata Limited, a subsidiary of Axiata Group.

Leave a Reply

Your email address will not be published. Required fields are marked *