thograce / C2FNet

Context-aware Cross-level Fusion Network for Camouflaged Object Detection
48 stars 18 forks source link

about the image size #4

Open TobyTongg opened 2 years ago

TobyTongg commented 2 years ago

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

thograce commented 2 years ago

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.

TobyTongg commented 2 years ago

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 commented 2 years ago

OK, thanks for your help!

thograce commented 2 years ago

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 commented 2 years ago

OK, thanks for your help!

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

TobyTongg commented 2 years ago

I understand, thanks a lot!

thograce commented 2 years ago

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 commented 2 years ago

I understand, thanks a lot!

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