EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

[offtopic] make a reimplementation in C++

Open Kromtar opened this issue 2 years ago • 17 comments

I would like to know if the community that uses this repository would be interested in a C++ reimplementation. This OCR has given me excellent results so far. But the fact that it is in Python and uses Torch makes it difficult to compile it in an optimized way. I am planning to make an exact reimplementation of the current version of EasyOCR but in C++ and using TorchScript. It is a lot of work. Is anyone else looking for a solution like this?

Greetings

Kromtar avatar Apr 12 '22 03:04 Kromtar

I'm interested, particularly for inference. I don't have great C++ skills, but I may be able to write a bare bones Rust implementation that can compile into a C library.

euirim avatar Apr 17 '22 08:04 euirim

I am interested, too.

cfanatic avatar May 27 '22 16:05 cfanatic

I'm interested, thanks

Cilouche avatar Jul 07 '22 13:07 Cilouche

Totally agree, easyocr give great results thanks so much to the author and contributors

Having a C++ implementation would be great. I'm coding in C++ for more than 5 years @Kromtar please let me know if I can help

BBO-repo avatar Aug 19 '22 09:08 BBO-repo

count on me

yunus-temurlenk avatar Sep 18 '22 14:09 yunus-temurlenk

I started this, anyone else start?

kevinkazzo avatar Mar 15 '23 01:03 kevinkazzo

On my side start working on translating the craft algorithm (used by easyocr for text detection) in C++. If successful I'll try to go on with translating the text recognition algorithm

@kevinkazzo if you want we can join our effort?

BBO-repo avatar Mar 15 '23 07:03 BBO-repo

It would be great if someone could do some kind of planning so that everyone willing to help can address those different issues without overlapping each other. I know it's a lot of work I'm proposing for the person who would do it, but it would help a lot to speed up development.

facug91 avatar Mar 19 '23 19:03 facug91

Maybe this repository is a good starting point https://github.com/jackvial/tuatara

BBO-repo avatar Aug 24 '23 14:08 BBO-repo

sorry I forgot to update. I did this, will respond on my other github and upload the project and start allowing people to make PRs to improve it. Did not optimize it entirely, but got the detector and recognition network working in plain torchscript/ c++. Even got it in ONNX

kevinkazzo avatar Sep 01 '23 23:09 kevinkazzo

Great! Looking forward to seeing it and testing.

BBO-repo avatar Sep 02 '23 08:09 BBO-repo

sorry I forgot to update. I did this, will respond on my other github and upload the project and start allowing people to make PRs to improve it. Did not optimize it entirely, but got the detector and recognition network working in plain torchscript/ c++. Even got it in ONNX

When can we expect to see your amazing project? :)

MinGiSa avatar Sep 07 '23 12:09 MinGiSa

[C++ software engineer] you can count on me too.

SC-One avatar Nov 12 '23 09:11 SC-One

Hey all, this is @kevinkazzo, on my main account will post it up by tomorrow evening!

ksasso1028 avatar Nov 28 '23 21:11 ksasso1028

hey all! uploaded here it is! - > https://github.com/ksasso1028/EasyOCR-cpp

ksasso1028 avatar Nov 30 '23 02:11 ksasso1028

For those who don't want to use libtorch, I implemented easyocr with opencv, onnxruntime and xtensor. This is not a full implementation, but I will include it in a library of mine that will come out later, for now it is just this.

The ONNX model is converted with the notebook provided by samiechan here

If you have any problems or suggestions about my code, I'm happy to listen to your suggestions/questions. I will edit this message to add CRAFT model when it's ready.

https://gist.github.com/A2va/64eea11018192284c7ce3db7bb3801bc

A2va avatar Jan 24 '24 08:01 A2va

Thank for those sharing, I'll give it a try!

BBO-repo avatar Jan 24 '24 09:01 BBO-repo