C2FNet icon indicating copy to clipboard operation
C2FNet copied to clipboard

about the image size

Open TobyTongg opened this issue 2 years ago • 8 comments

Hi, Is the resolution of all input pictures 352*352?

TobyTongg avatar May 28 '22 07:05 TobyTongg

Hi, Is the resolution of all input pictures 352*352?

The images of the training set and the testing set have different resolutions, but after loading them, the resolution is uniformly modified to 352x352, so the input size of the model is Bx3x352x352.

thograce avatar May 28 '22 08:05 thograce

But why does the resolution of the picture changed when I am training? For example, the x4(resnet_layer4) should be (batchsize, 2048, 11, 11) all the time, but when I trained it, it appeared x4(batchsize, 2048, 8, 8), and I didn't change any parameters.

TobyTongg avatar May 28 '22 08:05 TobyTongg

OK, thanks for your help!

TobyTongg avatar May 28 '22 08:05 TobyTongg

OK, thanks for your help!

The last reply was wrong. I just remembered the reason. I use multi-scale input instead of data enhancement, which is also explained in the paper. I use [0.75,1,1.25] three scaling ratios to scale the picture, and ensure that the picture size is an integral multiple of 32, so each picture will be trained in three sizes of [256x256, 352x352, 448x448] in one epoch.

thograce avatar May 28 '22 09:05 thograce

OK, thanks for your help!

During the testing stage, all input images are 352x352.

thograce avatar May 28 '22 09:05 thograce

I understand, thanks a lot!

TobyTongg avatar May 28 '22 09:05 TobyTongg

OK, thanks for your help!

The last reply was wrong. I just remembered the reason. I use multi-scale input instead of data enhancement, which is also explained in the paper. I use [0.75,1,1.25] three scaling ratios to scale the picture, and ensure that the picture size is an integral multiple of 32, so each picture will be trained in three sizes of [256x256, 352x352, 448x448] in one epoch.

Correct it: [256x256, 352x352, 416x416].

thograce avatar May 28 '22 09:05 thograce

I understand, thanks a lot!

You're welcome! It's a good question.

thograce avatar May 28 '22 09:05 thograce