mjkwon2021 / CAT-Net

Official code for CAT-Net: Compression Artifact Tracing Network. Image manipulation detection and localization.
226 stars 26 forks source link

the Resolution is lower #1

Open brightendavid opened 3 years ago

brightendavid commented 3 years ago

when I test your code ,I find the Resolution of output is lower than the input.How can I solve the problem.

CauchyComplete commented 3 years ago

Hi,

Heatmaps use a smaller size output, but you can use the pred variable in tools/infer.py to handle the full-resolution output.

https://github.com/mjkwon2021/CAT-Net/blob/17d294d82f9e402484bf82637ba992fdc304c0e7/tools/infer.py#L135

brightendavid commented 3 years ago

thank you for your answer, the resoluton of the output will always be (w//4,h//4),is that designed on porpose? or it may be a problem result from my torch version.

CauchyComplete commented 3 years ago

@brightendavid Yes, the outputs have 1/4 resolution. This is due to two stride-2 convolutions at the very beginning, as explained in the paper 😊