Training Image Deep Learning Model
Steps
1.Training Process and Parameters Introduction
1) First, open the Raster page in the software and select the button in Image Training. Choose the task based on the user's usage scenario.
Object Detection: This task requires labeled rectangular boxes as input. After training, it can detect objects in the image, with results shown as rectangular boxes.
Semantic Segmentation: This task requires labeled polygons representing semantic segmentation as input. The trained model can classify each pixel in the image, with results shown as polygons representing each category's area.
Traffic Sign Extraction : This task requires labeled polygons representing road markings as input. The trained model can extract road marking vectors.
2) Click Next (using the Yolo-ObjectDetect model for Object Detection as an example), and select the labeled training data.
As shown above, there are two modes: Automatic split training dataset and validation dataset and Manually divide training dataset and validation dataset. If the user has a specific validation machine, they can use the manual mode; if the user has only one dataset, they can choose to split it automatically. Here, we use the automatic dataset split as an example.
3) Click Add, Delete, or Clear to manage labeled data folders. Multiple folders can be added.
4) Click Next to set training parameters. As shown, you can specify the GPU to be used for training in the drop-down menu; this feature supports GPU training only.
5) Batch Size: The number of data inputs per training session. For example, if the batch size is 2, two sets of data will be trained in one batch. Generally, the larger the batch size, the higher the accuracy of the results, but it is recommended not to exceed 8. The upper limit is constrained by the memory size. Based on different memory sizes, the recommended batch sizes are as follows. If there is an "insufficient memory" or "insufficient GPU memory" error, reduce this parameter accordingly.
Yolo-ObjectDetect | MobileNet | Yolo-Segmentation | GVRoadMarking | |
---|---|---|---|---|
8GB | 2 | 2 | 2 | 2 |
10GB | 6 | 6 | 6 | 6 |
11GB | 6 | 6 | 6 | 6 |
12GB or more | 8 | 8 | 8 | 8 |
6) Maximun Number of Epochs : The largest training period. This parameter setting needs to be adjusted according to the changing trend of Loss and evaluation indicators. The specific value is set so that the value of Loss does not return to the optimal value. Default is 120.
7) Pre-trained Model Path: If training is interrupted, you do not need to retrain from scratch. You can use the saved model file as a pre-trained model to resume training.
- If you already have a trained model and new labeled data, you can train on the existing model without merging the original data, saving time. Ensure the categories and model names of the two training datasets are consistent.
8) Click Next to go to the training interface. The progress bar at the top shows the training progress, and the box below shows the training log.
9) Click Start to begin training. You can select the change curve to view in the drop-down menu. After the training stops, click Export Report to print the training report, which is automatically saved in the project file.
10)During training, observe the curve changes to analyze the training situation:
- Normally, the Loss decreases as the Epoch increases, stabilizing after tens or a hundred Epochs. If not, or if the Loss curve oscillates, stop training, check the data, and retrain.
- Normally, the mAP50 value increases as the Epoch increases, stabilizing at last. If not, stop training, check the data, and retrain.
- Normally, mAP50 increases gradually and stabilizes after a certain epoch. If it does not stabilize, the model has more training potential. Continue training with the pre-trained model until mAP50 stabilizes. If mAP50 does not increase, stop training, check the data, and retrain.
11)Export Report
After completing all training epochs, a report is automatically exported and opened. If not completed, click the export report button on the interface to export the report.
2.Training Project File Structure
The structure of the training project files is shown below, using the Yolo-Segmentation model as an example.