Nov. 7, 2023
Mastering the Intel® Geti™ SDK in 9 Steps: A Beginner’s Guide
By Dr. Paula Ramos – AI Evangelist at Intel (LinkedIn profile)
When you have your production system working 24/7, it will be difficult or sometimes impossible to stop your production in order to update your models, add new objects to detect, replace a camera and recalibrate, or change elements in your workload. With Intel® GetiTM SDK this is part of the past, the Intel Geti SDK enables you to digest new production data in your model and retrain your model using REST API and all functions to connect your production system with the computer vision platform.
Inte Geti Software Development Kit (SDK) is a Python package designed to interact with an Intel Geti server via the REST API. It provides various functions for managing projects, downloading, and uploading data, deploying projects for local inference, configuring projects and models, launching, and monitoring training jobs, and media upload and prediction.
In this blog, we will cover how to work with Intel Geti SDK in nine steps, which includes connecting with your Intel Geti instance, creating a project, uploading a video, creating annotations, training the model, downloading the model, and saving the deployment, preparing the models for inference, running the inference and digest new data into the platform. With the Intel Geti SDK you can integrate the training process with the production system in a simple way using the complete OpenVINO ecosystem.
One of the best things about the Intel Geti SDK is the Jupyter notebook examples that come with it. These notebooks are designed to teach users how to use the SDK in a tutorial style, making it easy to get started. Through these notebooks, users can learn about different use cases for the package and see how the platform can be used to develop AI models quickly and efficiently.
In this blog we will walk through this notebook “102_from_zero_to_hero_9_steps.ipynb”, so we invite you to clone the GitHub repo, connect with your Intel Geti instance and run the referenced use case that will illustrate the main functions you can use using the Intel Geti SDK.
Step 1: Connect with your Intel® Geti™ Instance.
The first step is to connect to the platform using the server details from the .env file. This file should be on the notebooks folder. If you have any doubts, please look at the previous work you need to do before connecting the SDK and the platform. User can also use “session cookies” instead of user id and passwords in plain text to communicate with the server.
We will create a ProjectClient for the server, setting up the geti.session and the geti.workspace_id, using the details coming from the .env file.
Step 2: Create a project and upload a video for further annotations.
With the Intel Geti SDK we can list the actual projects in the Intel Geti instance. We can also create a new project from scratch using the SDK. In this step will upload a video using the SDK for further annotations into the Intel Geti platform. We create an object detection project for person, bike and car detection. With the SDK you can create whatever computer vision and use-case you are interested in, see the computer vision architectures we are supporting.
Step 3: Uploading a video.
We can upload a video1 directly from file using the video_client.upload_video() method. Before uploading, we can get a list of all videos in the project, so that we can verify that the image was uploaded successfully.
1 The Intel Geti platform support the following video file formats: mp4, avi, mkv, and mov. The resolution of the video cannot exceed 8K and the file size cannot be larger than 4.7GB
Step 4: Creating annotations.
Once you upload new image or video data, you should open the Intel Geti GUI and create annotations for it. Alternatively, you can upload some pre-defined annotations for the video to the project. This saves you some time in annotating the frames. annotation_client will use your instance details and the annotation_reader to upload your previous annotations into the actual project.
Step 5: Training the model.
Once sufficient annotations have been made, the project is ready for training. Due to the incremental learning mechanism within the Intel Geti platform, training will happen automatically and frequently. Whenever sufficient new annotations have been created, the platform will start a training round.
Step 6: Download the model and save the deployment.
When the model is ready, you can download a deployment folder and run it locally or run the inference in the platform. In the notebook, we download the deployment folder and run it locally. After saving the deployment locally, be aware of the notebook path, where you will find a subfolder with the name of your project.
Step 7: Prepare the models for inference.
Now that the deployment is created and the models are saved to the local disk, we can load the models into memory to prepare them for inference. There you can select the device for running the inference, in OpenVINO we have different options. You can setup CPU, GPU, AUTO for auto plugin, and MULTI for running the model in multiple devices.
Step 8 and 9: Run the inference and digest new data into the Platform.
We will run the inference locally and send some detection frames to the Intel Geti platform to annotate those and retrain a new model. Using run_object_detection function we are reading a video file or open a camera source, detecting person, bike or car per frame, and based on the detection we are selecting some frames to send back to the platform for annotating there using the smart annotation features and then to use those for the next round of training.
Intel Geti SDK provides an easy and efficient way to interact with the Intel Geti server via the REST API. With the SDK, you can manage projects and automate your workloads, upload and download data, train and deploy models, and run inference, so you don’t have to point and click in the GUI, and letting you integrate the Intel Geti platform more easily into your existing AI workflow. By following the nine steps outlined in this blog, you can start working with Intel Geti SDK and create your own object detection project – SDK is agnostic to the computer vision task and architecture, so you can us it with other computer vision task.
If you want access to the Intel Geti platform, please connect with us by filling out this form. And suppose you are already using the Intel Geti SDK and have feedback to improve its functionalities further. In that case, we invite you to add your questions to our repository’s discussion section
https://github.com/openvinotoolkit/geti-sdk. Enjoy the blog and the Intel Geti SDK notebooks!
Hi, all! My name is Paula Ramos. I have been an AI enthusiast and have worked with Computer Vision, Robotics, and Machine Learning. Since the early 2000s, I’ve been at the helm of teams pushing the boundaries of integrated engineering technology. My doctoral journey saw me introducing groundbreaking, affordable edge and IoT solutions for farmers. Central to my mission is the design of intelligent systems that cater to pressing industry needs. I’ve spearheaded a vast array of projects, from state-of-the-art imaging platforms to advanced cloud data processing. My significant contributions to fields such as computer vision and IoT have left an indelible mark on a global scale. As an AI Evangelist at Intel, I combine innovative solutions with a passion for coffee and a determination to tackle real-world challenges head-on. Here is my LinkedIn profile: https://www.linkedin.com/in/paula-ramos-41097319/
- Mastering the Intel® Geti™ SDK in 9 Steps: A Beginner’s Guide
- The Next Evolution: Intel® Geti™ 1.8.0 is here
- Interactive Annotation with SAM – speeding up the time to model
- Computer Vision Task Overview and Applications
- The Intel® Geti™ SDK: A Game-Changer for Rapid AI Model Development and Deployment in your production system
- Enhance your experience: Introducing Intel® Geti™ 1.5.0
- Efficient, custom object detection training template made easy
- Streamlining AI’s Path to Production with the Intel® Geti™ Platform
- Intel® Geti™ AI Platform Overview: Learn What Is Under the Hood