Upload folder using huggingface_hub
Browse files- football_object_detection.onnx +3 -0
- miner.py +2 -2
football_object_detection.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86033baaab62ecf30c31934e5d21f3115af6d33c23b1bb0e454f917302cf9956
|
| 3 |
+
size 38568341
|
miner.py
CHANGED
|
@@ -49,12 +49,12 @@ class Miner:
|
|
| 49 |
CORNER_CONFIDENCE = Constants.CORNER_CONFIDENCE
|
| 50 |
GOALKEEPER_POSITION_MARGIN = Constants.GOALKEEPER_POSITION_MARGIN
|
| 51 |
MIN_SAMPLES_FOR_FIT = 16 # Minimum player crops needed before fitting TeamClassifier
|
| 52 |
-
MAX_SAMPLES_FOR_FIT =
|
| 53 |
|
| 54 |
def __init__(self, path_hf_repo: Path) -> None:
|
| 55 |
try:
|
| 56 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 57 |
-
model_path = path_hf_repo / "
|
| 58 |
self.bbox_model = YOLO(model_path)
|
| 59 |
|
| 60 |
print(f"BBox Model Loaded: class name {self.bbox_model.names}")
|
|
|
|
| 49 |
CORNER_CONFIDENCE = Constants.CORNER_CONFIDENCE
|
| 50 |
GOALKEEPER_POSITION_MARGIN = Constants.GOALKEEPER_POSITION_MARGIN
|
| 51 |
MIN_SAMPLES_FOR_FIT = 16 # Minimum player crops needed before fitting TeamClassifier
|
| 52 |
+
MAX_SAMPLES_FOR_FIT = 1000 # Maximum samples to avoid overfitting
|
| 53 |
|
| 54 |
def __init__(self, path_hf_repo: Path) -> None:
|
| 55 |
try:
|
| 56 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 57 |
+
model_path = path_hf_repo / "football_object_detection.onnx"
|
| 58 |
self.bbox_model = YOLO(model_path)
|
| 59 |
|
| 60 |
print(f"BBox Model Loaded: class name {self.bbox_model.names}")
|