feat: added translateImage API function; image in, original and translated text blocks out. - #210
feat: added translateImage API function; image in, original and translated text blocks out.#210Tallis-Larsen wants to merge 4 commits into
Conversation
…lated text blocks out.
DavidVentura
left a comment
There was a problem hiding this comment.
can you expand on what you want to achieve with your app? I don't really understand the current API design, but maybe I'm missing what you want to do.
Removed the service binding instruction for the translation API.
I'm making a basic alternative to google's |
|
New commits remove |
|
I'm doing some changes with the way words are detected and how they carry style, when that's done I can come back to this, because the API that communicates the structured data is bound to change |
|
Okay no problem. |
I'm making an (open source) app that requires some basic OCR and translation functionality, but I didn't want to re-implement what has already been done. Therefore, I decided that simply requiring offline-translator as a dependency and offloading all the model management and configurations to it would work to significantly reduce the need to repeat code. This PR simply exposes the
translateImageWithOverlayfunction, allowing any app to get raw OCR and translation data from an image, and handle rendering (if desired) themselves. I think that this would be a significant help to those who wish to implement OCR and translation features into their apps, but do not want the overhead of managing the necessary models (such as myself). Additionally, this change does not modify any existing logic, so it should be quite easy to review and merge. I'm rather new to making PRs to projects other than my own, so please go easy on me :P