A model card is a short report that travels with a trained model. It answers the questions a stranger would need answered before deciding whether to rely on it. The idea comes from AI researchers who noticed that models were being shared with a single score and no explanation.
In 1.1.2 you saw why one number can mislead. A model card is the fix: it puts the number next to the data it came from, the test it passed, and the situations where it breaks.
| actual ↓ / predicted → | paper | plastic bottle | metal can | total | recall |
|---|---|---|---|---|---|
| paper | 9 | 1 | 0 | 10 | 90% |
| plastic bottle | 1 | 7 | 2 | 10 | 70% |
| metal can | 0 | 3 | 7 | 10 | 70% |
| precision | 90% | 64% | 78% | accuracy 77% | |
Green cells are correct. Orange cells are mistakes. Recall asks: of the items that really were this class, how many did it find? Precision asks: when it said this class, how often was it right?
The card says accuracy was 77%. Can you get that from the matrix yourself?
Start with a real need, not a cool model. Ask who would use this, what they do now, and what happens when the classifier is wrong. If a wrong answer is harmless, a student project is a fair place to try it. If a wrong answer could hurt someone, it is not.
The project has four rules for a reason. No people or faces keeps everyone's privacy safe and avoids the biased-data problems you met in 1.1.2. Nothing medical, safety-critical or about security keeps mistakes cheap. Collectable means you can actually photograph enough. Distinct classes means the label is a fact, not an opinion.
Seeing an image online does not mean you may use it. Keep a simple source list: where each group of images came from and what permission you had. Your model card will refer to it.
The test set exists to answer one question: how does the model do on things it has never seen? If any test image, or a near copy of one, was used in training, the answer is meaningless. This is called leakage. The safest plan is to collect test images separately, on a different day or place, and put them away before you train.
1. A team takes 40 photos of mugs in one session, holding the camera steady and nudging each mug a little between shots. They randomly put 30 in training and 10 in test.
2. A team takes training photos on Monday at the lab bench. On Wednesday they take test photos at a different table with different items of the same kind.
3. A team downloads one openly licensed photo of a wrench and uses it as a training image. Later they use the same photo as a test image.
4. A team's first model scores poorly. They add the test images to training, retrain, and report the new score on the same test images.
5. A team photographs every ripe banana on a white desk and every unripe banana on the green classroom carpet.
After testing, go through the images the model got wrong. Each mistake is a clue. For every failure case, write what the item was, what the model said, and your best guess why. A guess is fine as long as you call it a guess.
| Cause | What it looks like | What you can do |
|---|---|---|
| Look-alikes | Two classes share shape, color or texture. | Add more varied examples of both, or admit the model can't tell them apart. |
| Lighting and background | It learned the setting instead of the object. | Photograph each class in the same mix of places and light. |
| Angle and size | Top-down shots in training, side views in test. | Collect the angles a user would actually use. |
| Too little data | A class with few examples gets mistaken often. | Add training images, and report the limit honestly if you can't. |
| Wrong label | A photo was put in the wrong folder. | Re-check labels. A single wrong label in a small set matters. |
Every sentence on your card should be checkable against your matrix. Watch for three traps: a high overall score that hides a weak class, a perfect score on a small test set (which is more likely luck or leakage than perfection), and a claim about the real world from a classroom test.
| actual ↓ / predicted → | healthy leaf | spotted leaf | total | recall |
|---|---|---|---|---|
| healthy leaf | 19 | 1 | 20 | 95% |
| spotted leaf | 4 | 6 | 10 | 60% |
| precision | 83% | 86% | accuracy 83% | |
"Overall, our checker was right on about 83% of the test images."
"It's good at finding spotted leaves."
"When it says a leaf is healthy, it is usually right."
"This can be trusted to protect a farmer's crop."