We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.
main branch https://github.com/open-mmlab/mmocr
sys.platform: linux Python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] CUDA available: True numpy_random_seed: 2147483648 GPU 0: Tesla T4 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 12.2, V12.2.140 GCC: x86_64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 PyTorch: 2.0.0+cu117 PyTorch compiling details: PyTorch built with:
TorchVision: 0.15.1+cu117 OpenCV: 4.8.0 MMEngine: 0.10.2 MMOCR: 1.0.1+
!pip install torch==2.0.0 torchvision==0.15.1 !pip install -U openmim !mim install "mmengine>=0.7.1,<1.1.0" !mim install "mmcv>=2.0.0rc4,<2.1.0" !mim install "mmdet>=3.0.0rc5,<3.2.0" !mim install mmocr
!git clone https://github.com/open-mmlab/mmocr.git %cd mmocr !pip install -v -e .
from mmocr.apis import MMOCRInferencer infer = MMOCRInferencer(det='psenet', rec='robustscanner') result = infer('/content/drit_page-0005.jpg', save_vis=True, return_vis=True) print(result['predictions'])
error Traceback (most recent call last) in <cell line: 3>() 1 from mmocr.apis import MMOCRInferencer 2 infer = MMOCRInferencer(det='psenet', rec='robustscanner') ----> 3 result = infer('/content/drit_page-0005.jpg', save_vis=True, return_vis=True) 4 print(result['predictions'])
15 frames /usr/local/lib/python3.10/dist-packages/mmcv/image/geometric.py in imresize(img, size, return_scale, interpolation, out, backend) 114 resized_img = np.array(pil_image) 115 else: --> 116 resized_img = cv2.resize( 117 img, size, dst=out, interpolation=cv2_interp_codes[interpolation]) 118 if not return_scale:
error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
When i inference with this image i get the error. I believe there is a problem with detection. When i print crop_img(img, quad) shape i get: (57, 239, 3) (57, 198, 3) (57, 251, 3) (73, 137, 3) (49, 75, 3) (58, 168, 3) (58, 109, 3) (81, 267, 3) (83, 304, 3) (74, 260, 3) (66, 221, 3) (82, 153, 3) (66, 279, 3) (58, 139, 3) (58, 251, 3) (74, 295, 3) (58, 150, 3) (58, 227, 3) (66, 232, 3) (66, 144, 3) (66, 268, 3) (66, 214, 3) (66, 239, 3) (66, 185, 3) (50, 152, 3) (41, 58, 3) (41, 64, 3) (81, 272, 3) (66, 173, 3) (58, 151, 3) (66, 297, 3) (82, 259, 3) (33, 48, 3) (66, 250, 3) (58, 222, 3) (58, 269, 3) (66, 197, 3) (66, 221, 3) (41, 65, 3) (44, 73, 3) (66, 273, 3) (74, 284, 3) (74, 243, 3) (66, 262, 3) (49, 147, 3) (75, 172, 3) (66, 344, 3) (66, 221, 3) (58, 228, 3) (58, 168, 3) (57, 157, 3) (66, 273, 3) (57, 209, 3) (66, 173, 3) (66, 226, 3) (49, 158, 3) (58, 198, 3) (80, 209, 3) (82, 372, 3) (58, 151, 3) (58, 239, 3) (58, 216, 3) (66, 191, 3) (58, 174, 3) (33, 60, 3) (57, 156, 3) (66, 167, 3) (66, 209, 3) (57, 127, 3) (57, 210, 3) (66, 197, 3) (57, 222, 3) (66, 203, 3) (80, 249, 3) (49, 25, 3) (49, 134, 3) (57, 216, 3) (66, 215, 3) (57, 151, 3) (66, 273, 3) (58, 240, 3) (72, 136, 3) (50, 75, 3) (66, 215, 3) (66, 179, 3) (58, 115, 3) (50, 122, 3) (58, 115, 3) (58, 151, 3) (80, 319, 3) (33, 17, 3) (95, 213, 3) (58, 140, 3) (66, 191, 3) (58, 204, 3) (21, 33, 3) (58, 162, 3) (58, 145, 3) (74, 290, 3) (58, 174, 3) (66, 126, 3) (12, 0, 3) (0, 0, 3) (65, 132, 3) there are these with (12,0,3) or (0,0,3) that break the system. I tried to remove them from inference but i didn't manage to.
What can i do to prevent this?
The text was updated successfully, but these errors were encountered:
gaotongxiao
No branches or pull requests
Prerequisite
Task
I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmocr
Environment
sys.platform: linux
Python: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
CUDA available: True
numpy_random_seed: 2147483648
GPU 0: Tesla T4
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.2, V12.2.140
GCC: x86_64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
PyTorch: 2.0.0+cu117
PyTorch compiling details: PyTorch built with:
TorchVision: 0.15.1+cu117
OpenCV: 4.8.0
MMEngine: 0.10.2
MMOCR: 1.0.1+
Reproduces the problem - code sample
!pip install torch==2.0.0 torchvision==0.15.1
!pip install -U openmim
!mim install "mmengine>=0.7.1,<1.1.0"
!mim install "mmcv>=2.0.0rc4,<2.1.0"
!mim install "mmdet>=3.0.0rc5,<3.2.0"
!mim install mmocr
!git clone https://github.com/open-mmlab/mmocr.git
%cd mmocr
!pip install -v -e .
from mmocr.apis import MMOCRInferencer
infer = MMOCRInferencer(det='psenet', rec='robustscanner')
result = infer('/content/drit_page-0005.jpg', save_vis=True, return_vis=True)
print(result['predictions'])
Reproduces the problem - command or script
!pip install torch==2.0.0 torchvision==0.15.1
!pip install -U openmim
!mim install "mmengine>=0.7.1,<1.1.0"
!mim install "mmcv>=2.0.0rc4,<2.1.0"
!mim install "mmdet>=3.0.0rc5,<3.2.0"
!mim install mmocr
!git clone https://github.com/open-mmlab/mmocr.git
%cd mmocr
!pip install -v -e .
from mmocr.apis import MMOCRInferencer
infer = MMOCRInferencer(det='psenet', rec='robustscanner')
result = infer('/content/drit_page-0005.jpg', save_vis=True, return_vis=True)
print(result['predictions'])
Reproduces the problem - error message
error Traceback (most recent call last)
in <cell line: 3>()
1 from mmocr.apis import MMOCRInferencer
2 infer = MMOCRInferencer(det='psenet', rec='robustscanner')
----> 3 result = infer('/content/drit_page-0005.jpg', save_vis=True, return_vis=True)
4 print(result['predictions'])
15 frames
/usr/local/lib/python3.10/dist-packages/mmcv/image/geometric.py in imresize(img, size, return_scale, interpolation, out, backend)
114 resized_img = np.array(pil_image)
115 else:
--> 116 resized_img = cv2.resize(
117 img, size, dst=out, interpolation=cv2_interp_codes[interpolation])
118 if not return_scale:
error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/resize.cpp:4062: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
Additional information
When i inference with this image i get the error. I believe there is a problem with detection. When i print crop_img(img, quad) shape i get:
(57, 239, 3)
(57, 198, 3)
(57, 251, 3)
(73, 137, 3)
(49, 75, 3)
(58, 168, 3)
(58, 109, 3)
(81, 267, 3)
(83, 304, 3)
(74, 260, 3)
(66, 221, 3)
(82, 153, 3)
(66, 279, 3)
(58, 139, 3)
(58, 251, 3)
(74, 295, 3)
(58, 150, 3)
(58, 227, 3)
(66, 232, 3)
(66, 144, 3)
(66, 268, 3)
(66, 214, 3)
(66, 239, 3)
(66, 185, 3)
(50, 152, 3)
(41, 58, 3)
(41, 64, 3)
(81, 272, 3)
(66, 173, 3)
(58, 151, 3)
(66, 297, 3)
(82, 259, 3)
(33, 48, 3)
(66, 250, 3)
(58, 222, 3)
(58, 269, 3)
(66, 197, 3)
(66, 221, 3)
(41, 65, 3)
(44, 73, 3)
(66, 273, 3)
(74, 284, 3)
(74, 243, 3)
(66, 262, 3)
(49, 147, 3)
(75, 172, 3)
(66, 344, 3)
(66, 221, 3)
(58, 228, 3)
(58, 168, 3)
(57, 157, 3)
(66, 273, 3)
(57, 209, 3)
(66, 173, 3)
(66, 226, 3)
(49, 158, 3)
(58, 198, 3)
(80, 209, 3)
(82, 372, 3)
(58, 151, 3)
(58, 239, 3)
(58, 216, 3)
(66, 191, 3)
(58, 174, 3)
(33, 60, 3)
(57, 156, 3)
(66, 167, 3)
(66, 209, 3)
(57, 127, 3)
(57, 210, 3)
(66, 197, 3)
(57, 222, 3)
(66, 203, 3)
(80, 249, 3)
(49, 25, 3)
(49, 134, 3)
(57, 216, 3)
(66, 215, 3)
(57, 151, 3)
(66, 273, 3)
(58, 240, 3)
(72, 136, 3)
(50, 75, 3)
(66, 215, 3)
(66, 179, 3)
(58, 115, 3)
(50, 122, 3)
(58, 115, 3)
(58, 151, 3)
(80, 319, 3)
(33, 17, 3)
(95, 213, 3)
(58, 140, 3)
(66, 191, 3)
(58, 204, 3)
(21, 33, 3)
(58, 162, 3)
(58, 145, 3)
(74, 290, 3)
(58, 174, 3)
(66, 126, 3)
(12, 0, 3)
(0, 0, 3)
(65, 132, 3)
there are these with (12,0,3) or (0,0,3) that break the system. I tried to remove them from inference but i didn't manage to.
What can i do to prevent this?
The text was updated successfully, but these errors were encountered: