1. Train a model, then use it in Python
Try firstWhat is inside my_model.json, and why can the same file work in the trainer, on the board and in Python?
Check your answer
Class names and the trained numbers. Each side turns a picture into numbers the same way, then runs the same trained numbers on them.
A model is trained on examples, then used inside an app.
- The Pattern Trainer turns each photo into numbers and learns from them.
- my_model.json keeps only your class names and the trained numbers: no photos.
- In Python,
model.top(image)gives the most likely class and how sure the model is (0 to 1). - A model always picks one of its classes, so the app's threshold decides when to say it isn't sure.