scorevision: push artifact
Browse files
miner.py
CHANGED
|
@@ -73,11 +73,14 @@ class Miner:
|
|
| 73 |
offset: int,
|
| 74 |
n_keypoints: int,
|
| 75 |
) -> list[TVFrameResult]:
|
|
|
|
|
|
|
| 76 |
detections = self.model.predict(
|
| 77 |
batch_images,
|
| 78 |
conf=CONF_THRESHOLD,
|
| 79 |
imgsz=IMG_SIZE,
|
| 80 |
classes=[PERSON_CLS_ID],
|
|
|
|
| 81 |
verbose=False,
|
| 82 |
)
|
| 83 |
|
|
|
|
| 73 |
offset: int,
|
| 74 |
n_keypoints: int,
|
| 75 |
) -> list[TVFrameResult]:
|
| 76 |
+
# device="cpu": chute GPUs (Blackwell) lack kernels for the image's
|
| 77 |
+
# torch build, and the ONNX model targets CPU for the latency gate.
|
| 78 |
detections = self.model.predict(
|
| 79 |
batch_images,
|
| 80 |
conf=CONF_THRESHOLD,
|
| 81 |
imgsz=IMG_SIZE,
|
| 82 |
classes=[PERSON_CLS_ID],
|
| 83 |
+
device=os.getenv("SV_DEVICE", "cpu"),
|
| 84 |
verbose=False,
|
| 85 |
)
|
| 86 |
|