Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- api/startup.py +1 -0
- 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=
|
| 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()
|