Parameters for Basic Detection Training and Model Evaluation
- Table 1 lists the names, types, value ranges, default values, and descriptions of the parameters related to SSD detection.
Table 1 SSD detection training parameters (ssd_mobilenet_fpn_mindspore/model_train.py) Parameter
Type
Value Range
Default Value
Description
--scale
int
1~10
4
Anchor scale.
--scales_per_octave
int
1~4
2
Number of feature scales at each layer.
--aspect_ratios
String
The value is a float ranging from 0.05 to 20. The number of values cannot exceed 10.
"1.0, 2.0, 0.5"
Anchor aspect ratio.
--color_adjust
bool
True or False
True
Whether to use random colors.
--random_crop
bool
True or False
True
Whether to enable random cropping.
--random_flip
bool
True or False
True
Whether to enable random flipping.
--train_dataset_path
String
-
None
Path of the training dataset.
--epoch_size
int
[1, 10000]
40
Number of training epochs.
--batch_size
int
Less than or equal to the number of images in the dataset.
[1, 512]
2
Batch size for training.
--loss_scale
int
[1, 2048]
1024
Loss scale.
--input_width
String
A multiple of 128 within [1,10000)
"2048"
Model input width.
--input_height
String
A multiple of 128 within [1,10000)
"1536"
Model input height.
--init_lr
float
(0, 1)
0.001
Training learning rate.
--weight_decay
float
(0, 1)
0.00004
Weight decay.
--quick_train
bool
True or False
False
Fast training switch.
--pretrained_ckpt_path
String
-
"pre_trained_ckpt"
Path for storing the pre-trained model.
--device_id
int
[0,7]
0
ID of NPU used for training.
--device_num
int
Currently, only one device is supported, that is, the value can only be 1.
1
Number of NPUs used for training.
--filter_weight
bool
True or False
True
Whether to filter the head network weight parameter.
--save_checkpoint_epochs
int
-
10
Interval (by epoch) for saving the training CKPT.
--train_output_path
String
-
"train_output_path"
Training output path.
--save_best_ckpt
bool
True or False
True
Whether to save the CKPT with the best accuracy when training and validation are performed simultaneously. (This parameter will be deleted in later versions.) Currently, when run_eval is set to True, the CKPT with the best accuracy is saved by default.
--run_eval
bool
True or False
True
Whether to enable the evaluation function during training.
--eval_start_epoch
int
-
5
Sequence umber of epochs from which evaluation is enabled when training and evaluation are performed simultaneously.
--eval_interval
int
[1, 10000]
5
Model evaluation interval (by epoch) when training and evaluation are performed simultaneously.
--enable_modelarts
bool
True or False
False
Whether to use ModelArts for training.
--data_url
String
-
None
Dataset path for the ModelArts training.
--train_output_url
String
-
None
Output path for the ModelArts training.
--checkpoint_url
String
-
None
Path of the pre-trained model for the ModelArts training.
- Table 2 lists the names, types, value ranges, default values, and descriptions of the evaluation parameters related to SSD detection.
Table 2 SSD detection evaluation parameters (ssd_mobilenet_fpn_mindspore/model_eval.py) Parameter
Type
Value Range
Default Value
Description
--device_id
int
[0,7]
0
ID of the NPU for evaluation.
--eval_ckpt_path
String
-
None
Path for obtaining the evaluation CKPT. You need to specify the training output path.
--eval_output_path
String
-
"eval_output_path"
Output path of the evaluation results.
--min_score
float
-
0.4
Confidence threshold.
--nms_threshold
float
-
0.2
IoU threshold during NMS processing.
--eval_dataset_path
String
-
None
Path of the evaluation dataset.
--enable_modelarts
bool
True or False
False
Whether to use ModelArts for training.
--data_url
String
-
None
Dataset path for evaluation on ModelArts.
--eval_output_url
String
-
None
Output path for evaluation on ModelArts.
--checkpoint_url
String
-
None
Path of the pre-trained model during evaluation on ModelArts.
--pretrained_ckpt_path
String
-
"pre_trained_ckpt"
Path of the pre-trained model.