Spaces:
Runtime error
Runtime error
Update core/process.py
Browse files- core/process.py +2 -1
core/process.py
CHANGED
|
@@ -78,7 +78,8 @@ def process_image(
|
|
| 78 |
if run_det:
|
| 79 |
logger.info(f"Running detection with model: {det_model}")
|
| 80 |
load_start = time.time()
|
| 81 |
-
|
|
|
|
| 82 |
logger.info(f"{det_model} detection model loaded in {time.time() - load_start:.2f} seconds.")
|
| 83 |
boxes = model.predict(image, conf_threshold=det_confidence)
|
| 84 |
overlay = model.draw(image, boxes)
|
|
|
|
| 78 |
if run_det:
|
| 79 |
logger.info(f"Running detection with model: {det_model}")
|
| 80 |
load_start = time.time()
|
| 81 |
+
resolved_det_model = DETECTION_MODEL_MAP.get(det_model, det_model)
|
| 82 |
+
model = get_model("detection", resolved_det_model, device="cpu")
|
| 83 |
logger.info(f"{det_model} detection model loaded in {time.time() - load_start:.2f} seconds.")
|
| 84 |
boxes = model.predict(image, conf_threshold=det_confidence)
|
| 85 |
overlay = model.draw(image, boxes)
|