CaffeinatedCoding commited on
Commit
2ac1b86
·
verified ·
1 Parent(s): 4756353

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. api/startup.py +1 -0
  2. src/patchcore.py +1 -1
api/startup.py CHANGED
@@ -36,6 +36,7 @@ def download_artifacts():
36
 
37
  files_to_download = [
38
  ("models/pca_256.pkl", "data/pca_256.pkl"),
 
39
  ("configs/thresholds.json", "data/thresholds.json"),
40
  ("graph/knowledge_graph.json", "data/knowledge_graph.json"),
41
  ("indexes/index1_category.faiss", "data/index1_category.faiss"),
 
36
 
37
  files_to_download = [
38
  ("models/pca_256.pkl", "data/pca_256.pkl"),
39
+ ("models/midas_small.onnx", "data/midas_small.onnx"),
40
  ("configs/thresholds.json", "data/thresholds.json"),
41
  ("graph/knowledge_graph.json", "data/knowledge_graph.json"),
42
  ("indexes/index1_category.faiss", "data/index1_category.faiss"),
src/patchcore.py CHANGED
@@ -149,7 +149,7 @@ class PatchCoreExtractor:
149
 
150
  # Gaussian smoothing
151
  if smooth:
152
- heatmap = scipy.ndimage.gaussian_filter(heatmap, sigma=4)
153
 
154
  # Normalise to [0, 1]
155
  h_min, h_max = heatmap.min(), heatmap.max()
 
149
 
150
  # Gaussian smoothing
151
  if smooth:
152
+ heatmap = scipy.ndimage.gaussian_filter(heatmap, sigma=2)
153
 
154
  # Normalise to [0, 1]
155
  h_min, h_max = heatmap.min(), heatmap.max()