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

[Bug] #1340

Open
3 tasks done
WuChannn opened this issue Nov 9, 2022 · 6 comments
Open
3 tasks done

[Bug] #1340

WuChannn opened this issue Nov 9, 2022 · 6 comments
Assignees

Comments

@WuChannn
Copy link

WuChannn commented Nov 9, 2022

Checklist

  • I have searched related issues but cannot get the expected help.
  • 2. I have read the FAQ documentation but cannot get the expected help.
  • 3. The bug has not been fixed in the latest version.

Describe the bug

mmdeploy/codebase/mmocr/deploy/text_detection.py 298行self.model_cfg.model.bbox_head,然而mmocr中的maskrcnn的模型config中的bbox_head为model.roi_head.bbox_head,因此这里应该是有个bug

Reproduction

直接使用mmdeploy将mmocr训练得到的torch模型转化为onnx模型时就会出现

Environment

/data_local/anaconda3/envs/mmdeploy/lib/python3.8/site-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
  warnings.warn(
2022-11-09 09:44:46,319 - mmdeploy - INFO - 

2022-11-09 09:44:46,319 - mmdeploy - INFO - **********Environmental information**********
2022-11-09 09:44:46,828 - mmdeploy - INFO - sys.platform: linux
2022-11-09 09:44:46,828 - mmdeploy - INFO - Python: 3.8.13 (default, Oct 21 2022, 23:50:54) [GCC 11.2.0]
2022-11-09 09:44:46,828 - mmdeploy - INFO - CUDA available: True
2022-11-09 09:44:46,828 - mmdeploy - INFO - GPU 0,1,2,3,4,5,6: GeForce GTX 1080 Ti
2022-11-09 09:44:46,828 - mmdeploy - INFO - CUDA_HOME: /usr/local/cuda
2022-11-09 09:44:46,829 - mmdeploy - INFO - NVCC: Cuda compilation tools, release 11.2, V11.2.152
2022-11-09 09:44:46,829 - mmdeploy - INFO - GCC: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
2022-11-09 09:44:46,829 - mmdeploy - INFO - PyTorch: 1.12.1
2022-11-09 09:44:46,829 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:
  - GCC 9.3
  - C++ Version: 201402
  - Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.3
  - 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_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
  - CuDNN 8.3.2  (built against CUDA 11.5)
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -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 -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, 

2022-11-09 09:44:46,829 - mmdeploy - INFO - TorchVision: 0.13.1
2022-11-09 09:44:46,829 - mmdeploy - INFO - OpenCV: 4.6.0
2022-11-09 09:44:46,829 - mmdeploy - INFO - MMCV: 1.7.0
2022-11-09 09:44:46,829 - mmdeploy - INFO - MMCV Compiler: GCC 9.3
2022-11-09 09:44:46,829 - mmdeploy - INFO - MMCV CUDA Compiler: 11.3
2022-11-09 09:44:46,829 - mmdeploy - INFO - MMDeploy: 0.10.0+ff7b8fb
2022-11-09 09:44:46,829 - mmdeploy - INFO - 

2022-11-09 09:44:46,829 - mmdeploy - INFO - **********Backend information**********
2022-11-09 09:44:47,810 - mmdeploy - INFO - onnxruntime: 1.8.1	ops_is_avaliable : True
2022-11-09 09:44:47,811 - mmdeploy - INFO - tensorrt: None	ops_is_avaliable : False
2022-11-09 09:44:47,847 - mmdeploy - INFO - ncnn: None	ops_is_avaliable : False
2022-11-09 09:44:47,849 - mmdeploy - INFO - pplnn_is_avaliable: False
2022-11-09 09:44:47,849 - mmdeploy - INFO - openvino_is_avaliable: False
2022-11-09 09:44:47,887 - mmdeploy - INFO - snpe_is_available: False
2022-11-09 09:44:47,888 - mmdeploy - INFO - ascend_is_available: False
2022-11-09 09:44:47,889 - mmdeploy - INFO - coreml_is_available: False
2022-11-09 09:44:47,889 - mmdeploy - INFO - 

2022-11-09 09:44:47,889 - mmdeploy - INFO - **********Codebase information**********
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmdet:	2.25.3
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmseg:	None
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmcls:	None
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmocr:	0.6.3
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmedit:	None
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmdet3d:	None
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmpose:	None
2022-11-09 09:44:47,892 - mmdeploy - INFO - mmrotate:	None

Error traceback

No response

@AllentDan
Copy link
Member

Please check mmocr.md out. MRCNN is not supported.

@WuChannn
Copy link
Author

WuChannn commented Nov 9, 2022

@AllentDan will you plan to support MaskRCNN?

@AllentDan
Copy link
Member

We recommend you use other algorithms like DBNet or PSENet. They are better than MRCNN. If you still want to use MRCNN to do text detection. You may try mmocr 1.x and mmdeploy 1.x. MMOCR 1.x directly uses MMDet models instead of maintaining codes of MRCNN in 0.x itself.

BTW, we welcome your PR to MMDeploy.

@WuChannn
Copy link
Author

WuChannn commented Nov 9, 2022

@AllentDan Are you sure that mmdeploy 1.x can convert mmocr 1.x model to onnx? I have spent a lot of time converting.

@AllentDan
Copy link
Member

@AllentDan Are you sure that mmdeploy 1.x can convert mmocr 1.x model to onnx? I have spent a lot of time converting.

Yes, whats's the error?

@AllentDan
Copy link
Member

Hi, @WuChannn . MRCNN of MMOCR is now supported, you may try PR #1534 .

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

No branches or pull requests

3 participants