Closed Six-walnuts-Lu closed 1 year ago
how many channels does your data have? what's the shape of your input tensor
train and test data is 3 channels,ground_truth is 1 channels,the shape of my input tensor is [1024,1024]
I'm not sure what the problem is. But it's pretty obvious that there's something wrong with the transforms.Normalize
. My suggestion is to check the dataset, especially the shape of the tensors.
I got the problem.My solution is that change those image with something wrong.
I guess the size of input image does not match the feature extractor, e.g. 256 -> Resnet18
Well, the size of input image won't matter because of Resize() call. (Unless the horizontal length and vertical one are different. However this will call another error.) Well, I guess the reason is in MVTecDataset.image_transform in dataset.py. If you insert some codes as transforms.Lambda(lambda x: x.repeat(3, 1, 1)), the same error will occur.
Hello, thank you for your reproduction work. I used the grid data set in MVtec to reproduce, and the reproduction was very successful. However, I have a problem when I put my own data set into it. I have studied it for a long time and have not found a solution to the problem. I would like to ask for advice.![1660527826075](https://user-images.githubusercontent.com/105764651/184564951-4906d644-ee2f-4c80-a7d5-95ea9ecad612.jpg)