Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Future Request] EfficientDet D0 conversion support by EdgeTPU Compiler #279

Closed
PINTO0309 opened this issue Dec 10, 2020 · 3 comments
Closed

Comments

@PINTO0309
Copy link

1. Overview

I have succeeded in generating a .tflite of EfficientDet D0 for the Full Integer Quantization model. There seems to be no problem in the structure of the model, but when compiled with edgetpu_compiler, the process is aborted. If I can figure out what is causing the error, I will adjust the model.
Screenshot 2020-12-11 00:49:40

2. Details

2-1. Environment

  • Ubuntu 18.04
  • Edge TPU Compiler version 15.0.340273435
  • TensorFlow version tf-nightly==2.5.0-dev20201210
  • EfficientDet D0 (Yet-Another-EfficientDet-Pytorch-Convert-ONNX-TVM)

2-2. EfficientDet repository of citations

https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch.git
https://github.com/murdockhou/Yet-Another-EfficientDet-Pytorch-Convert-ONNX-TVM.git

2-3. EfficientDet D0 Full Integer Quantization tflite

tflite: https://drive.google.com/file/d/1blXmW5FMuKJCbv7h6g5uzS-628FAfZ40/view?usp=sharing

Model structure diagram of EfficientDet D0 Full Integer Quantization tflite

efficientdet_d0_512x512_full_integer_quant tflite_

3. Appendix

https://github.com/PINTO0309/PINTO_model_zoo/tree/master/018_EfficientDet/09_pytorch_efficientdet_d0

@PINTO0309
Copy link
Author

I have narrowed down the patterns that fail to compile. It appears that the complexity of the model structure probably correlates with the high input resolution.

1. MIRNet (Model used for validation)

https://github.com/sayakpaul/MIRNet-TFLite.git

2. TFLite file - Full Integer Quantization

https://drive.google.com/file/d/12Jo_9rmslWHJOzGtjUyDYQHz3qvztv6V/view?usp=sharing

3. Structure of the model

Model structure diagram of MIRNet Full Integer Quantization tflite

mirnet_128x128_full_integer_quant tflite

4. Test pattern

  1. 512x512 ... compilation failure
  2. 416x416 ... compilation failure
  3. 320x320 ... compilation failure
  4. 256x256 ... compilation failure
  5. 128x128 ... compilation failure
  6. 64x64 ... compilation success

5. Consideration

This is just my guess, but it may be that the hardware characteristics of EdgeTPU do not allow complex, high resolution models to be compiled.

@zshn25
Copy link

zshn25 commented Feb 24, 2021

I have narrowed down the patterns that fail to compile. It appears that the complexity of the model structure probably correlates with the high input resolution.

1. MIRNet (Model used for validation)

https://github.com/sayakpaul/MIRNet-TFLite.git

2. TFLite file - Full Integer Quantization

https://drive.google.com/file/d/12Jo_9rmslWHJOzGtjUyDYQHz3qvztv6V/view?usp=sharing

3. Structure of the model

Model structure diagram of MIRNet Full Integer Quantization tflite

4. Test pattern

  1. 512x512 ... compilation failure
  2. 416x416 ... compilation failure
  3. 320x320 ... compilation failure
  4. 256x256 ... compilation failure
  5. 128x128 ... compilation failure
  6. 64x64 ... compilation success

5. Consideration

This is just my guess, but it may be that the hardware characteristics of EdgeTPU do not allow complex, high resolution models to be compiled.

+1 With lower resolution input, all operations are mapped on TPU but as resolution increases, less number of ops are mapped on TPU. At some point, it doesn't even compile anymore.

@PINTO0309
Copy link
Author

I'm going to close it since I can't seem to get any response. Too much time has passed and it no longer makes sense, so I'm moving on to EfficientDet-lite.
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/103_EfficientDet_lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants