MehdiH7 commited on
Commit
3190eb6
·
verified ·
1 Parent(s): c107cdf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -3
README.md CHANGED
@@ -1,3 +1,35 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # PlayerDirection SqueezeNet Model
6
+
7
+ ## Overview
8
+ This model is trained for ice hockey player orientation detection, classifying cropped player images into one of eight orientations: Top, Top-Right, Right, Bottom-Right, Bottom, Bottom-Left, Left, and Top-Left. It is based on the SqueezeNet architecture and achieves an F1 score of **75%**.
9
+
10
+ ## Model Details
11
+ - **Architecture**: SqueezeNet (modified for 8-class classification).
12
+ - **Training Configuration**:
13
+ - Learning rate: 1e-4
14
+ - Batch size: 24
15
+ - Epochs: 300
16
+ - Weight decay: 1e-4
17
+ - Dropout: 0.3
18
+ - Early stopping: patience = 50
19
+ - Augmentations: Color jitter (no rotation)
20
+ - **Performance**:
21
+ - Accuracy: ~75%
22
+ - F1 Score: ~75%
23
+
24
+ ## Usage
25
+ 1. Extract frames from a video using OpenCV.
26
+ 2. Detect player bounding boxes with a YOLO model.
27
+ 3. Crop player images, resize them to 224x224, and preprocess with the given PyTorch transformations:
28
+ - Resize to (224, 224)
29
+ - Normalize with mean=[0.485, 0.456, 0.406] and std=[0.229, 0.224, 0.225].
30
+ 4. Classify the direction of each cropped player image using the SqueezeNet model:
31
+ ```python
32
+ with torch.no_grad():
33
+ output = model(image_tensor)
34
+ direction_class = torch.argmax(output, dim=1).item()
35
+