When working on a computer vision project, you usually start by developing your models and then move on to organizing them into workflows. But then comes the big question: “How do I deploy a computer vision model efficiently?" With many deployment options out there, picking the right one can be overwhelming.
Introducing Ikomia SCALE, a platform designed to facilitate the deployment of Computer Vision models. It helps simplify the technical aspects of onboarding and coding for various devices. Whether you're considering serverless architectures like AWS Lambda or other major platforms, Ikomia SCALE aims to make the deployment process more straightforward.
In this blog post, we'll walk you through a comprehensive guide on how to use the Ikomia ecosystem effectively:
For a more detailed exploration of what Ikomia SCALE offers [1], check out their official page here.
Let’s dive in and make Computer Vision deployment as simple as it gets!
Let's explore a project similar to the one we previously detailed, which involved text extraction from ID cards using deep learning. This solution was developed using the Ikomia API. In this example, we will perform text detection and recognition, followed by key information extraction using pre-trained mmOCR models. For a more personalized project, you could fine-tune your model to better suit your specific use case.
First, you need to install the Ikomia Command Line Interface (CLI) in a virtual environment [2]:
The Ikomia CLI allows you to interact with Ikomia SCALE from the command line, making it easier to manage your projects.
In this section, we'll create a workflow for the following steps:
1. Text detection
2. Text recognition
3. Key Information extraction
4. Saving the workflow
Using only the pre-trained models, the text is detected and extracted fairly well. However, the key information extraction (KIE) model might need to be fine-tuned to label the extracted information more accurately.
At the end of your workflow, we saved it to a JSON file.
First of all, create an Ikomia account or log in. You can choose to sign up with your email or with your Google or GitHub account.
A project in Ikomia SCALE serves as the main container for your workflows, grouping them together neatly. To start a new project, simply follow these steps:
Access tokens are required to authenticate with Ikomia SCALE. To generate a token, use the following command:
Replace < your_login > and < your_password > with your Ikomia SCALE credentials. After generating your token, set it as an environment variable:
Where < your_token > is the access token you generated.
Once your access token is set, you can push your workflow to the Ikomia SCALE platform with the following command:
Replace <project_name> with the name of your project on Ikomia SCALE, such as 'Text_extraction' in this example. This command uploads your workflow JSON file directly to the specified project in SCALE, allowing it to be managed and deployed as needed.
Now that you've added your workflow to your project on Ikomia SCALE, it's time to put it into action and create a live endpoint for use.
1. Navigate to your project: Go to your project page on Ikomia SCALE. Here, you'll see an overview of your project and the workflows contained within.
2. Select your workflow for deployment: Click on the workflow you wish to deploy from the list. Ikomia SCALE provides flexibility with various cloud providers and regions for deployment.
Ikomia SCALE offers three primary compute infrastructures for your deployments:
3. Create a Deployment: On the right-hand side of the project interface, you will find the deployment settings.
4. Launch Your Deployment: Hit the 'Add deployment' button to initialize your workflow's deployment process.
The new deployment will now be listed on the left-hand side of the page under the deployments section. The time it takes for the deployment to become operational will vary based on the complexity of the workflow and the configuration options you've selected.
In this instance, I chose the AWS serverless option with a M-sized configuration. It took approximately 10 minutes for the system to fully set up and have the deployment running smoothly.
SCALE provides a user-friendly Test Interface to ensure your deployed workflow is performing correctly.
Open the Test Interface: To access the Test Interface, go to your workflow’s page and click on the ‘Test me’ button associated with your deployment. Alternatively, you can directly visit the endpoint’s URL.
Run Your Workflow: Here’s how you can execute your workflow:
Once the workflow execution finishes, the Test Interface will display the results.
The interface showcases the outputs in an organized manner, including the detected text, the bounding box coordinates, and the confidence scores for each recognized element. It’s a seamless way to ensure that your workflow is correctly set up and ready for integration with your systems.
Once you've deployed your workflow in Ikomia SCALE, each deployment provides a REST API endpoint. This endpoint facilitates the integration of your computer vision model into your applications or systems, enabling them to send images to the model and receive results in return.
Our documentation offers detailed insights into using these REST API endpoints for effective integration.
For a deep dive into integration processes and best practices, please consult our documentation.
[1] Ikomia SCALE