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

Train with pre_extracted = False #1

Closed rvermeire closed 2 years ago

rvermeire commented 2 years ago

When I run main.py with pre_extracted = False the follwoing assertion fails on line 522 of freia_funcs.py

assert len(input_vars) == 1, (f"Got single input tensor for "
AssertionError: Got single input tensor for forward pass, but expected list of 3.
scuShaker commented 2 years ago

When I run main.py with pre_extracted = False the follwoing assertion fails on line 522 of freia_funcs.py

assert len(input_vars) == 1, (f"Got single input tensor for "
AssertionError: Got single input tensor for forward pass, but expected list of 3.

I got the problem too , have you solved it?

marco-rudolph commented 2 years ago

As mentioned in the Readme, features can be extracted by executing _extractfeatures.py. This is recommended to speed up training. The latest commit supports training with pre_extracted=False.

rvermeire commented 2 years ago

Hi Marco, thanks for the quick fix! I think evaluate.py has the same issue and that was the main reason I reported it. If I understand correctly every unseen image in training has to have its features extracted during inference/evaluation. For use in industrial manufacturing this would be done in memory I guess?

marco-rudolph commented 2 years ago

You are right, I just modified evaluate.py as well.

If I understand correctly every unseen image in training has to have its features extracted during inference/evaluation. For use in industrial manufacturing this would be done in memory I guess?

This is correct.