AdneneBoumessouer / MVTec-Anomaly-Detection

This project proposes an end-to-end framework for semi-supervised Anomaly Detection and Segmentation in images based on Deep Learning.
278 stars 59 forks source link

raise ValueError("third dimension must be 3 or 4") ValueError: third dimension must be 3 or 4 #12

Closed mozhuqing closed 4 years ago

mozhuqing commented 4 years ago

An error occurred when I ran validate.py with a script. The data set gives a graph with dimension 3. How can I fix this mistake?

AdneneBoumessouer commented 4 years ago

which command did you use to run the validation script exactly ?

AdneneBoumessouer commented 4 years ago

You maybe still running the old version of validate.py. Try pulling the new version from the master branch and try running the validation script as explained in the readme.

mozhuqing commented 4 years ago

That is: "python validate.py -p saved_models/SSIM/21-02-2020_09/CAE_mvtec_b32.h5"

AdneneBoumessouer commented 4 years ago

Hi, I have fixed the bug in the branch dev2. So you need to pull from this branch for the error not to occur during validation. I have also corrected a mistake related to the mvtec model architecture. You'll now be able to see much better reconstructions. You can check some of the latest validation results in saved_models/MSE and saved_models/SSIM, which contain an example image, its reconstruction and the resulting resmap.