coral-pi-rest-server
coral-pi-rest-server copied to clipboard
Can't get version 2 to run
I'm stuck with the legacy api due to inability to switch to 2.0 / pycoral. Probably has something to do with me having the m2 TPU rather than the USB stick:
~/coral-api/coral-pi-rest-server-2.0 # python3 coral-app.py --model "ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite" --labels "coco_labels.txt" --models_directory "./models/"
Initialised interpreter with model : ./models/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite
* Serving Flask app 'coral-app' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
F port/default/port_from_tf/statusor.cc:38] Attempting to fetch value instead of handling error Failed precondition: Could not map pages : 10 (Device or resource busy)
Exception ignored in: <function Delegate.__del__ at 0x7fc19632f790>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/tflite_runtime/interpreter.py", line 125, in __del__
TypeError: item 1 in _argtypes_ has no from_param method
Just a follow-up: I am able to run the test classifier from here https://github.com/google-coral/pycoral.git
Same issue here... running Debian on Docker.
hmm not sure
For anyone else who has this issue. I was able to solve it by adding use_reloader=False to app.run. For some reason Flask is starting the application twice, which attempts to load the model a second time.
Same issue, @corystevens suggestion worked perfectly