Leon Sick
commited on
Commit
·
c202934
1
Parent(s):
f6d2e79
start of space
Browse files
model.py
CHANGED
|
@@ -112,7 +112,11 @@ def load_model(score_threshold: float) -> VisualizationDemo:
|
|
| 112 |
|
| 113 |
|
| 114 |
def run_model(image_path: str, score_threshold: float = 0.5) -> np.ndarray:
|
|
|
|
| 115 |
model = load_model(score_threshold)
|
|
|
|
| 116 |
image = read_image(image_path, format='BGR')
|
|
|
|
| 117 |
_, res = model.run_on_image(image)
|
|
|
|
| 118 |
return res.get_image()
|
|
|
|
| 112 |
|
| 113 |
|
| 114 |
def run_model(image_path: str, score_threshold: float = 0.5) -> np.ndarray:
|
| 115 |
+
print("***START***")
|
| 116 |
model = load_model(score_threshold)
|
| 117 |
+
print("***Model loaded***")
|
| 118 |
image = read_image(image_path, format='BGR')
|
| 119 |
+
print("***Image Read***")
|
| 120 |
_, res = model.run_on_image(image)
|
| 121 |
+
print("***END***")
|
| 122 |
return res.get_image()
|