General explanation of output from train_ssd.py [Avg Loss, Avg Regression etc.]

Hello everyone! I search for a more broad explanation of some output. Maybe someone can explain briefly or provide some links to ressources.

If I run the help command
python3 train_ssd.py --help
I get a lot of output. Can someone elebarate what these flags mean or what they do?

--balance-data        
Balance training data by down-sampling more frequent labels.
--momentum MOMENTUM   
Momentum value for optim
--debug-steps DEBUG_STEPS
Set the debug log output frequency.

What does this parameters do? Can you give an example?

--net NET             
The network architecture, it can be mb1-ssd, mb1-lite-
ssd, mb2-ssd-lite or vgg16-ssd.

Are the networks preinstalled? If yes, where? If no, where do I get them? Is mb2-ssd-lite-mp-0_686.pth in the models folder the underlying net architecture?

Futhermore.
Let’s observe a single line from the logs of train_ssd.py

2021-11-03 19:48:55 - Epoch: 119, Step: 10/82, Avg Loss: 4.0392, Avg Regression Loss 1.4322, Avg Classification Loss: 2.6070

What means Avg Loss?
What means Avg Regression Loss?
What means Avg Classification Loss?
And how to interpret the numbers given?

If you can’t provide a short answer, send some links to the resources.

Thank You!

Hi @a.marthin, I would recommend referring to the original upstream GitHub repo for train_ssd.py here:

I forked this and added a few tweaks of my own, however I don’t use all of the command-line options myself.

If there is a class that has a lot more data samples than the others, then samples will be randomly skipped from that class as to not bias the dataset. It appears this only applies to the Open Images type of dataset.

This is the momentum parameter used for the SGD optimizer that gets used during training. See this for an explanation: https://ruder.io/optimizing-gradient-descent/index.html#momentum

This just prints the log output to the terminal more or less frequently, this line:

2021-11-03 19:48:55 - Epoch: 119, Step: 10/82, Avg Loss: 4.0392, Avg Regression Loss 1.4322, Avg Classification Loss: 2.6070

Check the upstream repo for the other networks.

Not all of them are tested to be working with ONNX export from PyTorch and ONNX import into TensorRT. This is why I stick with SSD-Mobilenet-v1 version.

Avg Regression Loss is the average error of the bounding box locations.
Avg Classification Loss is the average error of the object classifications.
Together they combine to form the total average loss (detecting the right class of object in the correct location)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.