Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] The issue with using DBNet for inferring curved text instances. #2051

Open
GZ-Metal-Cell opened this issue May 30, 2024 · 0 comments
Open
Assignees

Comments

@GZ-Metal-Cell
Copy link

Branch

master branch https://mmocr.readthedocs.io/en/latest/

📚 The doc issue

I am using the DBNet trained on the total-text dataset to infer curved text instances:

from mmocr.apis import TextDetInferencer
inferencer = TextDetInferencer(model='dbnet_resnet18_fpnc_1200e_totaltext')
print(inferencer('demo/img144.jpg', show=True))

However, it can only output quadrilateral text boxes. How can I make it generate polygonal text boxes to accurately describe curved text instances?

img367

{'predictions': [{'polygons': [[385.1835820124699, 1612.049594381581, 452.2935673640324, 1456.1367141060207, 929.6251690204326, 1661.7132853632388, 862.5151836688701, 1817.6261656387992], [949.715346116286, 1612.426505047342, 1113.102571927584, 1426.9068636686904, 1189.6717012845552, 1494.379940530528, 1026.284475473257, 1679.8995819091797], [357.7371626633864, 830.1354798026706, 1210.7975510817307, 813.8510473500127, 1219.4141517052283, 1265.4869295203166, 366.3537409855769, 1281.7713619729745]], 'scores': [0.8527029156684875, 0.8840392827987671, 0.7951122522354126]}], 'visualization': []}

Suggest a potential alternative/fix

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants