The results of ssd tlt object detection model do not improve with custom parameters

I trained two custom datasets with ssd object detection model using mobilenetv1 backbone in tlt with original parameters in the tlt document (I use this tlt image version: tlt-streamanalytics:v2.0_py3).

the mAP results of my training are as below (after 100 epochs):

  1. first dataset with 2 classes and 7851 images, the mAP result reached to %80.
  2. second dataset with 1 class and 14500 images, the mAP result reached %83.

for improving the results I did some preprocessing on images :
preprocessing step:
a) I extracted the aspect ratio of boxes to set the aspect_ratios_global property in ssd_config file
b) and among different dimension of my images, I extracted the frequency size of my images
for 1st dataset most of my images are 1070 * 600 so I resized all images
to this size.
for 2nd dataset most of them are 224 * 224 then I resized my images to
this size.

and also changed these following parameters of ssd_config file:
c. learning-rate
d. number of epochs
e. number of batch
f. zoom_min, zoom_max in spatial_augmentation
g. and regularizer type(L1, L2).

(it should be mentioned I don’t want to change the mv1 backbone).

but with these custom parameters, the mAP result decreased instead of improving.
the best results are obtained when I resized my images to the original size mentioned in tlt : 1248 * 384, with original parameters in tlt config file.

  • why the results do not improve by changing the parameters of config file which are more adaptable than original parameter values?

  • why the original config file of ssd caused better results in both datasets?

I trained these 2 datasets with TensorFlow for 1st the mAP is %86 but tlt mAP is %80,
for 2nd dataset mAP of TensorFlow is %89 but tlt mAP is %83.

Firstly, when you train “2 classes and 7851 images” and get 80% mAP, can you attach your training spec?
Secondly, when you train “1 class and 14500 images”, and get 83% mAP, can you attach the training spec too?

Sure, my train spec files for mAP 80 and 83 are attached.train_f_ssd_mv1_1248_384.txt (1.6 KB) train_h_ssd_mv1_1248_384.txt (1.7 KB)

Generally speaking, more experiments are still needed or checked. Given that your current spec as a baseline, you can try below to check one by one.

  1. Set clustering_iou_threshold to 0.5
  2. Set min_bbox_width and min_bbox_height to 1
  3. finetune aspect ratio and scales. For example,
    aspect_ratios: “[[1.0, 2.0, 0.5], [1.0, 2.0, 0.5, 3.0, 1.0/3.0], [1.0, 2.0, 0.5, 3.0, 1.0/3.0], [1.0, 2.0, 0.5, 3.0, 1.0/3.0], [1.0, 2.0, 0.5], [1.0, 2.0, 0.5]]”
    scales: “[0.07, 0.15, 0.33, 0.51, 0.69, 0.87, 1.05]”
  4. Set soft_start to 0.01
  5. Set clip_boxes to true
  6. annealing time. You can set anneal point to 0.7 or 0.8.
  7. max_lr, min_lr and bs. This needs more experiments to find the best combination.
  8. Longer epochs.

More, please resize your 1st dataset to 1088x608, your 2nd datast to 224*224.

1 Like

Thanks @Morganh. I’m trying to change more parameters to get better results.