mala-lab / InCTRL

Official implementation of CVPR'24 paper 'Toward Generalist Anomaly Detection via In-context Residual Learning with Few-shot Sample Prompts'.
Apache License 2.0
83 stars 12 forks source link

Hi, you can use **_torch.save()_** to generate .pt file for your own few-shot samples. #11

Closed kamenrideraway closed 2 months ago

kamenrideraway commented 3 months ago
          Hi, you can use **_torch.save()_** to generate .pt file for your own few-shot samples.

Originally posted by @Diana1026 in https://github.com/mala-lab/InCTRL/issues/7#issuecomment-2031421261 Thank you for this work.I want to test my own model,but I don't know exactly where should I use torch.save() to generate my own .pt file. And I don't know the structure of .pt file. Could you please give a more specific explaination? Thanks a lot.

Diana1026 commented 2 months ago

Hi, you can write a script and save the image features after your own image transformation. The structure of image features should be 3x240x240 (aligned with the input of the visual encoder).

kamenrideraway commented 2 months ago

Hi, you can write a script and save the image features after your own image transformation. The structure of image features should be 3x240x240 (aligned with the input of the visual encoder).

Thanks!