Sports_Balls_Classification.h5
Model Details
This is a trained InceptionV3 transfer learning model for classifying 15 different types of sports balls.
Specifications
- Architecture: InceptionV3 with custom classification head
- Input Size: 225 x 225 pixels (RGB)
- Output Classes: 15 sports ball types
- Framework: TensorFlow/Keras
- Format: H5 (HDF5)
Supported Sports Ball Types
- American Football
- Baseball
- Basketball
- Billiard Ball
- Bowling Ball
- Cricket Ball
- Football
- Golf Ball
- Hockey Ball
- Hockey Puck
- Rugby Ball
- Shuttlecock
- Table Tennis Ball
- Tennis Ball
- Volleyball
Loading and Using
Python Example
import tensorflow as tf
from PIL import Image
import numpy as np
model = tf.keras.models.load_model("Sports_Balls_Classification.h5")
img = Image.open("sports_ball.jpg").convert("RGB")
img = img.resize((225, 225))
img_array = np.array(img).astype("float32") / 255.0
img_array = np.expand_dims(img_array, axis=0)
predictions = model.predict(img_array)
predicted_class = np.argmax(predictions[0])
confidence = np.max(predictions[0])
Training Approach
- Stage 1: Feature extraction (5 epochs) - Base frozen
- Stage 2: Fine-tuning (10 epochs) - Last 30 layers unfrozen
- Data balancing: 808 images per class
- Callbacks: Early stopping, learning rate reduction, checkpointing
Performance
Trained on balanced, preprocessed sports ball images with augmentation. Achieves high accuracy across all 15 sports ball classes.
Requirements
- TensorFlow >= 2.0
- Pillow
- NumPy
License
MIT