caoyunkang / CDO

[TII 2023] Collaborative Discrepancy Optimization for Reliable Image Anomaly Localization
MIT License
63 stars 7 forks source link

RuntimeError: stack expects each tensor to be equal size, but got [1, 256, 256] at entry 0 and [3, 256, 256] at entry 7 #14

Open gongmingbanzhi opened 2 days ago

gongmingbanzhi commented 2 days ago

When I used my own dataset for training, an error occurred: QQ图片20241112112744

caoyunkang commented 2 days ago

It appears that your images are in grayscale rather than RGB format. You can update the dataset file to ensure images are read in RGB format.