scorevision: push artifact
Browse files
miner.py
CHANGED
|
@@ -15,6 +15,8 @@ cls_id 0 is shared: "bus" for vehicle eval, "person" for person eval.
|
|
| 15 |
Vehicle eval uses cls_id 0-3. Person eval uses cls_id 0 only.
|
| 16 |
"""
|
| 17 |
|
|
|
|
|
|
|
| 18 |
import os
|
| 19 |
import ctypes
|
| 20 |
import glob as _glob
|
|
@@ -50,9 +52,12 @@ def _preload_cuda_libs():
|
|
| 50 |
except Exception as e:
|
| 51 |
_cuda_log.warning(f'CUDA preload error: {e}')
|
| 52 |
|
|
|
|
| 53 |
_preload_cuda_libs()
|
|
|
|
| 54 |
|
| 55 |
|
|
|
|
| 56 |
from pathlib import Path
|
| 57 |
import math
|
| 58 |
import time
|
|
@@ -60,7 +65,9 @@ import logging
|
|
| 60 |
|
| 61 |
import cv2
|
| 62 |
import numpy as np
|
|
|
|
| 63 |
import onnxruntime as ort
|
|
|
|
| 64 |
from numpy import ndarray
|
| 65 |
from pydantic import BaseModel
|
| 66 |
|
|
|
|
| 15 |
Vehicle eval uses cls_id 0-3. Person eval uses cls_id 0 only.
|
| 16 |
"""
|
| 17 |
|
| 18 |
+
import sys
|
| 19 |
+
print("[MINER] Module import started", flush=True)
|
| 20 |
import os
|
| 21 |
import ctypes
|
| 22 |
import glob as _glob
|
|
|
|
| 52 |
except Exception as e:
|
| 53 |
_cuda_log.warning(f'CUDA preload error: {e}')
|
| 54 |
|
| 55 |
+
print("[MINER] Calling _preload_cuda_libs()...", flush=True)
|
| 56 |
_preload_cuda_libs()
|
| 57 |
+
print("[MINER] _preload_cuda_libs() done", flush=True)
|
| 58 |
|
| 59 |
|
| 60 |
+
print("[MINER] Importing main dependencies...", flush=True)
|
| 61 |
from pathlib import Path
|
| 62 |
import math
|
| 63 |
import time
|
|
|
|
| 65 |
|
| 66 |
import cv2
|
| 67 |
import numpy as np
|
| 68 |
+
print("[MINER] Importing onnxruntime...", flush=True)
|
| 69 |
import onnxruntime as ort
|
| 70 |
+
print(f"[MINER] onnxruntime imported, providers={ort.get_available_providers()}", flush=True)
|
| 71 |
from numpy import ndarray
|
| 72 |
from pydantic import BaseModel
|
| 73 |
|