Tutorial 13 - Deep Cortex - How to create a project, set model to images and execute the training (SVL).
More...
Go to the source code of this file.
Tutorial 13 - Deep Cortex - How to create a project, set model to images and execute the training (SVL).
- Attention
- To execute this tutorial you need:
- to have installed the SB Deep Learning Framework
- to ensure that path to SB Deep Learning Framework is included in the PATH enviroment variable (LD_LIBRARY_PATH in Linux) or in any case to be visible by the program. In Windows it is possible to specify additional paths as argument to the sb_init_dl function.
This tutorial shows you what you should do to train a model using a set of images and starting from scratch, i.e. without using the SB GUI. You should follow the following steps:
- create a new project with the function sb_project_create
- add a list of models to the project with the functions sb_project_get_par, sb_project_set_par and sb_par_add_model
- labeling the images, i.e. add a model sample to each image in the dataset
- execute the training with the function sb_svl_run
- See also
- sb_init
-
sb_init_dl
-
sb_release
-
sb_get_info
-
sb_license_get_info
-
sb_project_create
-
sb_solution_get_info
-
sb_solution_destroy_info
-
sb_project_load
-
sb_project_destroy
-
sb_project_save
-
sb_project_get_par
-
sb_project_set_par
-
sb_par_add_model
-
sb_image_info_load
-
sb_image_info_destroy
-
sb_image_info_save
-
sb_image_info_reset
-
sb_get_uuid
-
sb_svl_reset
-
sb_svl_run
-
sb_svl_get_res
-
sb_svl_destroy_res
Definition in file deep_cortex_svl_simple.c.
◆ create_deep_cortex_project_file()
Create a deep_cortex project file.
- Add models to the project
- Save the Deep Cortex project file.
Definition at line 112 of file deep_cortex_svl_simple.c.
◆ execute_training()
Execute training.
- Get the solution information.
- Load the project.
- Reset a previous training.
- Set training parameters.
- set device for SVL
- set network parameters
- set perturbations (flip, rotation, shift)
- Execute the training (SVL).
- Get training results.
- Save the training.
- Destroy the handles.
Definition at line 200 of file deep_cortex_svl_simple.c.
◆ main()
In the following the list of the program steps:
- Initialization of the SqueezeBrains library.
- Initialization of the Squeezebrains deep learning modules.
- Wait until the license is active.
- Create Deep Cortex project file.
- Add samples to images.
- Execute training.
- Destroy the project handle.
- Release the library.
Definition at line 61 of file deep_cortex_svl_simple.c.
◆ set_model_to_images()
Set samples.
- Set the parameters common to all the model samples. For each sample:
- Set the sample as required
- Set the scale to 1.0, i.e. no scaling
- Add a model sample for each image in the dataset. For each one:
- Set the flag classified of the image in order for the image to be considered for the learning
- Set the sample centre position
- Set the sample UUID in order to uniquely identify the sample
- Add the sample to the image
Definition at line 136 of file deep_cortex_svl_simple.c.