Eric P. Nusbaum commited on
Commit
0c2a2b8
Β·
2 Parent(s): 169de21 c81e509
Files changed (1) hide show
  1. README.md +165 -157
README.md CHANGED
@@ -1,157 +1,165 @@
1
- ---
2
- license: mit
3
- ---
4
- # JunkWaxHero πŸ¦Έβ€β™‚οΈ
5
-
6
- **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.**
7
-
8
- ## πŸ“¦ Available Formats
9
-
10
- JunkWaxHero is available in **ONNX** format to cater to different deployment needs and preferences.
11
-
12
- - **ONNX:** Perfect for interoperability across various platforms and optimizing for different hardware accelerators.
13
-
14
- ## πŸ“Š Training Details
15
-
16
- - **Model Version:** Iteration 17
17
- - **Domain:** General (compact) [S1]
18
-
19
- ### **Overall Performance Metrics**
20
-
21
- - **Precision:** 98.6%
22
- - **Recall:** 97.3%
23
- - **mAP:** 98.6%
24
-
25
- ## πŸ“ Dataset
26
-
27
- 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.
28
-
29
- ## 🎯 Performance Per Set
30
-
31
- JunkWaxHero has been meticulously trained to recognize the following baseball card sets with exceptional accuracy:
32
-
33
- | Tag | Precision | Recall | Average Precision (AP) |
34
- | ---------------- | --------- | ------ | ---------------------- |
35
- | 1984 Topps | 100.0% | 100.0% | 100.0% |
36
- | 1987 Topps | 100.0% | 100.0% | 100.0% |
37
- | 1988 Score | 100.0% | 100.0% | 100.0% |
38
- | 1988 Topps | 100.0% | 100.0% | 100.0% |
39
- | 1989 Upper Deck | 100.0% | 92.3% | 99.5% |
40
- | 1989 Fleer | 100.0% | 100.0% | 100.0% |
41
- | 1989 Bowman | 94.7% | 94.7% | 99.7% |
42
- | 1989 Donruss | 100.0% | 94.7% | 94.7% |
43
- | 1989 Score | 100.0% | 100.0% | 100.0% |
44
- | 1989 Topps | 95.5% | 100.0% | 99.6% |
45
- | 1990 Topps | 100.0% | 100.0% | 100.0% |
46
- | 1990 Donruss | 100.0% | 100.0% | 100.0% |
47
- | 1990 Leaf | 100.0% | 100.0% | 100.0% |
48
- | 1990 Leaf Pack | 100.0% | 100.0% | 100.0% |
49
- | 1991 Upper Deck | 100.0% | 89.5% | 94.7% |
50
- | 1991 Leaf | 100.0% | 95.5% | 95.5% |
51
- | 1992 Upper Deck | 100.0% | 87.5% | 91.7% |
52
- | 1992 Fleer | 95.5% | 100.0% | 100.0% |
53
- | 1992 Fleer Ultra | 100.0% | 100.0% | 100.0% |
54
- | 1992 Pinnacle | 100.0% | 100.0% | 100.0% |
55
- | 1993 Topps | 90.9% | 90.9% | 94.9% |
56
- | 1994 Score | 95.5% | 95.5% | 99.8% |
57
- *Included sets are marked with a βœ…, while excluded sets (if any) would be marked with a ❌.*
58
-
59
- ## πŸš€ Getting Started
60
-
61
- ### Repository
62
-
63
- Access the repository on Hugging Face: [https://huggingface.co/enusbaum/JunkWaxHero/](https://huggingface.co/enusbaum/JunkWaxHero/)
64
-
65
- ### Installation
66
-
67
- To integrate **JunkWaxHero** into your projects, choose the format that best fits your workflow:
68
-
69
- #### ONNX
70
-
71
- 1. **Install ONNX Runtime:**
72
-
73
- ```bash
74
- pip install onnxruntime
75
- ```
76
-
77
- 2. **Download the ONNX Model:**
78
-
79
- 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).
80
-
81
- 3. **Load the ONNX Model:**
82
-
83
- ```python
84
- import onnxruntime as ort
85
- import numpy as np
86
-
87
- # Path to the downloaded ONNX model
88
- MODEL_PATH = 'path/to/junkwaxhero/onnx/junkwaxhero.onnx'
89
-
90
- # Initialize the ONNX runtime session
91
- session = ort.InferenceSession(MODEL_PATH)
92
-
93
- # Get input and output names
94
- input_name = session.get_inputs()[0].name
95
- output_name = session.get_outputs()[0].name
96
-
97
- # Example function to run inference
98
- def predict(image):
99
- image = np.expand_dims(image, axis=0).astype(np.float32) # Add batch dimension and ensure correct type
100
- predictions = session.run([output_name], {input_name: image})
101
- return predictions
102
- ```
103
-
104
- ### Usage
105
-
106
- 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**.
107
-
108
- 2. **Load the Model:** Use the appropriate code snippet above based on your chosen format (TensorFlow or ONNX).
109
-
110
- 3. **Identify Sets:** Pass your images through JunkWaxHero to accurately identify the set they belong to.
111
-
112
- ```python
113
- from PIL import Image
114
-
115
- # Load and preprocess the image
116
- def load_image(image_path):
117
- image = Image.open(image_path)
118
- image = image.resize((width, height)) # Resize to the input size expected by the model
119
- image = np.array(image)
120
- return image
121
-
122
- # Example usage
123
- image = load_image('path/to/baseball_card.jpg')
124
- predictions = predict(image)
125
-
126
- # Get the predicted label
127
- predicted_label = labels[np.argmax(predictions)]
128
- print(f'Predicted Set: {predicted_label}')
129
- ```
130
-
131
- > **Note:** Replace `(width, height)` with the actual dimensions expected by your model.
132
-
133
- ### Optimization
134
-
135
- 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.
136
-
137
- ## πŸ” Use Cases
138
-
139
- - **Collectors:** Quickly verify and catalog your baseball card collection.
140
- - **Dealers:** Streamline inventory management with accurate set identification.
141
- - **Enthusiasts:** Explore and discover sets with ease using advanced computer vision techniques.
142
-
143
- ## πŸ› οΈ Technical Details
144
-
145
- 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.
146
-
147
- ## πŸ“„ License
148
-
149
- This project is licensed under the [MIT License](LICENSE).
150
-
151
- ## πŸ“« Contact
152
-
153
- For questions, suggestions, or support, please reach out to [eric@nusbaum.me](mailto:eric@nusbaum.me).
154
-
155
- ---
156
-
157
- *Happy Collecting!*
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ pipeline_tag: object-detection
6
+ tags:
7
+ - baseball
8
+ - baseball-cards
9
+ - sports
10
+ ---
11
+ # JunkWaxHero πŸ¦Έβ€β™‚οΈ
12
+
13
+ **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.**
14
+
15
+ ## πŸ“¦ Available Formats
16
+
17
+ JunkWaxHero is available in **ONNX** format to cater to different deployment needs and preferences.
18
+
19
+ - **ONNX:** Perfect for interoperability across various platforms and optimizing for different hardware accelerators.
20
+
21
+ ## πŸ“Š Training Details
22
+
23
+ - **Model Version:** Iteration 17
24
+ - **Domain:** General (compact) [S1]
25
+
26
+ ### **Overall Performance Metrics**
27
+
28
+ - **Precision:** 98.6%
29
+ - **Recall:** 97.3%
30
+ - **mAP:** 98.6%
31
+
32
+ ## πŸ“ Dataset
33
+
34
+ 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.
35
+
36
+ ## 🎯 Performance Per Set
37
+
38
+ JunkWaxHero has been meticulously trained to recognize the following baseball card sets with exceptional accuracy:
39
+
40
+ | Tag | Precision | Recall | Average Precision (AP) |
41
+ | ---------------- | --------- | ------ | ---------------------- |
42
+ | 1984 Topps | 100.0% | 100.0% | 100.0% |
43
+ | 1987 Topps | 100.0% | 100.0% | 100.0% |
44
+ | 1988 Score | 100.0% | 100.0% | 100.0% |
45
+ | 1988 Topps | 100.0% | 100.0% | 100.0% |
46
+ | 1989 Upper Deck | 100.0% | 92.3% | 99.5% |
47
+ | 1989 Fleer | 100.0% | 100.0% | 100.0% |
48
+ | 1989 Bowman | 94.7% | 94.7% | 99.7% |
49
+ | 1989 Donruss | 100.0% | 94.7% | 94.7% |
50
+ | 1989 Score | 100.0% | 100.0% | 100.0% |
51
+ | 1989 Topps | 95.5% | 100.0% | 99.6% |
52
+ | 1990 Topps | 100.0% | 100.0% | 100.0% |
53
+ | 1990 Donruss | 100.0% | 100.0% | 100.0% |
54
+ | 1990 Leaf | 100.0% | 100.0% | 100.0% |
55
+ | 1990 Leaf Pack | 100.0% | 100.0% | 100.0% |
56
+ | 1991 Upper Deck | 100.0% | 89.5% | 94.7% |
57
+ | 1991 Leaf | 100.0% | 95.5% | 95.5% |
58
+ | 1992 Upper Deck | 100.0% | 87.5% | 91.7% |
59
+ | 1992 Fleer | 95.5% | 100.0% | 100.0% |
60
+ | 1992 Fleer Ultra | 100.0% | 100.0% | 100.0% |
61
+ | 1992 Pinnacle | 100.0% | 100.0% | 100.0% |
62
+ | 1993 Topps | 90.9% | 90.9% | 94.9% |
63
+ | 1994 Score | 95.5% | 95.5% | 99.8% |
64
+
65
+ *Included sets are marked with a βœ…, while excluded sets (if any) would be marked with a ❌.*
66
+
67
+ ## πŸš€ Getting Started
68
+
69
+ ### Repository
70
+
71
+ Access the repository on Hugging Face: [https://huggingface.co/enusbaum/JunkWaxHero/](https://huggingface.co/enusbaum/JunkWaxHero/)
72
+
73
+ ### Installation
74
+
75
+ To integrate **JunkWaxHero** into your projects, choose the format that best fits your workflow:
76
+
77
+ #### ONNX
78
+
79
+ 1. **Install ONNX Runtime:**
80
+
81
+ ```bash
82
+ pip install onnxruntime
83
+ ```
84
+
85
+ 2. **Download the ONNX Model:**
86
+
87
+ 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).
88
+
89
+ 3. **Load the ONNX Model:**
90
+
91
+ ```python
92
+ import onnxruntime as ort
93
+ import numpy as np
94
+
95
+ # Path to the downloaded ONNX model
96
+ MODEL_PATH = 'path/to/junkwaxhero/onnx/junkwaxhero.onnx'
97
+
98
+ # Initialize the ONNX runtime session
99
+ session = ort.InferenceSession(MODEL_PATH)
100
+
101
+ # Get input and output names
102
+ input_name = session.get_inputs()[0].name
103
+ output_name = session.get_outputs()[0].name
104
+
105
+ # Example function to run inference
106
+ def predict(image):
107
+ image = np.expand_dims(image, axis=0).astype(np.float32) # Add batch dimension and ensure correct type
108
+ predictions = session.run([output_name], {input_name: image})
109
+ return predictions
110
+ ```
111
+
112
+ ### Usage
113
+
114
+ 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**.
115
+
116
+ 2. **Load the Model:** Use the appropriate code snippet above based on your chosen format (TensorFlow or ONNX).
117
+
118
+ 3. **Identify Sets:** Pass your images through JunkWaxHero to accurately identify the set they belong to.
119
+
120
+ ```python
121
+ from PIL import Image
122
+
123
+ # Load and preprocess the image
124
+ def load_image(image_path):
125
+ image = Image.open(image_path)
126
+ image = image.resize((width, height)) # Resize to the input size expected by the model
127
+ image = np.array(image)
128
+ return image
129
+
130
+ # Example usage
131
+ image = load_image('path/to/baseball_card.jpg')
132
+ predictions = predict(image)
133
+
134
+ # Get the predicted label
135
+ predicted_label = labels[np.argmax(predictions)]
136
+ print(f'Predicted Set: {predicted_label}')
137
+ ```
138
+
139
+ > **Note:** Replace `(width, height)` with the actual dimensions expected by your model.
140
+
141
+ ### Optimization
142
+
143
+ 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.
144
+
145
+ ## πŸ” Use Cases
146
+
147
+ - **Collectors:** Quickly verify and catalog your baseball card collection.
148
+ - **Dealers:** Streamline inventory management with accurate set identification.
149
+ - **Enthusiasts:** Explore and discover sets with ease using advanced computer vision techniques.
150
+
151
+ ## πŸ› οΈ Technical Details
152
+
153
+ 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.
154
+
155
+ ## πŸ“„ License
156
+
157
+ This project is licensed under the [MIT License](LICENSE).
158
+
159
+ ## πŸ“« Contact
160
+
161
+ For questions, suggestions, or support, please reach out to [eric@nusbaum.me](mailto:eric@nusbaum.me).
162
+
163
+ ---
164
+
165
+ *Happy Collecting!*