Spaces:
Runtime error
Runtime error
Update core/process.py
Browse files- core/process.py +2 -2
core/process.py
CHANGED
|
@@ -78,8 +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 |
-
resolved_det_model = DETECTION_MODEL_MAP.get(det_model, det_model)
|
| 82 |
-
model = get_model("detection",
|
| 83 |
model = model.load_model()
|
| 84 |
logger.info(f"{det_model} detection model loaded in {time.time() - load_start:.2f} seconds.")
|
| 85 |
boxes = model.predict(image, conf_threshold=det_confidence)
|
|
|
|
| 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", DETECTION_MODEL_MAP[det_model], device="cpu")
|
| 83 |
model = model.load_model()
|
| 84 |
logger.info(f"{det_model} detection model loaded in {time.time() - load_start:.2f} seconds.")
|
| 85 |
boxes = model.predict(image, conf_threshold=det_confidence)
|