Autonomous driving-SimpleNet study notes

1 pretreatment

DENSE_RATIO = 4

The reasons for choosing a ratio of 4 are as follows:

1. The sampling ratio of the lowermost feature map of DetectoRS FPN is 4,

You can look at their configuration file: https://github.com/joe-siyuan-qiao/DetectoRS/blob/master/configs/DetectoRS/DetectoRS_mstrain_400_1200_x101_32x4d_40e.py

2 Pre-trained model

When we train the model, we also need to use the pre-training model, where the pre-trained data comes from historical collection data;

2 Design of objective function

2.1 Definition of positive and negative samples

Here, the definition of positive and negative samples refers to the COCO data set standard.

(In the future, we will also need to define the definition standard of positive and negative samples suitable for this project according to the test)

In the COCO data set, the distinction between positive and negative samples is achieved through IoU,

The threshold for positive and negative samples is: IoU = 0.5

Screenshot below:

2.2 loss_heat_map——基于 Focal Loss

In the regression of heat maps, "sample imbalance" is a very serious problem, so we will design the loss function based on FL;

2.2.1 The setting of positive and negative thresholds-very important! ! !

The setting of positive and negative thresholds is very important. A higher positive sample threshold has a good effect on removing duplicate detection frames;

The physical meaning contained therein is to make the energy peak of center_heat_map more concentrated, so that gaussian_nms() will have a better effect;

In the CenterNet code, only one positive sample is selected, which is the center of the sample, as shown in the figure:

3 Post process

3.1 NMS-Use Soft-NMS

Because of the Soft-NMS algorithm used in CenterNet's paper;

4 notes

4.1 What if the input is inconsistent

You can use affine transformation to fill the input image to the maximum input size of the model;

5 Debugging notes

5.1 Increasing the threshold of the positive and negative samples of Focal Loss will make the imbalance problem serious

When I tried to solve "multiple duplicate detection boxes", I adjusted the threshold of neg_loss_t() to 0.95. As a result, the imbalance problem became serious.

The confidence prediction has a prediction score of about 0.4, as shown in the figure,

If this happens, you can further increase the value of the FL coefficient alpha;

And the loss seems to be reduced,

Guess you like

Origin blog.csdn.net/songyuc/article/details/106640599