I am currently looking for similar projects to use a Raspberry PI as a classifier. I want to run a service on the microcontroller permanently, so that the model is loaded only once and then waits for input, so to speak. Then you can send a picture via ssh and get the answer. It should also be possible to send a new model, which then replaces the old one.
I want to stay flexible and use either a tflite or a pytorch model.
I would have solved this with a small Flask application and simply created different routes for my requirements. How would you approach the whole thing?