EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

dbnet18 is 50x slower than CRAFT on CPU

Open jorgemcgomes opened this issue 3 years ago • 7 comments

Using 1.6.2. Intel Xeon 4 cores.

For the same batch of 4 256x256 images:

ocr_model = easyocr.Reader(["en"], gpu=False, detect_network='craft') 1.8s

ocr_model = easyocr.Reader(["en"], gpu=False, detect_network='dbnet18') 82s

ocr_model = easyocr.Reader(["en"], gpu=False, detect_network='dbnet18', quantize=False) 81.21s

According to the dbnet paper (https://arxiv.org/abs/2202.10304v1), shouldn't dbnet18 achieve a quality similar to CRAFT, while being almost 10x faster (Figure 1)?

jorgemcgomes avatar Sep 16 '22 13:09 jorgemcgomes

On our test, Dbnet is faster than Craft on RTX3090 and is as fast as Craft on intel i9. Calling Dbnet the first time will require extra time in compilation, is the above result excluding the compile time?

rkcosmos avatar Sep 17 '22 06:09 rkcosmos

I had to manually compile (using the provided script), because for some reason, it wasn't being compiled on demand, and I got an error of missing libraries.

In any case, this test excludes any compile time or warmup -- I made two consecutive calls to readtext_batched, and only timed the second one.

jorgemcgomes avatar Sep 17 '22 08:09 jorgemcgomes

Has anyone solved it?

I tested CPU and GPU, dbnet18 was not working in GPU, and craft predict time is 3.15s, dbnet18 is 29.27s

zmqp111 avatar Sep 21 '22 05:09 zmqp111

I'm also interested in this

thiagodma avatar Sep 22 '22 18:09 thiagodma

Any updates on this?

thiagodma avatar Oct 03 '22 19:10 thiagodma

Dropping in because I too am interested.

ceyxasm avatar May 21 '23 10:05 ceyxasm