h4nwei / SPAQ

[CVPR2020] Official SPAQ & Implementation
170 stars 35 forks source link

Output shape of network #6

Closed KleinXin closed 4 years ago

KleinXin commented 4 years ago

In the demo code BL_demo.py

In line 68, score_1 = self.model(image_1).mean()

If the output of the model is a scalar which is the score of the image, why the mean value is calculated as the score of the image?

I use two images with shape 910x512 and 560x420, the shapes of output are 32 and 24

h4nwei commented 4 years ago

Dear KleinXin@KleinXin

During testing, we crop 2242243 patches from a test image with a stride of 112. The final quality and attribute scores are computed by averaging all patch predictions.

Best, Hanwei

KleinXin commented 4 years ago

Thx! After carefully reading the Prepare_image code, I realized that you cropped patches from the image.

Another question is that during the trainning, the same procedure is performed as well?

h4nwei commented 4 years ago

Thx! After carefully reading the Prepare_image code, I realized that you cropped patches from the image.

Another question is that during the trainning, the same procedure is performed as well?

Hi KleinXin,

When we trained the network, we randomly crop 2242243 patches from an image.

h4nwei commented 4 years ago

Typo: 2242243 -> 224*224*3

KleinXin commented 4 years ago

Thx! I will try to write the trainnning codes by myself.

Twang1998 commented 2 years ago

@KleinXin could you please share the training codes with me? I tried to write training code but it couldn't reach the performance of the article.