MCPcopy Index your code
hub / github.com/amazon-science/patchcore-inspection / predict

Method predict

src/patchcore/patchcore.py:178–181  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

176 self.anomaly_scorer.fit(detection_features=[features])
177
178 def predict(self, data):
179 if isinstance(data, torch.utils.data.DataLoader):
180 return self._predict_dataloader(data)
181 return self._predict(data)
182
183 def _predict_dataloader(self, dataloader):
184 """This function provides anomaly scores/maps for full dataloaders."""

Callers 7

test_dummy_patchcoreFunction · 0.45
test_patchcore_real_dataFunction · 0.45
_predictMethod · 0.45
runFunction · 0.45
runFunction · 0.45

Calls 2

_predict_dataloaderMethod · 0.95
_predictMethod · 0.95

Tested by 4

test_dummy_patchcoreFunction · 0.36
test_patchcore_real_dataFunction · 0.36