Renesas
RZ/V AI

6.00

The best solution for
starting your AI applications.

Provided by Renesas Electronics Corporation


To keep you updated,
Watch our GitHub repository
Watch



This project is maintained by renesas-rz

Hosted on GitHub Pages — Theme by orderedlist

How to Re-train AI model



This page explains how to re-train the AI model of AI Applications using RZ/V AI Transfer Learning Tool.

Supported version: RZ/V AI Applications v6.00


Introduction

RZ/V AI Transfer Learning Tool (TLT) can re-train AI model used in RZ/V AI Applications with different datasets.

RZ/V AI Transfer Learning Tool has 5 Sections.
  • PROJECT DETAILS: Create new project or load an existing project.
  • ANNOTASTION: Create your own training data by labeling images.
  • DATASET: Load the dataset to be used for training.
  • TRAINING: Train the model on the selected dataset.
  • INFERENCE: Test the trained model.




Supported Functions of AI Applications

Function Name of AI Application TLT Project Name AI Model Task Type Download Dataset Name *1 Target product
in AI Application
RZ/V2L RZ/V2H and RZ/V2N
01_Head_count 01_Head_count_yolov3 YOLOv3 Object detection 01 Head Count(141MB)
02_Line_crossing_object_counting 02_Line_crossing_object_counting_tinyyolov3 TinyYOLOv3 Object detection 02 Line Cross Object Counting(141MB) -
02_Line_crossing_object_counting_yolov3 YOLOv3 Object detection 02 Line Cross Object Counting(141MB) -
03_Elderly_fall_detection 03_Elderly_fall_detection_tinyyolov2 TinyYOLOv2 Object detection 03 Elderly Fall Detection TinyYolov2(18.6GB)
03_Elderly_fall_detection_HRNet HRNet Keypoint detection 03 COCO 16 Keyopoint
04_Safety_helmet_vest_detection 04_Safety_helmet_vest_detection_yolov3 YOLOv3 Object detection 04 Safety Helmet Vest Detection(3.42GB)
07_Animal_detection 07_Animal_detection_yolov3 YOLOv3 Object detection 07 Animal Detection(1.83GB)
09_Human_gaze_detection 09_Human_gaze_detection_resnet18 ResNet18 Classification 09 Human gaze detection resnet18(17GB)*2
09_Human_gaze_detection_tinyyolov2 TinyYOLOv2 Object detection 09 Human gaze detection(4.43GB)*2
10_Driver_monitoring_system 10_Driver_monitoring_system_tinyyolov2 TinyYOLOv2 Object detection 10 Driver Monitoring System TinyYolov2(4.43GB) -
10_Driver_monitoring_system_yolov3 HRNet Object detection 10 Driver Monitoring System Yolov3(1.80GB) -
10_Driver_monitoring_system_Deeppose DeepPose Keypoint detection 10 Driver monitoring system Deeppose(723MB)
11_Head_count_topview 11_Head_count_topview_yolov3 YOLOV3 Object detection 11 Head Count Topview(1.8GB)
12_Hand_gesture_recognition_v2 12_Hand_gesture_recognition_v2_resnet_18 ResNet18 Classification 12 Hand Gesture Recognition Resnet(21.9GB) -
12_Hand_gesture_recognition_v2_tinyyolov3 TinyYOLOv3 Object detection 12 Hand Gesture Recognition Tiny Yolo(1.2GB) -
12_Hand_gesture_recognition_yolov3 YOLOv3 Object detection 12 Hand gesture recognitionyolov3(161MB) -
13_Car_ahead_departure_detection 13_Car_ahead_departure_detection_tinyyolov3 TinyYOLOv3 Object detection COCO
14_Multi_camera_vehicle_detection 14_Multi_camera_vehicle_detection_yoloxl YOLOX-l Object detection 14 Multi Camera Vehicle Detection(249MB) -
15_Road_lane_segmentation 15_Road_lane_segmentation_unet Unet Segmentation 15 Road Lane Segmentation(68MB) -
Q01_footfall_counter Q01_footfall_counter_tinyyolov3 TinyYOLOv3 Object detection COCO -
Q01_footfall_counter_yolov3 YOLOV3 Object detection COCO -
Q03_smart_parking Q03_smart_parking Custom model Classification Q03 Smart Parking(421MB) -
Q04_fish_classification Q04_fish_classification_resnet34 ResNet34 Classification Q04 Fish Classification(1.58GB)
Q06_expiry_date_detection Q06_expiry_date_detection_tinyyolov3 TinyYOLOv3 Object detection Q06 Expiry Date Detection(1.32GB) -
Q06_expiry_date_detection_yolov3 YOLOv3 Object detection Expiry Date Detection(1.32GB) -
Q07_plant_disease_classification Q07_plant_disease_classification_resnet34 ResNet34 Classification Q07 Plant Disease(1.34GB)
Q08_object_counter Q08_object_counter_animal_tinyyolov3 TinyYOLOv3 Object detection Q08 Object Counter Animal(6.97GB) -
Q08_object_counter_animal_yolov3 YOLOv3 Object detection Q08 Object Counter Animal(6.97GB) -
Q08_object_counter_coco_tinyyolov3 TinyYOLOv3 Object detection COCO -
Q08_object_counter_coco_yolov3 YOLOv3 Object detection COCO -
Q08_object_counter_vehicle_tinyyolov3 TinyYOLOv3 Object detection Q08 Object Counter Vehicle(1.51GB) -
Q08_object_counter_vehicle_yolov3 YOLOv3 Object detection Q08 Object Counter Vehicle(1.51GB) -
Q09_crack_segmentation Q09_crack_segmentation_unet Unet Segmentation Q09 Crack Segmentation(0.99GB)
Q10_suspicious_person_detection Q10_suspicious_person_detection_tinyyolov3 TinyYOLOv3 Object detection Q10 Suspicious Person Detection(1.57GB) -
Q10_suspicious_person_detection_yolov3 YOLOv3 Object detection Q10 Suspicious Person Detection(1.57GB) -
Q11_fish_detection Q11_fish_detection_tinyyolov3 TinyYOLOv3 Object detection Q11 Fish Detection(708MB) -
Q11_fish_detection_yolov3 YOLOv3 Object detection Q11 Fish Detection(708MB) -
Q12_yoga_pose_estimation Q12_yoga_pose_estimation_custom_classifier Custom model Classification Q12 Yoga Pose Estimation Dataset(15MB) -
Q12_yoga_pose_estimation_HRNet HRNet Keypoint detection Q12 COCO 17 Keypoint -
*1: Datasets will be downloaded automatically as needed.
*2: This file is temporarily unavailable for automatic download. To obtain the file, please contact Renesas Technical Support.

