Replies: 2 comments 15 replies
-
Have you tried to convert the image to a tensor?
|
Beta Was this translation helpful? Give feedback.
-
Hello @alexriedel1 : Also I would like to ask about my second question, when I train efficientAD on my own dataset, my task type is "classification". If I don't provide any anomaly images at this point and just provide OK images, will this have any effect on the accuracy of my model? Looking forward to your reply, thank you very much! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I want to do prediction with torch inference using Efficient Ad model. I used Padim model with torch inference in v0.7.0 version of Anomalib. But I found that Efficient Ad works very fast and I want to try it with torch inference in your latest version. I have trained my images with Efficient Ad with input size 1024x1024. I am getting error while testing. @samet-akcay @alexriedel1
The error is as follows:
Exception has occurred: AttributeError
'numpy.ndarray' object has no attribute 'to'
File “C:\Users\sema.egri\source\Workspaces\Anomalib-V1\anomalib\src\anomalib\deploy\inferencers\torch_inferencer.py”, line 213, in pre_process
return image.to(self.device)
File “C:\Users\sema.egri\source\Workspaces\Anomalib-V1\anomalib\src\anomalib\deploy\inferencers\torch_inferencer.py”, line 187, in predict
processed_image = self.pre_process(image)
File “C:\Users\sema.egri\source\Workspaces\Anomalib-V1\anomalib\tools\test.py”, line 35, in testTorch
output=current.predict(image)
File “C:\Users\sema.egri\source\Workspaces\Anomalib-V1\anomalib\tools\test.py”, line 107, in
labelList, predList, elapsedTime = testTorch(model_name, test_images_path, checkpoint_path)
AttributeError: 'numpy.ndarray' object has no attribute 'to'
Beta Was this translation helpful? Give feedback.
All reactions