mdv3101 / CDeCNet

CDeC-Net: Composite Deformable Cascade Network for Table Detection in Document Images
MIT License
131 stars 33 forks source link

KeyError: 'DB_ResNeXt is not in the backbone registry' #11

Closed Andrew05200 closed 3 years ago

Andrew05200 commented 3 years ago

I try to test an image use the config flie from https://github.com/mdv3101/CDeCNet/blob/master/configs/dcn/db_cascade_mask_rcnn_x101_fpn_dconv_c3-c5_1x_coco.py , and checkpoint file from your result table called "tablebank_sota.pth" (https://drive.google.com/file/d/1CGVE5IBaGL6Ssh7dKMv8csz3omezd_HX/view) , but get the error like this. can you give some advice ? image

mdv3101 commented 3 years ago

Hi @Andrew05200, Have to installed mmdetection and other dependencies properly, by following the steps given here. It seems like your code is not able to initialize the db_resnext.py file.

Andrew05200 commented 3 years ago

@mdv3101 Thanks for your kindly replay in so short time , I test mmdetection inference demo in my envs(mmcv ==1.2.4, mmdet==2.7.0) ,it run well, show as below. can you test you config file and checpoint file and share with us ? better in jupyter notebook. thanks a lot.

image

mdv3101 commented 3 years ago

I have noticed that you are using a different version of mmcv and mmdet. Maybe you have compiled the official mmdetection repo. Kindly compile our repo, since db_resnext is available in this github repo only.

Andrew05200 commented 3 years ago

I have noticed that you are using a different version of mmcv and mmdet. Maybe you have compiled the official mmdetection repo. Kindly compile our repo, since db_resnext is available in this github repo only.

I have compiled mmcv==0.5.4 mmdet=2.0.0 as your repo required. image but when I compile your repo, I get the errorAssertionError: MMCV==0.5.4 is used but incompatible. Please install mmcv>=1.1.5, <=1.3.. image

(mmlab2) [root@ain-gpu05 table_detection]# cd CDeCNet/ (mmlab2) [root@ain-gpu05 CDeCNet]# pip install -v -e . Using pip 20.3.3 from /root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip (python 3.7) Non-user install because site-packages writeable Created temporary directory: /tmp/pip-ephem-wheel-cache-nx2ix25e Created temporary directory: /tmp/pip-req-tracker-0q226kv5 Initialized build tracking at /tmp/pip-req-tracker-0q226kv5 Created build tracker: /tmp/pip-req-tracker-0q226kv5 Entered build tracker: /tmp/pip-req-tracker-0q226kv5 Created temporary directory: /tmp/pip-install-db8xhx38 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Obtaining file:///data/pxwang/project/table_detection/CDeCNet Added file:///data/pxwang/project/table_detection/CDeCNet to build tracker '/tmp/pip-req-tracker-0q226kv5' Running setup.py (path:/data/pxwang/project/table_detection/CDeCNet/setup.py) egg_info for package from file:///data/pxwang/project/table_detection/CDeCNet Created temporary directory: /tmp/pip-pip-egg-info-0dtpiars Running command python setup.py egg_info Traceback (most recent call last): File "", line 1, in File "/data/pxwang/project/table_detection/CDeCNet/setup.py", line 194, in write_version_py() File "/data/pxwang/project/table_detection/CDeCNet/setup.py", line 70, in write_version_py sha = get_hash() File "/data/pxwang/project/table_detection/CDeCNet/setup.py", line 52, in get_hash from mmdet.version import version File "/data/pxwang/project/table_detection/CDeCNet/mmdet/init.py", line 25, in f'MMCV=={mmcv.version} is used but incompatible. ' \ AssertionError: MMCV==0.5.4 is used but incompatible. Please install mmcv>=1.1.5, <=1.3. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Exception information: Traceback (most recent call last): File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 224, in _main status = self.run(options, args) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper return func(self, options, args) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 321, in run reqs, check_supported_wheels=not options.target_dir File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve requirements, max_rounds=try_to_avoid_resolution_too_deep, File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 445, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 310, in resolve name, crit = self._merge_into_criterion(r, parent=None) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 169, in _merge_into_criterion name = self._p.identify(requirement) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 60, in identify return dependency.name File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/requirements.py", line 41, in name return self.candidate.name File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 188, in name return self.project_name File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 182, in project_name self._name = canonicalize_name(self.dist.project_name) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 239, in dist self._prepare() File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare dist = self._prepare_distribution() File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 346, in _prepare_distribution return self._factory.preparer.prepare_editable_requirement(self._ireq) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 576, in prepare_editable_requirement req, self.req_tracker, self.finder, self.build_isolation, File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 88, in _get_prepared_distribution abstract_dist.prepare_distribution_metadata(finder, build_isolation) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/distributions/sdist.py", line 41, in prepare_distribution_metadata self.req.prepare_metadata() File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 555, in prepare_metadata self.metadata_directory = self._generate_metadata() File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 535, in _generate_metadata details=self.name or "from {}".format(self.link) File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 73, in generate_metadata command_desc='python setup.py egg_info', File "/root/anaconda3/envs/mmlab2/lib/python3.7/site-packages/pip/_internal/utils/subprocess.py", line 240, in call_subprocess raise InstallationError(exc_msg) pip._internal.exceptions.InstallationError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Removed file:///data/pxwang/project/table_detection/CDeCNet from build tracker '/tmp/pip-req-tracker-0q226kv5' Removed build tracker: '/tmp/pip-req-tracker-0q226kv5'

mdv3101 commented 3 years ago

Hi @Andrew05200 , We are unable to reproduce your issue. We suggest you to try installing it on a new virtual environment.