coral-pi-rest-server icon indicating copy to clipboard operation
coral-pi-rest-server copied to clipboard

Can't get version 2 to run

Open grinco opened this issue 3 years ago • 5 comments

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

grinco avatar Jan 19 '22 10:01 grinco

Just a follow-up: I am able to run the test classifier from here https://github.com/google-coral/pycoral.git

grinco avatar Jan 19 '22 12:01 grinco

Same issue here... running Debian on Docker.

Swiftnesses avatar Jan 19 '22 13:01 Swiftnesses

hmm not sure

robmarkcole avatar Mar 29 '22 05:03 robmarkcole

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.

corystevens avatar Jul 28 '22 17:07 corystevens

Same issue, @corystevens suggestion worked perfectly

jmadden91 avatar Sep 14 '22 08:09 jmadden91