ORippler / gaussian-ad-mvtec

Code underlying our publication "Modeling the Distribution of Normal Data in Pre-Trained Deep Features for Anomaly Detection" at ICPR2020
GNU Affero General Public License v3.0
99 stars 18 forks source link

_pickle.PicklingError: #1

Closed Kokoing123 closed 3 years ago

Kokoing123 commented 3 years ago

when I was used, on the val step, program crashed by error:"_pickle.PicklingError: Can't pickle <function MVTecAD. at 0x000002EC4FA7A8B8>: attribute lookup MVTecAD. on src.datasets.mvtecad failed".

ORippler commented 3 years ago

Hi,

did you make sure to set up the environment by using environment.yml ? Also, which OS are you on? As stated in the Readme, Code is written in Python 3.7 and was tested only on Ubuntu 18.04 using the specified environment.yml. If you follow instructions, you shouldn't get this error.

Nonetheless, my guess the pickling error comes from the lambda function used to specify the default value for target_transform.

Best,

Kokoing123 commented 3 years ago

thank you very much, I thought the reason is that platform os, my os is windows 10, and now I use ubuntu 18.04 to test it, it work well.

ORippler commented 3 years ago

Glad it's working for you now :)