You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I run CUDA_VISIBLE_DIVICES=0 python run.py -c configs/benchmark/patchcore/patchcore_256_100e.py -m test, I got message like this:
Traceback (most recent call last):
File "/data/xxx/PROJECTS/ADer/run.py", line 31, in
main()
File "/data/xxx/PROJECTS/ADer/run.py", line 27, in main
trainer.run()
File "/data/xxx/PROJECTS/ADer/trainer/patchcore_trainer.py", line 346, in run
self.test()
File "/home/xxx/anaconda3/envs/ader/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/data/xxx/PROJECTS/ADer/trainer/patchcore_trainer.py", line 233, in test
self.scores, self.preds = self.net.net_patchcore.predict(self.imgs)
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 747, in predict
patch_scores = image_scores = self.anomaly_scorer.predict([features])[0]
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 542, in predict
query_distances, query_nns = self.imagelevel_nn(query_features)
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 505, in
self.imagelevel_nn = lambda query: self.nn_method.run(
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 275, in run
return self.search_index.search(query_features, n_nearest_neighbours)
AttributeError: 'NoneType' object has no attribute 'search'
The text was updated successfully, but these errors were encountered:
The following command can be used: CUDA_VISIBLE_DEVICES=0 python run.py -c configs/benchmark/patchcore_256_100e.py -m train trainer.checkpoint=runs/benchmark/patchcore_256_100e/mvtec data.root=data/mvtec.
Currently, the PatchCore only supports 'train' mode. Since this method lacks a training process, it is equivalent to the test process.
when I run
CUDA_VISIBLE_DIVICES=0 python run.py -c configs/benchmark/patchcore/patchcore_256_100e.py -m test
, I got message like this:Traceback (most recent call last):
File "/data/xxx/PROJECTS/ADer/run.py", line 31, in
main()
File "/data/xxx/PROJECTS/ADer/run.py", line 27, in main
trainer.run()
File "/data/xxx/PROJECTS/ADer/trainer/patchcore_trainer.py", line 346, in run
self.test()
File "/home/xxx/anaconda3/envs/ader/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/data/xxx/PROJECTS/ADer/trainer/patchcore_trainer.py", line 233, in test
self.scores, self.preds = self.net.net_patchcore.predict(self.imgs)
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 747, in predict
patch_scores = image_scores = self.anomaly_scorer.predict([features])[0]
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 542, in predict
query_distances, query_nns = self.imagelevel_nn(query_features)
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 505, in
self.imagelevel_nn = lambda query: self.nn_method.run(
File "/data/xxx/PROJECTS/ADer/model/patchcore.py", line 275, in run
return self.search_index.search(query_features, n_nearest_neighbours)
AttributeError: 'NoneType' object has no attribute 'search'
The text was updated successfully, but these errors were encountered: