byungjae89 / SPADE-pytorch

PyTorch implementation of "Sub-Image Anomaly Detection with Deep Pyramid Correspondences"
Apache License 2.0
235 stars 43 forks source link

different value in pixel_auc #13

Open ssiing opened 2 years ago

ssiing commented 2 years ago

i try this code ,but i got the same image-auc, but the pixel-auc is much lower than the value of yours. so i want to know why .

ssiing commented 2 years ago

i had solved this question we must put the dataset in the data file

sjtuytc commented 2 years ago

i had solved this question we must put the dataset in the data file

what does this mean?

ssiing commented 2 years ago

i had solved this question we must put the dataset in the data file

what does this mean?

the code has the data folder, we need to create a new folder named mvtec_anomaly_detection in data folder, and then put all the categories of mvtec in this folder, so that we can get the same results.

sjtuytc commented 2 years ago

i had solved this question we must put the dataset in the data file

what does this mean?

the code has the data folder, we need to create a new folder named mvtec_anomaly_detection in data folder, and then put all the categories of mvtec in this folder, so that we can get the same results.

Thanks for your quick reply. I think I did the same but I still fail to reproduce the official results. Isn't this done by the code automatically?

image
ssiing commented 2 years ago

i had solved this question we must put the dataset in the data file

what does this mean?

the code has the data folder, we need to create a new folder named mvtec_anomaly_detection in data folder, and then put all the categories of mvtec in this folder, so that we can get the same results.

Thanks for your quick reply. I think I did the same but I still fail to reproduce the official results. Isn't this done by the code automatically? image

I have made some modifications to the provided code to make it better for testing. I will take the time to upload the code tomorrow. You can find it on my homepage.

sjtuytc commented 2 years ago

Thank you very much!

hellojun12 commented 2 years ago

I'm also having problem with this, I can't reproduce pixel-auc in the cloned repository. It will be very helpful if you could help me

ssiing commented 2 years ago

I have uploaded my revised code on my homepage, you can go to see that version of the code

mgpadalkar commented 2 years ago

Looks same as https://github.com/byungjae89/SPADE-pytorch/issues/15#issuecomment-1230535825

HuangZH-21 commented 1 year ago

If using torch not same as 1.5.0, it will return a error result image.When I use torch==1.12.1 to run, I found torch.pairwise_distance return shape[100, 256, 56] is not the shape I need.

torch.pairwise_distance in different torch version return different shape dist_matrix in main.py line138.

Hence, I add the following code before calculating distance matrix in main.py line 135. feat_gallery = feat_gallery.transpose(1,2).transpose(2,3) test_feat_map = test_feat_map.transpose(1,2).transpose(2,3)

npuprince commented 11 months ago

If using torch not same as 1.5.0, it will return a error result image.When I use torch==1.12.1 to run, I found torch.pairwise_distance return shape[100, 256, 56] is not the shape I need.

torch.pairwise_distance in different torch version return different shape dist_matrix in main.py line138.

Hence, I add the following code before calculating distance matrix in main.py line 135. feat_gallery = feat_gallery.transpose(1,2).transpose(2,3) test_feat_map = test_feat_map.transpose(1,2).transpose(2,3)

It works! Appreciate it.

linsole commented 6 months ago

If using torch not same as 1.5.0, it will return a error result image.When I use torch==1.12.1 to run, I found torch.pairwise_distance return shape[100, 256, 56] is not the shape I need.

torch.pairwise_distance in different torch version return different shape dist_matrix in main.py line138.

Hence, I add the following code before calculating distance matrix in main.py line 135. feat_gallery = feat_gallery.transpose(1,2).transpose(2,3) test_feat_map = test_feat_map.transpose(1,2).transpose(2,3)

Thank you very much sir! You deserve a thousand thanks.