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 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
I used mmdeploy to convert my mmseg model to onnx. It works properly on 8bit png/tiff, but it does work on 32 bit tiff. This problem does not occur during training and testing stage.
2024-10-22 09:09:24,807 - mmdeploy - INFO - **********Environmental information**********
2024-10-22 09:09:25,160 - mmdeploy - INFO - sys.platform: linux
2024-10-22 09:09:25,160 - mmdeploy - INFO - Python: 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0]
2024-10-22 09:09:25,160 - mmdeploy - INFO - CUDA available: True
2024-10-22 09:09:25,160 - mmdeploy - INFO - GPU 0: Tesla P100-PCIE-16GB
2024-10-22 09:09:25,160 - mmdeploy - INFO - CUDA_HOME: /usr/local/cuda
2024-10-22 09:09:25,160 - mmdeploy - INFO - NVCC: Cuda compilation tools, release 11.3, V11.3.58
2024-10-22 09:09:25,160 - mmdeploy - INFO - GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
2024-10-22 09:09:25,160 - mmdeploy - INFO - PyTorch: 1.11.0+cu113
2024-10-22 09:09:25,160 - mmdeploy - INFO - PyTorch compiling details: PyTorch built with:
- GCC 7.3
- C++ Version: 201402
- Intel(R) oneAPI Math Kernel Library Version 2021.2-Product Build 20210312 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v2.5.2 (Git Hash a9302535553c73243c632ad3c4c80beec3d19a1e)
- 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_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
- CuDNN 8.2
- Magma 2.5.2
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.2.0, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -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-sign-compare -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 -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.11.0, 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,
2024-10-22 09:09:25,160 - mmdeploy - INFO - TorchVision: 0.12.0+cu113
2024-10-22 09:09:25,160 - mmdeploy - INFO - OpenCV: 4.10.0
2024-10-22 09:09:25,160 - mmdeploy - INFO - MMCV: 1.7.1
2024-10-22 09:09:25,160 - mmdeploy - INFO - MMCV Compiler: GCC 9.3
2024-10-22 09:09:25,160 - mmdeploy - INFO - MMCV CUDA Compiler: 11.3
2024-10-22 09:09:25,160 - mmdeploy - INFO - MMDeploy: 0.14.0+e09134d
2024-10-22 09:09:25,160 - mmdeploy - INFO -
2024-10-22 09:09:25,160 - mmdeploy - INFO - **********Backend information**********
2024-10-22 09:09:25,176 - mmdeploy - INFO - tensorrt: None
/root/miniconda3/lib/python3.8/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 4.0.0-unsupported is an invalid version and will not be supported in a future release
warnings.warn(
2024-10-22 09:09:25,259 - mmdeploy - INFO - ONNXRuntime: 1.8.1
2024-10-22 09:09:25,259 - mmdeploy - INFO - ONNXRuntime-gpu: None
2024-10-22 09:09:25,259 - mmdeploy - INFO - ONNXRuntime custom ops: Available
2024-10-22 09:09:25,260 - mmdeploy - INFO - pplnn: None
2024-10-22 09:09:25,262 - mmdeploy - INFO - ncnn: None
2024-10-22 09:09:25,263 - mmdeploy - INFO - snpe: None
2024-10-22 09:09:25,264 - mmdeploy - INFO - openvino: None
2024-10-22 09:09:25,266 - mmdeploy - INFO - torchscript: 1.11.0+cu113
2024-10-22 09:09:25,266 - mmdeploy - INFO - torchscript custom ops: NotAvailable
2024-10-22 09:09:25,392 - mmdeploy - INFO - rknn-toolkit: None
2024-10-22 09:09:25,392 - mmdeploy - INFO - rknn2-toolkit: None
2024-10-22 09:09:25,393 - mmdeploy - INFO - ascend: None
2024-10-22 09:09:25,394 - mmdeploy - INFO - coreml: None
2024-10-22 09:09:25,395 - mmdeploy - INFO - tvm: None
2024-10-22 09:09:25,395 - mmdeploy - INFO -
2024-10-22 09:09:25,395 - mmdeploy - INFO - **********Codebase information**********
2024-10-22 09:09:25,397 - mmdeploy - INFO - mmdet: None
2024-10-22 09:09:25,397 - mmdeploy - INFO - mmseg: 0.30.0
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmcls: 0.25.0
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmocr: None
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmedit: None
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmdet3d: None
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmpose: None
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmrotate: None
2024-10-22 09:09:25,398 - mmdeploy - INFO - mmaction: None
Error traceback
[ WARN:[email protected]] global grfmt_tiff.cpp:710 readData OpenCV TIFF: TIFFRGBAImageOK: Sorry, can not handle images with 32-bit samples
Process Process-2:
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/root/miniconda3/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/mmdeploy/apis/core/pipeline_manager.py", line 107, in __call__
ret = func(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/mmdeploy/apis/pytorch2onnx.py", line 65, in torch2onnx
data, model_inputs = task_processor.create_input(img, input_shape)
File "/root/miniconda3/lib/python3.8/site-packages/mmdeploy/codebase/mmseg/deploy/segmentation.py", line 145, in create_input
data = test_pipeline(data)
File "/root/miniconda3/lib/python3.8/site-packages/mmseg/datasets/pipelines/compose.py", line 41, in __call__
data = t(data)
File "/root/miniconda3/lib/python3.8/site-packages/mmseg/datasets/pipelines/loading.py", line 60, in __call__
filename = results['img_info']['filename']
KeyError: 'img_info'
2024-10-22 09:12:13,116 - mmdeploy - ERROR - `mmdeploy.apis.pytorch2onnx.torch2onnx` with Call id: 0 failed. exit.
The text was updated successfully, but these errors were encountered:
Checklist
Describe the bug
I used mmdeploy to convert my mmseg model to onnx. It works properly on 8bit png/tiff, but it does work on 32 bit tiff. This problem does not occur during training and testing stage.
Reproduction
mmdeploy/tools/deploy.py
mmdeploy/configs/mmseg/segmentation_onnxruntime_dynamic.py
configs/Mymmseg/512x512_potsdam.py
pth/best_mIoU_iter_34500.pth
32img/top_dsm_test.tif
--work-dir onnx
Environment
Error traceback
The text was updated successfully, but these errors were encountered: