SSD Small Object Detection
The ssd_tiled_dataset_mindspore folder is added for SSD small object detection based on product applications. Compared with the ssd_mobilenet_fpn_mindspore folder, only the on_platform/plat_cfg.yaml file is different. You can add extra command parameters to enable this function. The ssd_tiled_dataset_mindspore folder is recommended.
Training Parameters and Value Ranges
The following parameters are added to the SSD small object detection training parameters in Table 1. For details, see Table 1.
Parameter |
Type |
Value Range |
Default Value |
Description |
|---|---|---|---|---|
--split_image |
Bool |
True or False |
True |
Whether to enable small object detection. |
--split_auto |
Bool |
True or False |
False |
Whether to automatically set parameters for small object detection. |
--split_resize_ratio |
String |
Range of the two numbers in a value: [0.1,10]. |
"2,2" |
Scaling ratio of the original image. The two numbers in the value indicate the width and height. |
--split_block_size |
String |
Range of the two numbers in a value: [256,2048]. |
"896,896" |
Size of image blocks. The two numbers in the value indicate the width and height. |
--split_overlap_size |
String |
Range of the two values: [128, minimum value of split_block_size-128] |
"256,256" |
Size of the overlapping area of image blocks. The two numbers in the value indicate the width and height. |
Training Command Reference
python3 tiled_dataset_train.py --train_dataset_path={dataset_path} --train_output_path={output_path} --pretrained_ckpt_path={path_of_the_pre-trained_model} --epoch_size=100 --batch_size=4 --input_width=2048 --input_height=1536 --init_lr=0.001 --device_num=1 --run_eval=True --eval_start_epoch=5 --split_resize_ratio=4,4 --split_block_size=896,896 --split_overlap_size=128,128 --split_auto=False --split_image=True
Evaluation Parameters and Value Ranges
The evaluation script is stored in /mxAOITraining/ssd_mobilenet_fpn_mindspore/tiled_dataset_eval.py.
Table 2 describes the evaluation parameters for SSD small object detection.
Evaluation Command Reference
python3 tiled_dataset_eval.py --eval_dataset_path={evaluation_dataset_path} --eval_ckpt_path={output_path} --eval_output_path=./eval_result