Skip to content

Text Detection using the detection_predictor model is producing incorrect sequence of bounding boxes #1754

Closed Answered by felixdittrich92
stiffmeister923 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @stiffmeister923 @agombert 👋,

If you really want to work directly with the DocumentBuilder to have all it's functionality (boxes sorting, .show(), .export(), etc. i think the easiest way would be to mock the recognition results:

For example:

import requests

from doctr.io import DocumentFile
from doctr.models import detection_predictor
from doctr.utils.geometry import detach_scores
from doctr.models.builder import DocumentBuilder


url = "https://www.francetvinfo.fr/pictures/uGwaNE-aJq7zHLhZJdzdCd9nyjE/1200x900/2021/03/16/phpCDwGn0.jpg"

det_predictor = detection_predictor(
    arch="db_mobilenet_v3_large",
    pretrained=True,
    assume_straight_pages=True,
    symmetric_pad=True,
  …

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@stiffmeister923
Comment options

@stiffmeister923
Comment options

@stiffmeister923
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@felixdittrich92
Comment options

@stiffmeister923
Comment options

Answer selected by stiffmeister923
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants