You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trained a Textdet model with my own data, I can see a good detection result with following command python tools/test.py ~/mmocr/work_dirs/dbnet_resnet18_fpnc_1200e_blfsh/dbnet_resnet18_fpnc_1200e_blfsh.py ~/mmocr/work_dirs/dbnet_resnet18_fpnc_1200e_blfsh/epoch_400.pth --show-dir imgs/.
But when I tried to use TextDetInferencer with following code
from mmocr.apis import TextDetInferencer
# Load models into memory
infer = TextDetInferencer(model='<Home>/mmocr/work_dirs/dbnet_resnet18_fpnc_1200e_blfsh/dbnet_resnet18_fpnc_1200e_blfsh.py', weights='<Home>/mmocr/work_dirs/dbnet_resnet18_fpnc_1200e_blfsh/epoch_400.pth', scope='mmocr')
# Perform inference
result = infer('<Home>/BLFSH_training_data/OpenMM_textbox_training_data/test/202402020_124623_cr02.png')
print(result)
All the bounding boxes are out of image bounds, and here is the error:
10/10 21:06:44 - mmengine - WARNING - Failed to search registry with scope "mmocr" in the "function" registry tree. As a workaround, the current "function" registry in "mmengine" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmocr" is a correct scope, or whether the registry is initialized.
/opt/conda/miniconda3/lib/python3.8/site-packages/mmengine/visualization/visualizer.py:196: UserWarning: Failed to add <class 'mmengine.visualization.vis_backend.LocalVisBackend'>, please provide the `save_dir` argument.
warnings.warn(f'Failed to add {vis_backend.__class__}, '
/opt/conda/miniconda3/lib/python3.8/site-packages/mmengine/visualization/visualizer.py:831: UserWarning: Warning: The polygon is out of
bounds, the drawn polygon may not be in the image
Why the polygon could be out of the bounds? Am I using TextDetInferencer properly?
I really appreciate if you can help. Thank you
Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered:
Branch
master branch https://github.com/open-mmlab/mmocr
📚 The doc issue
I trained a Textdet model with my own data, I can see a good detection result with following command
python tools/test.py ~/mmocr/work_dirs/dbnet_resnet18_fpnc_1200e_blfsh/dbnet_resnet18_fpnc_1200e_blfsh.py ~/mmocr/work_dirs/dbnet_resnet18_fpnc_1200e_blfsh/epoch_400.pth --show-dir imgs/
.But when I tried to use TextDetInferencer with following code
All the bounding boxes are out of image bounds, and here is the error:
Why the polygon could be out of the bounds? Am I using TextDetInferencer properly?
I really appreciate if you can help. Thank you
Suggest a potential alternative/fix
No response
The text was updated successfully, but these errors were encountered: