Examples¶
Each example is a complete program. Their code lives in the
examples folder of the
repository, and this site shows the same files.
Before you run one¶
- Install the package. Camera examples also need OpenCV.
- Export your model as TensorFlow Lite.
- Put the files together:
my-project/
├── model.tflite
├── labels.txt
└── app.py (the example code)
Run the program from this folder. In the camera examples, click the video window and press Esc to quit.
All examples¶
| Example | What it shows |
|---|---|
| Webcam Classifier | Classify camera frames and show the result on the video |
| Separate Drawing | Classify and draw in two steps, and measure the time |
| Raspberry Pi Camera | Use the camera module through Picamera2 |
| Image File | Classify a photo and act only when confident |
| Command-Line Webcam | Choose the model, camera and options on the command line |