Experiment experience of deep learning and computer vision

Last updated on:5 months ago

This blog has been accumulating my network training and testing experience.

Design a new model

Use torchsummary to control the size of models.

Paper response waiting

If you are not in urgent, just wait for longer time, the reviewers are no obligation to review your paper in a short time. Good luck to you.

Should I use mean std deviation in dataloading?

Two datasets
Here is the mean_std influence on the semantic segmentation results in unlabelled STL-10 -> PASCALVOC 2012.
Pre-trained with mean_std, downstream:

In train and test, 39
only in train, 29.43645032748019
without, 38

Pre-trained without mean_std, downstream:

In train and test, 38.52592605514959
without, 39.462207680248554

Best: Do not use mean_std in either pre-trained or downstream task datasets.

Same dataset, linear classification protocol
Here is the mean_std influence on the semantic segmentation results in CIFAR10 classification.
Pre-trained with mean_std, downstream:

In train and test, 80.67999999999999
without, 80.36999999999999

Pre-trained without mean_std, downstream:

In train and test, 78.73
without, 80.57

Best: Use mean_std in both pre-trained and downstream task datasets.

Segmentation head

Only those model use depthwise separable conv could choose whether to keep the last expansion layer as backbone (e.g., efficientnet, shufflenet)

What to ignore in segmentation loss and mask filled?

Loss ignore is for the mask fill, those fill should not count on background class.

In the core/utils/score.py, the mIoU = area_inter / area_union. In this calculation method, how should I calculate the IoU of per class?

For the voc12-segmentation dataset, there are 21 classes. Should I remove the background class when calculating mIoU, does your calculation method take the background class into account?

When training the voc12-segmentation dataset, the background class number is 0, should I set ingore index = 0 in loss function(default is -1)?

Hi, my opinion is as follows:
1. The mean value was calculated in thie line, IoU contains the values of per class.
2. Both are ok, I have seen some articles comparing two mIoU at the same time (such as DRN). If your dataset is class-imbalance, I suggest to remove the background.
3. In most cases, the background is not necessary to ignore for VOC datasets.

It is calculated including backgroud. See, for example, the result from the evaluation server.

Reference:
https://github.com/Tramac/awesome-semantic-segmentation-pytorch/issues/86>
https://github.com/DrSleep/tensorflow-deeplab-resnet/issues/47>
http://muchong.com/t-9060670-2