Open rcd27 opened 2 years ago
This is a Kotlin
implementation with use of OpenCV.DNN
module + EAST
detection model:
https://github.com/rcd27/opencv-EAST-kotlin
It's an interesting proposal. A have a few questions before we move forward. Is the model saved to .pb format generated by Tensorflow version 1.x? Looks like yes, but we should now. If yes, I suggest implementing an example using, ONNX module for example or Tensorflow Saved Module + Image DSL preprocessing.
The best way to convert to ONNX via https://github.com/onnx/tensorflow-onnx project in Colab, for example.
If you need some help on all steps, please let me know
Yes, the model format is .pb
, I'll try to go through the steps you suggested.
@zaleslaw all EAST models with .pb
format I found in the internet were missing tag
value (checked with saved_model_cli
tool). That makes tensorflow-onnx
to throw error (missing tag) while trying to convert to ONNX format. Any ideas how to workaround this?
Looks like it requires a tag setting before convertation I found a few contants here https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/saved_model/tag_constants.py#L27
There is very usefull pretrained Tensorflow model for detecting text on image: https://github.com/argman/EAST
Would be nice to use that in KotlinDL
Opencv.DNN module has such a support: python tutorial OpenCV doc reference I've also ported it to Kotlin, works fine (a lot of boilerplate, but OK)