Unsupported Functions of AI Applications

The following Functions of AI Applications are NOT supported.
  • 05_Age_gender_detection
  • 06_Face_recognition_spoof_detection
  • 08_Hand_gesture_recognition
  • Q02_face_authentication
  • Q05_suspicious_activity
  • C01_river_area_monitoring
  • C02_depth_cam_human_body_estimation
  • C03_surface_anomaly_detection


Installation

To start using RZ/V AI Transfer Learning Tool, PC that can display the desktop with the following environment is recommended.

Hardware

Description Specification
Linux OS Ubuntu 20.04 and above.
Processor Intel(R) Xeon(R) and above.
GPU Any GPU with CUDA.
Storage At least 100GB of free space is necessary.

Software

Description Specification
Python 3.10.5
Docker 28.1.1
Other software not listed above will be installed automatically when you install the tool.


Installation procedures

This chapter describes the installation procedure when using RZ/V AI Transfer Learning Tool alone.

Note If you use AI Navigator of e2 studio, the installation procedure is different, so please refer to AI Navigator Quick Start Guide. In AI Navigator v2.0.0 (latest), RZ/V AI Transfer Learning Tool v4.00 will be automatically installed, so please see the documentation for previous version.
  1. If you have not yet obtained RZ/V AI Transfer Learning Tool v6.00, click on the link below to download it.

    Download Link

  2. Put the downloaded tar file into a Linux PC and extract it using the following command in a terminal.
    tar -xzvf RTK0EF0178Z06000SJ_rzv-ai-tlt.tar.gz

    Make sure the following folders and files are generated after extracting the tar file.
    Tool File Structure
    Folder or File Name Description
    docs/ r21ut0254ej0600-rzv-ai-tlt.pdf User's Manual.
    rzv_ai_tlt_v6.00/ tlt_backend/ install_docker.sh Script to install TLT.
    launch_tlt_service.sh Script to setup the TLT docker container.
    requirements.txt Package list for installing TLT.
    uninstall_tlt.sh Script to uninstall TLT.
    assets/ TLT projects directory.
    Note: This directory is created by installation procedure.
    datasets/ Datasets directory
    Note: This directory is created by installation procedure.
    start_rzv_ai_tlt_gui.sh Launch the TLT GUI.
  3. Change to tlt_backend directory and install the tool.
    cd RTK0EF0178Z06000SJ_rzv-ai-tlt/rzv_ai_tlt_v6.00/tlt_backend
    ./install_docker.sh

  4. Build the docker image and start the docker container.
    ./launch_tlt_service.sh

  5. Change to rzv_ai_tlt_v6.00 directory and launch the tool.
    cd ../
    ./start_rzv_ai_tlt_gui.sh

    RZ/V TLT Launch

    If the popup is "Docker container is up and running", click "OK" to start.
    Note If the docker container is not running, you can restart it by clicking the RESTART button in the upper right corner of the GUI.
    RZ/V TLT Project Details


