Upload folder using huggingface_hub
Browse files
__pycache__/miner.cpython-312.pyc
ADDED
|
Binary file (12.1 kB). View file
|
|
|
__pycache__/miner.cpython-313.pyc
ADDED
|
Binary file (12.1 kB). View file
|
|
|
__pycache__/pitch.cpython-312.pyc
ADDED
|
Binary file (30.9 kB). View file
|
|
|
__pycache__/player.cpython-312.pyc
ADDED
|
Binary file (16.6 kB). View file
|
|
|
miner.py
CHANGED
|
@@ -142,7 +142,7 @@ class Miner:
|
|
| 142 |
# self._warmup_models(device)
|
| 143 |
|
| 144 |
# Increase batch sizes for better GPU utilization
|
| 145 |
-
self.player_batch_size =
|
| 146 |
self.pitch_batch_size = 8 # Increased from 32
|
| 147 |
print(f"✅ Keypoints Model Loaded")
|
| 148 |
|
|
@@ -155,6 +155,8 @@ class Miner:
|
|
| 155 |
offset: int,
|
| 156 |
n_keypoints: int,
|
| 157 |
) -> list[TVFrameResult]:
|
|
|
|
|
|
|
| 158 |
player_batch_size = min(self.player_batch_size, len(batch_images))
|
| 159 |
bboxes: dict[int, list[BoundingBox]] = {}
|
| 160 |
while True:
|
|
@@ -198,6 +200,9 @@ class Miner:
|
|
| 198 |
player_batch_size = min(self.player_batch_size, len(batch_images))
|
| 199 |
else:
|
| 200 |
raise e
|
|
|
|
|
|
|
|
|
|
| 201 |
|
| 202 |
pitch_batch_size = min(self.pitch_batch_size, len(batch_images))
|
| 203 |
keypoints: dict[int, list[tuple[int, int]]] = {}
|
|
@@ -254,6 +259,9 @@ class Miner:
|
|
| 254 |
pitch_batch_size = min(self.pitch_batch_size, len(batch_images))
|
| 255 |
else:
|
| 256 |
raise e
|
|
|
|
|
|
|
|
|
|
| 257 |
|
| 258 |
# Combine results
|
| 259 |
results: list[TVFrameResult] = []
|
|
|
|
| 142 |
# self._warmup_models(device)
|
| 143 |
|
| 144 |
# Increase batch sizes for better GPU utilization
|
| 145 |
+
self.player_batch_size = 8 # Increased from 32
|
| 146 |
self.pitch_batch_size = 8 # Increased from 32
|
| 147 |
print(f"✅ Keypoints Model Loaded")
|
| 148 |
|
|
|
|
| 155 |
offset: int,
|
| 156 |
n_keypoints: int,
|
| 157 |
) -> list[TVFrameResult]:
|
| 158 |
+
|
| 159 |
+
print("\n🤖 Running predict_batch...")
|
| 160 |
player_batch_size = min(self.player_batch_size, len(batch_images))
|
| 161 |
bboxes: dict[int, list[BoundingBox]] = {}
|
| 162 |
while True:
|
|
|
|
| 200 |
player_batch_size = min(self.player_batch_size, len(batch_images))
|
| 201 |
else:
|
| 202 |
raise e
|
| 203 |
+
except Exception as e:
|
| 204 |
+
print(f"❌ Error during bbox prediction: {e}")
|
| 205 |
+
raise e
|
| 206 |
|
| 207 |
pitch_batch_size = min(self.pitch_batch_size, len(batch_images))
|
| 208 |
keypoints: dict[int, list[tuple[int, int]]] = {}
|
|
|
|
| 259 |
pitch_batch_size = min(self.pitch_batch_size, len(batch_images))
|
| 260 |
else:
|
| 261 |
raise e
|
| 262 |
+
except Exception as e:
|
| 263 |
+
print(f"❌ Error during keypoints prediction: {e}")
|
| 264 |
+
raise e
|
| 265 |
|
| 266 |
# Combine results
|
| 267 |
results: list[TVFrameResult] = []
|