File size: 7,272 Bytes
0eb1ddc db15883 169de21 db15883 169de21 db15883 169de21 db15883 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
---
license: mit
---
# JunkWaxHero π¦ΈββοΈ
**JunkWaxHero** is your go-to computer vision model for identifying "Junk Wax" baseball card sets from the golden era of 1980 to 1999. Whether you're a collector, dealer, or enthusiast, JunkWaxHero simplifies the process of cataloging and verifying your collection with high precision and recall. **The purpose of JunkWaxHero is to provide a model that quickly identifies baseball card sets without relying on SaaS-based inference APIs.**
## π¦ Available Formats
JunkWaxHero is available in **ONNX** format to cater to different deployment needs and preferences.
- **ONNX:** Perfect for interoperability across various platforms and optimizing for different hardware accelerators.
## π Training Details
- **Model Version:** Iteration 17
- **Domain:** General (compact) [S1]
### **Overall Performance Metrics**
- **Precision:** 98.6%
- **Recall:** 97.3%
- **mAP:** 98.6%
## π Dataset
The training dataset for **JunkWaxHero** was meticulously curated to ensure robustness and versatility. It includes baseball card images captured on multiple different surfaces and backgrounds, with varying zoom levels to simulate real-world conditions. All images adhere to a **4:3 image ratio** to align with modern cell phone portrait modes. The baseball cards in the dataset are **vertically aligned** to maintain consistency during training. Support for **horizontally aligned cards photographed in their horizontal orientation** is planned for future iterations to enhance the model's flexibility.
## π― Performance Per Set
JunkWaxHero has been meticulously trained to recognize the following baseball card sets with exceptional accuracy:
| Tag | Precision | Recall | Average Precision (AP) |
| ---------------- | --------- | ------ | ---------------------- |
| 1984 Topps | 100.0% | 100.0% | 100.0% |
| 1987 Topps | 100.0% | 100.0% | 100.0% |
| 1988 Score | 100.0% | 100.0% | 100.0% |
| 1988 Topps | 100.0% | 100.0% | 100.0% |
| 1989 Upper Deck | 100.0% | 92.3% | 99.5% |
| 1989 Fleer | 100.0% | 100.0% | 100.0% |
| 1989 Bowman | 94.7% | 94.7% | 99.7% |
| 1989 Donruss | 100.0% | 94.7% | 94.7% |
| 1989 Score | 100.0% | 100.0% | 100.0% |
| 1989 Topps | 95.5% | 100.0% | 99.6% |
| 1990 Topps | 100.0% | 100.0% | 100.0% |
| 1990 Donruss | 100.0% | 100.0% | 100.0% |
| 1990 Leaf | 100.0% | 100.0% | 100.0% |
| 1990 Leaf Pack | 100.0% | 100.0% | 100.0% |
| 1991 Upper Deck | 100.0% | 89.5% | 94.7% |
| 1991 Leaf | 100.0% | 95.5% | 95.5% |
| 1992 Upper Deck | 100.0% | 87.5% | 91.7% |
| 1992 Fleer | 95.5% | 100.0% | 100.0% |
| 1992 Fleer Ultra | 100.0% | 100.0% | 100.0% |
| 1992 Pinnacle | 100.0% | 100.0% | 100.0% |
| 1993 Topps | 90.9% | 90.9% | 94.9% |
| 1994 Score | 95.5% | 95.5% | 99.8% |
*Included sets are marked with a β
, while excluded sets (if any) would be marked with a β.*
## π Getting Started
### Repository
Access the repository on Hugging Face: [https://huggingface.co/enusbaum/JunkWaxHero/](https://huggingface.co/enusbaum/JunkWaxHero/)
### Installation
To integrate **JunkWaxHero** into your projects, choose the format that best fits your workflow:
#### ONNX
1. **Install ONNX Runtime:**
```bash
pip install onnxruntime
```
2. **Download the ONNX Model:**
Navigate to the ONNX directory in the repository and download the `model.onnx` file from [https://huggingface.co/enusbaum/JunkWaxHero/tree/main/onnx](https://huggingface.co/enusbaum/JunkWaxHero/tree/main/onnx).
3. **Load the ONNX Model:**
```python
import onnxruntime as ort
import numpy as np
# Path to the downloaded ONNX model
MODEL_PATH = 'path/to/junkwaxhero/onnx/junkwaxhero.onnx'
# Initialize the ONNX runtime session
session = ort.InferenceSession(MODEL_PATH)
# Get input and output names
input_name = session.get_inputs()[0].name
output_name = session.get_outputs()[0].name
# Example function to run inference
def predict(image):
image = np.expand_dims(image, axis=0).astype(np.float32) # Add batch dimension and ensure correct type
predictions = session.run([output_name], {input_name: image})
return predictions
```
### Usage
1. **Prepare Your Images:** Ensure your baseball card images are clear and well-lit for optimal identification. Images should be in a **4:3 ratio** and **vertically aligned**.
2. **Load the Model:** Use the appropriate code snippet above based on your chosen format (TensorFlow or ONNX).
3. **Identify Sets:** Pass your images through JunkWaxHero to accurately identify the set they belong to.
```python
from PIL import Image
# Load and preprocess the image
def load_image(image_path):
image = Image.open(image_path)
image = image.resize((width, height)) # Resize to the input size expected by the model
image = np.array(image)
return image
# Example usage
image = load_image('path/to/baseball_card.jpg')
predictions = predict(image)
# Get the predicted label
predicted_label = labels[np.argmax(predictions)]
print(f'Predicted Set: {predicted_label}')
```
> **Note:** Replace `(width, height)` with the actual dimensions expected by your model.
### Optimization
Leverage the high precision and recall rates to maintain an organized and verified collection. Depending on your deployment environment, choose between TensorFlow for seamless integration with TensorFlow ecosystems or ONNX for broader platform compatibility and performance optimizations.
## π Use Cases
- **Collectors:** Quickly verify and catalog your baseball card collection.
- **Dealers:** Streamline inventory management with accurate set identification.
- **Enthusiasts:** Explore and discover sets with ease using advanced computer vision techniques.
## π οΈ Technical Details
JunkWaxHero leverages state-of-the-art computer vision architectures optimized for identifying baseball card sets from images. Trained on a diverse dataset spanning multiple decades, the model ensures robustness and reliability across various card conditions and designs. By offering both TensorFlow and ONNX formats, JunkWaxHero provides flexibility for different deployment scenarios, whether you're integrating into existing TensorFlow pipelines or seeking cross-platform compatibility with ONNX.
## π License
This project is licensed under the [MIT License](LICENSE).
## π« Contact
For questions, suggestions, or support, please reach out to [eric@nusbaum.me](mailto:eric@nusbaum.me).
---
*Happy Collecting!*
|