Spaces:
Runtime error
Runtime error
Update core/process.py
Browse files- core/process.py +1 -1
core/process.py
CHANGED
|
@@ -80,7 +80,7 @@ def process_image(
|
|
| 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
|
| 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)
|
| 86 |
overlay = model.draw(image, boxes)
|
|
|
|
| 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.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)
|
| 86 |
overlay = model.draw(image, boxes)
|