EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

Why is the detector limited to only craft and dbnet18?

Open surfii3z opened this issue 2 years ago • 5 comments

Hi,

First of all, thank you for the amazing project.

I was trying to play with the DBnet text detector. However, I was wondering why only dbnet18 can be used as show in the following snippet.

https://github.com/JaidedAI/EasyOCR/blob/29e39cbe7122ccccbc0620a3b55228c024806cda/easyocr/easyocr.py#L84

It seems that craft has better performance than dbnet18 but NOT dbnet50

ref: https://paperswithcode.com/sota/scene-text-detection-on-total-text?p=mask-textspotter-an-end-to-end-trainable

surfii3z avatar Oct 11 '22 02:10 surfii3z

Hi,

First of all, thank you for the amazing project.

I was trying to play with the DBnet text detector. However, I was wondering why only dbnet18 can be used as show in the following snippet.

https://github.com/JaidedAI/EasyOCR/blob/29e39cbe7122ccccbc0620a3b55228c024806cda/easyocr/easyocr.py#L84

It seems that craft has better performance than dbnet18 but NOT dbnet50

ref: https://paperswithcode.com/sota/scene-text-detection-on-total-text?p=mask-textspotter-an-end-to-end-trainable

Hi,

Dear surfiii3z,

In the project, I saw it in the config file which had 3 options: craft, dbnet18, and dbnet50. You can try it with 'detect_network' parameter

https://github.com/JaidedAI/EasyOCR/blob/f94dcffa5d49fccd7d203f0d8082a64a9bdf87f7/easyocr/config.py#L11-L27

truong-pn avatar Nov 09 '22 10:11 truong-pn

I'm seeing the same issue with the DBNet models on CPU taking a really long time (10 times as long as the CRAFT model). Interestingly, I tried out https://github.com/mindee/doctr which also uses a DBNet model and that took around 3 to 5 seconds.

benjamintanweihao avatar Nov 10 '22 15:11 benjamintanweihao

@benjamintanweihao How long does it take for you to use resent18 models in the CPU? On my Macpro M1 ,it takes about 50s .

lizhiling0609 avatar Feb 08 '23 11:02 lizhiling0609

Around there. Basically unreasonably long ;)

On Wed, 8 Feb 2023, 19:53 lizhiling0609, @.***> wrote:

@benjamintanweihao https://github.com/benjamintanweihao How long does it take for you to use resent18 models in the CPU? On my Macpro M1 ,it takes about 50s .

— Reply to this email directly, view it on GitHub https://github.com/JaidedAI/EasyOCR/issues/872#issuecomment-1422474336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGSINAIXJTUIFVNAMLUE6DWWOCLBANCNFSM6AAAAAARB2RJMQ . You are receiving this because you were mentioned.Message ID: @.***>

benjamintanweihao avatar Feb 08 '23 12:02 benjamintanweihao

As OP: part of the config but not accepted by the code (and can reproduce the slowness of dbnet18 from x5 to x15 for some images ... without significant gains in transcription based on my small samples)

drzraf avatar Nov 13 '23 23:11 drzraf