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] MMDETECTION is incompatible with MMOCR #2000

Open
2 tasks done
ozzmanmuhammad opened this issue Oct 27, 2023 · 5 comments
Open
2 tasks done

[Bug] MMDETECTION is incompatible with MMOCR #2000

ozzmanmuhammad opened this issue Oct 27, 2023 · 5 comments
Assignees

Comments

@ozzmanmuhammad
Copy link

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmocr

Environment

!pip install -U openmim
!mim install mmengine
!mim install 'mmcv>=2.0.0rc1'
!mim install 'mmdet>=3.0.0rc0'

Reproduces the problem - code sample

https://colab.research.google.com/github/open-mmlab/mmocr/blob/dev-1.x/demo/tutorial.ipynb

Reproduces the problem - command or script

from mmocr.apis import MMOCRInferencer

Reproduces the problem - error message

AssertionError: MMDetection 3.2.0 is incompatible with MMOCR 1.0.1. Please use MMDetection >= 3.0.0rc5, < 3.2.0 instead.

Additional information

I tried to install mmocr using mim and followed instructions. On runing the from mmocr.apis import MMOCRInferencer I got AssertionError: MMDetection 3.2.0 is incompatible with MMOCR 1.0.1. Please use MMDetection >= 3.0.0rc5, < 3.2.0 instead. After that I tried to do pip install mmdet==3.1.0, but then I got ERROR: Failed building wheel for mmcv. Could say I got into cycle. I didn't found any issue with this problem. Also this code was working fine a month ago but after the latest update of mmdet 3.2.0 (start of the October 2023), I'm getting this error. Do you know what I can do with this problem or this is some sort of bug?

@branisk
Copy link

branisk commented Oct 28, 2023

The issue seems to be the non-inclusivity of the maximum version error checks in the init.py file after the update. I've created pull request #2001 to satisfy this issue.

@cpprust
Copy link

cpprust commented Nov 25, 2023

I install mmocr with these, and it works:

pip install "torch==2.0" "torchvision==0.15" "openmim"
mim install mmocr

[ref]
open-mmlab/mmcv#2938 (comment)
https://pypi.org/project/torchvision/

[note]
Test with:
python: 3.11.6
environment: venv

@baibhab07
Copy link

You can find the required dependencies in the following https://mmocr.readthedocs.io/en/dev-1.x/get_started/install.html#dependency-on-mmengine-mmcv-mmdetection

Using the link provided above. You can install mmocr by following the code below

!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

@MohamedAliRashad
Copy link

@baibhab07 I tried the versions you proposed and it still gives me an error

@MiXaiLL76
Copy link
Contributor

bump, update mmocr to support new features

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

7 participants