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

Error while running SDMGR #72

Closed
AnoZee opened this issue Apr 15, 2021 · 2 comments
Closed

Error while running SDMGR #72

AnoZee opened this issue Apr 15, 2021 · 2 comments
Assignees

Comments

@AnoZee
Copy link

AnoZee commented Apr 15, 2021

Reproduction

python demo/image_demo.py demo/0.jpeg configs/kie/sdmgr/sdmgr_unet16_60e_wildreceipt.py model_weights/tr_weights/sdmgr_unet16_60e_wildreceipt_20210405-16a47642.pth demo/image_recog_results/SDMGR/0_sdmgr_vt.jpg

No modifications were made to the config.

Environment

sys.platform: linux
Python: 3.7.10 (default, Feb 26 2021, 18:47:35) [GCC 7.3.0]
CUDA available: True
GPU 0: Tesla K80
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.0, V10.0.130
GCC: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
PyTorch: 1.5.0
PyTorch compiling details: PyTorch built with:

  • GCC 7.3
  • C++ Version: 201402
  • Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • CUDA Runtime 10.1
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  • CuDNN 7.6.3
  • Magma 2.5.2
  • Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_INTERNAL_THREADPOOL_IMPL -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,

TorchVision: 0.6.0a0+82fd1c8
OpenCV: 4.5.1
MMCV: 1.2.6
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.1
MMOCR: 0.1.0+5244984

All installation steps were followed as per the documentation.

Error traceback

/home/ubuntu/anaconda3/envs/mmocr/lib/python3.7/site-packages/mmdet/apis/inference.py:47: UserWarning: Class names are not saved in the checkpoint's meta data, use COCO classes by default.
  warnings.warn('Class names are not saved in the checkpoint\'s '
Traceback (most recent call last):
  File "demo/image_demo.py", line 44, in <module>
    main()
  File "demo/image_demo.py", line 32, in main
    result = model_inference(model, args.img)
  File "/home/ubuntu/Desktop/mmocr/mmocr/mmocr/apis/inference.py", line 25, in model_inference
    data = test_pipeline(data)
  File "/home/ubuntu/anaconda3/envs/mmocr/lib/python3.7/site-packages/mmdet/datasets/pipelines/compose.py", line 40, in __call__
    data = t(data)
  File "/home/ubuntu/anaconda3/envs/mmocr/lib/python3.7/site-packages/mmdet/datasets/pipelines/loading.py", line 365, in __call__
    results = self._load_bboxes(results)
  File "/home/ubuntu/anaconda3/envs/mmocr/lib/python3.7/site-packages/mmdet/datasets/pipelines/loading.py", line 240, in _load_bboxes
    ann_info = results['ann_info']
KeyError: 'ann_info'
@innerlee
Copy link
Contributor

Currently image_demo.pydoes not support sdmgr. We will add an end2end demo shortly #60

@innerlee innerlee self-assigned this Apr 15, 2021
@cuhk-hbsun
Copy link
Collaborator

  1. sdmg-r requires both image and the related metas (bboxes and text), while image_demo.py only use image as input.
  2. we will give end2end demo (text detect + text recognize + key information extraction) soon.
  3. Currently, you can use tools/kie_test_imgs.py to do visualize (download wildreceipt datasets first https://mmocr.readthedocs.io/en/latest/datasets.html)

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

3 participants