zhanggang001 / RefineMask

RefineMask: Towards High-Quality Instance Segmentation with Fine-Grained Features (CVPR 2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mmcv-full 1.3.12 is used but imcompatible

apanand14 opened this issue · comments

Hello,

I'm trying to run RefineMask repository. I have a question regarding this. Is it only run with torch 1.5.0 and mmcv-full 1.5.0 versions? Because I have higher version of torch (1.8.1+cu102) and mmcv-full (1.3.12) and when I run it then it gives an error mmcv 1.3.12 is used but incompatible. I try to install mmcv-full 1.5.0 but it throws an error. Can you guide me how should I proceed further?
Thank you in advance.

Hello,

I'm trying to run RefineMask repository. I have a question regarding this. Is it only run with torch 1.5.0 and mmcv-full 1.5.0 versions? Because I have higher version of torch (1.8.1+cu102) and mmcv-full (1.3.12) and when I run it then it gives an error mmcv 1.3.12 is used but incompatible. I try to install mmcv-full 1.5.0 but it throws an error. Can you guide me how should I proceed further?
Thank you in advance.

mmcv-full 1.0.5, not 1.5.0

It was typo. I tried with mmcv-full 1.0.5. Will it work with anyother version of mmcv-full?? I meant higher version

It was typo. I tried with mmcv-full 1.0.5. Will it work with anyother version of mmcv-full?? I meant higher version

Sorry, I did not try a higher version, so I do not know that.

Okay. Then I try with particular version and let you know. Thank you for your response!

 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc -c ./mmcv/ops/csrc/pytorch\bbox_overlaps_cuda.cu -o build\temp.win-amd64-3.7\Release\./mmcv/ops/csrc/pytorch\bbox_overlaps_cuda.obj -IC:\Users\topseven\AppData\Local\Temp\pip-install-57mg2sgj\mmcv-full_50be8358f4564a04bcf4ecc993611a64\mmcv\

ops\csrc -Ic:\developer\git\inspection\ai\refinemask\venv\lib\site-packages\torch\include -Ic:\developer\git\inspection\ai\refinemask\venv\lib\site-packages\torch\include\torch\csrc\api\include -Ic:\developer\git\inspection\ai\refinemask\venv\lib\site-packages\torch\include\TH -Ic:\developer\git\inspection\ai
refinemask\venv\lib\site-packages\torch\include\THC "-I C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -Ic:\developer\git\inspection\ai\refinemask\venv\include -IC:\Users\topseven\AppData\Local\Programs\Python\Python37\include -IC:\Users\topseven\AppData\Local\Programs\Python\Python37\includ
e "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Wind
ows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\c
ppwinrt" -Xcompiler /EHsc -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75
error: command ' C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc' failed: Invalid argument
----------------------------------------
Building wheels for collected packages: mmcv-full
Building wheel for mmcv-full (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\developer\git\inspection\ai\refinemask\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\topseven\AppData\Local\Temp\pip-install-57mg2sgj\mmcv-full_50be8358f4564a04bcf4ecc993611a64\setup.py'"'"'; file='"'"'C:\Users\topseven\AppD
ata\Local\Temp\pip-install-57mg2sgj\mmcv-full_50be8358f4564a04bcf4ecc993611a64\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();e
xec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\topseven\AppData\Local\Temp\pip-wheel-o27dpbw3'
cwd: C:\Users\topseven\AppData\Local\Temp\pip-install-57mg2sgj\mmcv-full_50be8358f4564a04bcf4ecc993611a64
Complete output (2154 lines):
running bdist_wheel
c:\developer\git\inspection\ai\refinemask\venv\lib\site-packages\torch\utils\cpp_extension.py:304: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\mmcv
copying mmcv\version.py -> build\lib.win-amd64-3.7\mmcv
copying mmcv_init
.py -> build\lib.win-amd64-3.7\mmcv
creating build\lib.win-amd64-3.7\mmcv\arraymisc
copying mmcv\arraymisc\quantization.py -> build\lib.win-amd64-3.7\mmcv\arraymisc
copying mmcv\arraymisc_init_.py -> build\lib.win-amd64-3.7\mmcv\arraymisc
creating build\lib.win-amd64-3.7\mmcv\cnn
copying mmcv\cnn\alexnet.py -> build\lib.win-amd64-3.7\mmcv\cnn
copying mmcv\cnn\resnet.py -> build\lib.win-amd64-3.7\mmcv\cnn
copying mmcv\cnn\vgg.py -> build\lib.win-amd64-3.7\mmcv\cnn
copying mmcv\cnn_init_.py -> build\lib.win-amd64-3.7\mmcv\cnn
creating build\lib.win-amd64-3.7\mmcv\fileio
copying mmcv\fileio\file_client.py -> build\lib.win-amd64-3.7\mmcv\fileio
copying mmcv\fileio\io.py -> build\lib.win-amd64-3.7\mmcv\fileio
copying mmcv\fileio\parse.py -> build\lib.win-amd64-3.7\mmcv\fileio
copying mmcv\fileio_init_.py -> build\lib.win-amd64-3.7\mmcv\fileio
creating build\lib.win-amd64-3.7\mmcv\image
copying mmcv\image\colorspace.py -> build\lib.win-amd64-3.7\mmcv\image
copying mmcv\image\geometric.py -> build\lib.win-amd64-3.7\mmcv\image
copying mmcv\image\io.py -> build\lib.win-amd64-3.7\mmcv\image
copying mmcv\image\misc.py -> build\lib.win-amd64-3.7\mmcv\image
copying mmcv\image\photometric.py -> build\lib.win-amd64-3.7\mmcv\image
copying mmcv\image_init_.py -> build\lib.win-amd64-3.7\mmcv\image
creating build\lib.win-amd64-3.7\mmcv\onnx
copying mmcv\onnx\symbolic.py -> build\lib.win-amd64-3.7\mmcv\onnx
copying mmcv\onnx_init_.py -> build\lib.win-amd64-3.7\mmcv\onnx
creating build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\bbox.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\carafe.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\cc_attention.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\corner_pool.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\deform_conv.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\deform_roi_pool.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\focal_loss.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\info.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\masked_conv.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\merge_cells.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\modulated_deform_conv.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\nms.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\point_sample.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\psa_mask.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\roi_align.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\roi_pool.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\saconv.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\sync_bn.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops\wrappers.py -> build\lib.win-amd64-3.7\mmcv\ops
copying mmcv\ops_init_.py -> build\lib.win-amd64-3.7\mmcv\ops
creating build\lib.win-amd64-3.7\mmcv\parallel
copying mmcv\parallel\collate.py -> build\lib.win-amd64-3.7\mmcv\parallel
copying mmcv\parallel\data_container.py -> build\lib.win-amd64-3.7\mmcv\parallel
.......
.......
.......
ERROR: Command errored out with exit status 1: 'c:\developer\git\inspection\ai\refinemask\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\topseven\AppData\Local\Temp\pip-install-57mg2sgj\mmcv-full_50be8358f4564a04bcf4ecc993611a64\setup.py'"'"'; fi
le
='"'"'C:\Users\topseven\AppData\Local\Temp\pip-install-57mg2sgj\mmcv-full_50be8358f4564a04bcf4ecc993611a64\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'
r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\topseven\AppData\Local\Temp\pip-record-vi_o96yj\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\developer\git\inspection\ai\refinemask\venv\include\site\python3.7
mmcv-full' Check the logs for full command output.

I'm getting this above error while try to install mmcv-full 1.0.5. Also using torch 1.5.0+cu101. Please let me know what I'm doing wrong and help me out please. Thank you in advance!

I'm getting this above error while try to install mmcv-full 1.0.5. Also using torch 1.5.0+cu101. Please let me know what I'm doing wrong and help me out please. Thank you in advance!

I have no experience with windows for this. If you want to install mmcv on windows, you may need to ask for help from the official website of mmcv.

I'm facing this error after proper installation when I run train.py with configs/refinemask/r50-refinemask-1x.py

C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\builder.py:51: UserWarning: train_cfg and test_cfg is deprecated, please specify them in model
warnings.warn(
C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\detectors\two_stage.py:29: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead
warnings.warn('DeprecationWarning: pretrained is deprecated, '
C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\backbones\resnet.py:401: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead
warnings.warn('DeprecationWarning: pretrained is deprecated, '
C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\core\anchor\builder.py:16: UserWarning: build_anchor_generator would be deprecated soon, please use build_prior_generator
warnings.warn(
Traceback (most recent call last):
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\detectors\mask_rcnn.py", line 19, in init
super(MaskRCNN, self).init(
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\detectors\two_stage.py", line 50, in init
self.roi_head = build_head(roi_head)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\builder.py", line 40, in build_head
return HEADS.build(cfg)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 44, in build_from_cfg
raise KeyError(
KeyError: 'RefineRoIHead is not in the models registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tools/train.py", line 189, in
main()
File "tools/train.py", line 159, in main
model = build_detector(
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\builder.py", line 58, in build_detector
return DETECTORS.build(
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "MaskRCNN: 'RefineRoIHead is not in the models registry'"

I'm facing this error after proper installation when I run train.py with configs/refinemask/r50-refinemask-1x.py

C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\builder.py:51: UserWarning: train_cfg and test_cfg is deprecated, please specify them in model
warnings.warn(
C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\detectors\two_stage.py:29: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead
warnings.warn('DeprecationWarning: pretrained is deprecated, '
C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\backbones\resnet.py:401: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead
warnings.warn('DeprecationWarning: pretrained is deprecated, '
C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\core\anchor\builder.py:16: UserWarning: build_anchor_generator would be deprecated soon, please use build_prior_generator
warnings.warn(
Traceback (most recent call last):
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 52, in build_from_cfg
return obj_cls(**args)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\detectors\mask_rcnn.py", line 19, in init
super(MaskRCNN, self).init(
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\detectors\two_stage.py", line 50, in init
self.roi_head = build_head(roi_head)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\builder.py", line 40, in build_head
return HEADS.build(cfg)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 44, in build_from_cfg
raise KeyError(
KeyError: 'RefineRoIHead is not in the models registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tools/train.py", line 189, in
main()
File "tools/train.py", line 159, in main
model = build_detector(
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmdet\models\builder.py", line 58, in build_detector
return DETECTORS.build(
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\cnn\builder.py", line 27, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "C:\Users\topseven\anaconda3\envs\mmcv\lib\site-packages\mmcv\utils\registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.name}: {e}')
KeyError: "MaskRCNN: 'RefineRoIHead is not in the models registry'"

Please follow this
./scripts/dist_train.sh ./configs/refinemask/coco/r50-refinemask-1x.py 8 work_dirs/r50-refinemask-1x

But isn't it the same? In your bash script, you're also running train.py. Will the bash script work for the 1 gpu config? In my opinion, customized RefineROIHead isn't registered in models registry. I think I have to register it as it's new head. What do you think?

Not the same, please check that carefully. export PYTHONPATH=$PROJ_ROOT:$PYTHONPATH