marco-rudolph / cs-flow

This is the official repository to the WACV 2022 paper "Fully Convolutional Cross-Scale-Flows for Image-based Defect Detection" by Marco Rudolph, Tom Wehrbein, Bodo Rosenhahn and Bastian Wandt.
111 stars 30 forks source link

Extend to all image sizes > 128 #15

Closed AlessioGalluccio closed 2 years ago

AlessioGalluccio commented 2 years ago

If the sizes of the image are not divisible by 128, the upscaled tensors could not match the correct dimensions. This fix uses interpolation and more precise upsampling to fix this problem

marco-rudolph commented 2 years ago

While I appreciate that you are contributing to this repository, I do not want to include it for the following reasons:

Basically I am open to minor changes. Anything beyond that is not the idea of the repository.

I really don't mean any harm and I'm also happy that people are interested in the work and want to contribute actively. I hope you can understand that.

AlessioGalluccio commented 2 years ago

I didn't know that if(x) wasn't standard syntax. Thank you for the feedback! I coded in C and Java in the past. I can understand your idea, no harm in that. This repo must be first and foremost loyal to the paper. I'm using this repo in my master thesis, so contributing to this project is a way to say thanks. I will open pull requests only for minor changes in the future then.

I know that this is not the right place, but can I ask you a thing about cs-flow that I can't understand? Why 768x768 resize? I ask this because this net seems to get worse results if I use a different size, even in datasets that have images of rectangular shapes (1024x256 in my case). This happened even before I used this fix.

marco-rudolph commented 2 years ago

Ah okay, I already guessed... Thank you and good luck with your thesis! :)

Why 768? That is really a good question. Tbh I just experimented with a few image sizes and this led to the best results. But it is really surprising that this holds in your case.

AlessioGalluccio commented 2 years ago

So, it just happened to be the best size. This is quite curious. Thank you very much!