edgetpu: Coral TPU transfer learning sample is not working

I already reported this problem earlier to no avail.

There are several issues with this tutorial here https://coral.ai/docs/edgetpu/retrain-detection/ and I’m completely baffled that nobody of you cares:

  1. Regardless of how many traning steps I configure, the result is always: No object detected from the dog picture. I tried with 500 up to 2000. The calculation runs between 8 and 12 hours and then stops with an obscure warning, but in the end the detection result is NULL

  2. The final command in the tutorial contains a wrong directory. It needs to be object_detection instead of detection

python3 detect_image.py
–model ${HOME}/google-coral/tutorials/docker/object_detection/out/models/ssd_mobilenet_v1_catsdogs_quant_edgetpu.tflite
–labels ${HOME}/google-coral/tutorials/docker/object_detection/out/models/labels.txt
–input ${HOME}/google-coral/tutorials/docker/object_detection/out/models/dog.jpg
–output dog_result.jpg

Feel free to ignore, but then I would suggest to close this issues section too.

Unbelievable…

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22

Most upvoted comments

Well, look. If they provide a “TUTORIAL” I think it totally legit to expect something working. This is just not working. And the obscure warning - I think, this is not tutorial related, more a tensorflow thing.

And I don’t even “just complained”. I also provided a correction. And this not just once. They ignore, so I don’t think they are “too busy”. This is Google, and it is as it always is: Half done things, updated quickly and buried out of the sudden. Why do I always again fall into this trap? I should have known better…

I’m not interested in classification or segmentation. I’m just interested in detection. And there is no model available, which just concentrates on persons, like personnet I just wanted to get rid of all the toothbrushes etc.

I was running it via SSH first, with export DISPLAY=:0, that works with my inference codes. Then I used a monitor and keyboard. Same results. I suppose I must be missing a dependency.

With the test print the results are clearly different, so it works… Now I would like to have the same 😃 You said, you did 3000 steps? How many evals? (NUM_STEPS, NUM_EVALS)?

pi@detector:~/edgetpu-ssdlite-mobiledet-retrain $ python3 run_model.py models/ssdlite_mobiledet_dog_vs_cat_edgetpu.tflite test_images
Evaluating: test_images/image1.jpg
american bulldog 91.796875%
Evaluating: test_images/image2.jpg
abyssian cat 97.65625%
Evaluating: test_images/image3.jpg
abyssian cat 99.21875%
Evaluating: test_images/image4.jpg
american bulldog 95.703125%
Evaluating: test_images/image5.jpg
american bulldog 98.828125%
Evaluating: test_images/image6.jpg
abyssian cat 99.609375%
Evaluating: test_images/image7.jpg
american bulldog 91.015625%
Evaluating: test_images/image8.jpg
abyssian cat 93.75%
Inference time:  0.07726445500020418
pi@detector:~/edgetpu-ssdlite-mobiledet-retrain $ python3 run_model.py models/ssdlite_mobiledet_dog_vs_cat.tflite test_images
Evaluating: test_images/image1.jpg
american bulldog 91.015625%
Evaluating: test_images/image2.jpg
abyssian cat 97.65625%
Evaluating: test_images/image3.jpg
abyssian cat 99.21875%
Evaluating: test_images/image4.jpg
american bulldog 96.09375%
Evaluating: test_images/image5.jpg
american bulldog 98.828125%
Evaluating: test_images/image6.jpg
abyssian cat 99.609375%
Evaluating: test_images/image7.jpg
american bulldog 91.015625%
Evaluating: test_images/image8.jpg
abyssian cat 92.578125%
Inference time:  2.7272272239995345
pi@detector:~/edgetpu-ssdlite-mobiledet-retrain $ 


@neilyoung I won’t get into your doc-not-perfect complaints, I just believe the team is busy with more important dev-related stuff ! (I challenge you to find a more complete starter-doc for a system like this, if it exists at all )

Anyways, you should provide more detailed information about your obscure warning, otherwise no one’s gonna understand you.

PS: check this notebook of mine, it contains full code to train a Coral-TPU-ready object detector using tf 1.15, straight on Google Colab. It might help you! (no docker needed) JFYI (and for whoever’s gonna read this), if you navigate in the repo you’ll find also notebooks for classification and segmentation. They are not perfect, but may enlight you 😃