After deprication of data labeling service, OCI introduced the much awaited feature of supporting label studio for custom model training in AI-Vision. Here is the detailed process.

Step 1 : Installing Label Studio

Label studio is an open source software which you can install from various ways mentioned in there official documentation. Please refer to the same : https://labelstud.io/guide/install.html

I personally prefer brew way for my mac.

Terminal window showing the Homebrew command to install Label Studio on macOS.

Step 2 : Running label studio on local host and creating project

Your application will start default on http://localhost:8081/

Click on Create Project to start creating the project and add project details

Label Studio home page with the Create Project button highlighted.

Go to data import and import all the images from your local or URL

Label Studio Data Import page for uploading images from a local computer or URL.
For demonstrations, used synthetic or appropriately authorized data.

Go to labeling setup and select object detection for bouding box

Note : Select image classification in case you want to train an image classification model.

Press enter or click to view image in full size

Label Studio Labeling Setup page with object detection selected for bounding-box annotation.

Provide your labelset you will use to annotate and click on save

Label Studio labeling configuration showing a label set before saving.

Step 3: Click on label all task and start labeling

Label Studio task list showing image thumbnails awaiting annotation.

Start annotating each of the image (make sure each label will have atleast 10 images/ dataset minimum)

Label Studio annotation interface showing a redacted sample ID card with bounding boxes around its fields.
For demonstrations, used synthetic or appropriately authorized data.

Once annotated, download the file as JSON

Label Studio export dialog showing annotations downloaded in JSON format.

Step 4 : Open OCI console and Train Custom OD Model

Open OCI console and go to vision service. Click on Create Project to start creating the project

OCI Vision service page with the Create Project option.

Fill all the required details.

OCI Vision Create Project form with required project details.

Note : As a pre-requisite, make sure you have all the permission added. Below are the list of permission required :

Before you start creating a custom vision model, complete the following setup tasks. If you don’t have permission to create these policies, your tenancy administrator should create them for you.

1: Create a group

Create a group for your users.

Add users to the group.

2: Create policies

Create a policy in the root compartment with the following statements:

2.1 Policy to allow group access to AI Vision service

allow group <group_in_tenancy> to manage ai-service-vision-family in tenancy


2.2 Policy to allow group access to files in Object Storage

allow group <group_in_tenancy> to use object-family in tenancy

Once project is created, go inside the project and click on model tab.

OCI Vision project page with the Models tab selected.

Click on create dataset, and select model type, object storage where you want to store your annotated file + all the dataset.

OCI Vision Create Dataset form for choosing the model type and Object Storage location.

Choose thw exported annotated file and data file and click on upload dataset. This will upload all your dataset to mentioned object storage and also convert label studio JSON data to JSONL and upload that to the same location.

OCI Vision Upload Dataset page for selecting annotated data and image files.

Once uploaded you can check the same in object storage. After that, click on create model to start creating the model and fill all the required details.

Select the same converted JSONL (with name object-detection_dataset.jsonl

OCI Vision Create Model form showing the converted object-detection dataset JSONL file.

Provide model name and training type

OCI Vision model configuration form for entering a model name and training type.

Review and click on create to start creating the model.

OCI Vision review page with the Create button to start model training.

Oncle model is active, click on infernce and start testing the model.

OCI Vision custom model testing screen showing detected fields and confidence scores for a redacted sample ID card.