Re-train the AI model

Once the installation is complete, you can retrain the model.

Step 1: Create the TLT project

  1. Select PROJECT DETAILS.

    RZ/V TLT Project Details

  2. After selecting UPLOAD, upload the YAML file in UPLAOD YAML.
    The YAML files for existing projects are located at rzv_ai_tlt_v6.00/tlt_backend/assets/(any YAML file of TLT project)/config.yaml.
    This time, we uploaded rzv_ai_tlt_v6.00/tlt_backend/assets/Q03_smart_parking/config.yaml.

    RZ/V TLT Project Upload

  3. Set the project name and click SUBMIT SELECTION.
    (The project name must be different from any existing project.)
    If successful, Successfully created the task!! will be displayed.

    RZ/V TLT Project Loaded


Step 2: Create the custom dataset

In ANNOTATION, you can create custom datasets only for object detection.

RZ/V TLT Project Loaded

This time, since Q03_smart_parking is a classification model, we will skip ANNOTATION.
Please refer to the user's manual for how to use ANNOTATION.


Step 3: Load the dataset

  1. Select DATASET.

    RZ/V TLT Project Loaded

  2. Click Download Dataset and Select a dataset from the list.
    The list of downloadable datasets changes depending on the loaded project.
    This time, we use Q03 Smart Parking.

    RZ/V TLT Project Loaded

  3. Click Download button to download the dataset.
    (After it reaches 100%, it will take some time to unpack the downloaded file, depending on the size of the dataset.)

    RZ/V TLT Project Loaded

  4. Click SELECT DIRECTORY to select the dataset directory, and click NEXT.
    The downloaded dataset is located at rzv_ai_tlt_v6.00/tlt_backend/datasets/.
    This time, we use rzv_ai_tlt_v6.00/tlt_backend/datasets/Q03_smart_parking/.

    RZ/V TLT Project Loaded

  5. Set the image size to input to the model and select Augmentation.
    This time, leave the defaults and click NEXT.

    RZ/V TLT Project Loaded

  6. Set the dataloader parameters according to your PC environment.
    This time, leave the defaults and click FINISH.

    RZ/V TLT Project Loaded

  7. After confirming the settings, click SUBMIT SELECTION.
    If the load is successful, the dataset configuration will be displayed.
    You can save the data set settings by clicking the SAVE CONFIGURATION button.

    RZ/V TLT Project Loaded


Step 4: Re-train the model

  1. Select TRAINING.

    RZ/V TLT Project Loaded

  2. Check the model and set the optimizer parameters.
    Click SUBMIT SELECTION and the learning log will be displayed.
    This time, leave everything as default.

    RZ/V TLT Project Loaded

  3. When Training Completed!!! pop-up appears, click OK to complete the training.

    RZ/V TLT Project Loaded

    The trained model is stored in the following directory.
    rzv_ai_tlt_v6.00/tlt_backend/assets/(Your TLT prject name).


Step 5: Test the trained model

  1. Select INFERENCE

    RZ/V TLT Project Loaded

  2. Click Choose Upload Type and UPLOAD to select a test image.
    This time, we select Image Upload and use rzv_ai_tlt_v6.00/tlt_backend/datasets/Q03_smart_parking/valid/occupied/0.jpg.

    RZ/V TLT Project Loaded

  3. Click PREDICT to test.
    Since Q03_smart_parking is a classification that predicts whether it is "occupied" or "empty", the result is displayed as a string.

    RZ/V TLT Project Loaded

  4. TLT usage procedure is complete.
    The trained model and logs are saved in the project folder.
    This time, the files are saved in rzv_ai_tlt_v6.00/tlt_backend/assets/Q03_smart_parking_new/.
    RZ/V TLT Project Loaded


Tips

Next steps

Once the model has been trained, the next step is to convert it for DRP-AI using DRP-AI TVM.
For instructions on how to use DRP-AI TVM, please see DRP-AI TVM GitHub.
If you use DRP-AI TVM with AI Navigator, sample code for DRP-AI TVM conversion scripts for each model is provided.


Uninstallation

For instructions on how to uninstall TLT, please refer to the user's manual.