guichristmann / edge-tpu-tiny-yolo

Run Tiny YOLO-v3 on Google's Edge TPU USB Accelerator.
MIT License
102 stars 31 forks source link

your own example is not working #17

Open stiebel opened 3 years ago

stiebel commented 3 years ago

I set up a new ubuntu 20.04 and did the following steps:

sudo apt-get install git sudo apt-get install python-is-python3 sudo apt-get install python3-pip sudo apt install curl curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | sudo tee /etc/apt/sources.list.d/coral-edgetpu.list sudo apt-get update sudo apt-get install edgetpu-compiler

pip3 install numpy pip3 install keras pip3 install tensorflow

git clone https://github.com/guichristmann/edge-tpu-tiny-yolo.git git clone https://github.com/guichristmann/keras-yolo3.git

after that I copied the coco-tiny-v3-relu.cfg and the coco-tiny-v3-relu.weights from the edge-tpu-tiny-yolo dir to the keras-yolo3 dir and did a python convert.py coco-tiny-v3-relu.cfg coco-tiny-v3-relu.weights mytest1_keras.h5 I copied this new h5 file back to edge-tpu-tiny-yolo and did a python keras_to_tflite_quant.py mytest1_keras.h5 mytest1.tflite after that I did an edgetpu_compiler mytest1.tflite but I got the well hatet "Model not quantized" message I got with my own weights, too

So something changed since you set up your scripts. The also provided original quant_coco-tiny-v3-relu.tflite is compiled by edgetpu, so the problem must be earlier. Please check your own files and tell me, what to do.

Best regards Roland

stiebel commented 3 years ago

maybe the whole process is only working in a specific invirement? What should I set? python3.x? tensorflow 2.x? keras 2.?

simcop2387 commented 3 years ago

Not sure if you found the solution, but it's to disable MLIR which isn't supported by the edgetpu compiler apparently. https://stackoverflow.com/questions/62808038/model-not-quantized-after-post-training-quantization-depends-on-model-structur

I found that link on another closed issue here