Notebooks
Setting things up
To get started with the example notebooks provided in this folder, please make sure
that you have installed the geti-sdk
package. The steps to install the package
can be found in the main readme in this repository. Once the package
is installed, you can follow the steps below to set up the notebooks.
Navigate to this folder in a terminal
cd ./notebooks
Activate the Python environment in which you installed the
geti-sdk
packageRun
pip install -r ../requirements/requirements-notebooks.txt
to install the packages required to run the notebooksCreate a
.env
file containing the server details for your Intel® Geti™ server, following the instructions in the Authentication section.In your terminal, execute the command
jupyter lab
. This will start the jupyter server and should take you straight to the jupyter web interface.The notebooks should show up in the side menu of the jupyter web interface.
Authentication
The notebooks rely on a
.env
file to load the server details for the Intel® Geti™ instance which they run against. To provide the details for your Intel® Geti™ instance, create a file named.env
directly in thenotebooks
directory. Two types of authentication are supported: Either via a Personal Access Token (the recommended approach) or via user credentials.Personal Access Token
To use the personal access token for authenticating on your server, the
.env
file should have the following contents:# GETi instance details HOST= TOKEN=Where you should of course fill the details appropriate for your instance. For details on how to acquire a Personal Access Token, please refer to the section Connecting to the Geti platform in the main readme.
Credentials
To use your user credentials for authenticating on your server, the
.env
file should have the following contents:# GETi instance details HOST= USERNAME= PASSWORD=Where you should of course fill the details appropriate for your instance.
In case both a TOKEN and USERNAME/PASSWORD variables are provided, the SDK will default to using the TOKEN since this method is considered more secure.
SSL Certificate verification
By default, the SDK verifies the SSL certificate of your server before establishing a connection over HTTPS. If the certificate can’t be validated, this will results in an error and the SDK will not be able to connect to the server.
However, this may not be appropriate or desirable in all cases, for instance if your Geti server does not have a certificate because you are running it in a private network environment. In that case, certificate validation can be disabled by adding the following variable to the
.env
file:VERIFY_CERT=0
Available notebooks
The following notebooks are currently provided:
001 create_project – This notebook shows how to create a project, and explains the parameters that can be used to control the project properties.
002 create_project_from_dataset – This notebook shows how to create a project from an existing dataset, and upload images and annotations to it. The data used in this notebook is from the COCO (CC BY 4.0) dataset.
003 upload_and_predict_image – This notebook shows how to upload an image to an existing project, and get a prediction for it.
004 create_pipeline_project_from_dataset – This notebook shows how to create a pipeline project (with two trainable tasks in it) from an existing dataset, and how to upload images and annotations to it.
005 modify_image – This notebook shows how to get an image from a project, convert it to grayscale, and then re-apply the annotation for the original image to it.
006 reconfigure_task – This notebook shows how to view and change the configuration for a task.
007 train_project – This notebook shows how to start a training job for a task in a project, monitor the job’s progress and get the model that was trained in the job once the training completes.
008 deploy_project – This notebook shows how to create a deployment for a project in order to run inference locally with OpenVINO.
009 download_and_upload_project – This notebook shows how to download a project to local disk, including all media, annotations as well as the project configuration. The notebook also demonstrates how to re-create the project from a previously downloaded project, and upload all downloaded data to the newly created project.
010 model_serving – This notebook shows how to create a stand-alone inference server for a Geti project, using the OpenVINO Model Server (OVMS). The notebook also demonstrates how to connect to the server through the Geti SDK and send inference requests to it.
011 benchmarking_models – This notebook shows how to measure and compare the inference rates for the various algorithms available in a Geti project on local hardware, that can help to select a suitable architecture for model deployment.
101 simulate_low-light_product_inspection_demo – This notebook shows how to systematically simulate a change in lighting conditions (i.e. a shift in data distribution), and the effect such a change has on model predictions. This notebook uses the ‘transistor’ category from the MVTec AD (CC BY-NC-SA 4.0) dataset.
102 from_zero_to_hero_9_steps – This notebook teaches how to use the SDK to create a project on the Intel Geti graphics platform, upload videos, download the displays locally, and run the inference by viewing the results on this same notebook.
103 parking_lot_train-to-deployment – This notebook shows the process of creation of a smart car counting system for parking lots. The notebook demonstrates how to train models, manipulate training features, and deploy the solution locally.