Closed endaoguansanlu closed 2 years ago
We recommend using English or English & Chinese for issues so that we could have broader discussion.
Hi @endaoguansanlu, It seems that mmcv-full is not properly installed, you could try to reinstall mmcv-full with the following command.
pip uninstall mmcv
pip install openmim
mim install mmcv-full
Hi @endaoguansanlu, It seems that mmcv-full is not properly installed, you could try to reinstall mmcv-full with the following command.
pip uninstall mmcv pip install openmim mim install mmcv-full
Thank you very much for your selfless help. Currently this problem has been solved, but I have this problem when importing build_segmentor, do you know how to solve it? thank you very much!!!
Traceback (most recent call last):
File "e:/MyModel/train.py", line 15, in
Could you show the codes you modified if possible? The scope is usually registered only once.
Another potential reason: Sometimes this error happens when certain libaries installation are not complete, or certain libaries are overlapped or destroyed thus they can not be imported and program does not know corresponding libaries.
I met this error before and it happened in PIL
, so I suggest you go through your environment packages to check whether they are correct, you could locate your wrong library and uninstall & install it like below:
First
pip uninstall Pillow
And then
pip install Pillow
D:\Python\lib\site-packages\mmcv\cnn\bricks\transformer.py:33: UserWarning: Fail to import
from mmsegmentation.mmseg.apis import set_random_seed, train_segmentor
File "e:\MyModel\mmsegmentation\mmseg\apis__init.py", line 2, in
from .inference import inference_segmentor, init_segmentor, show_result_pyplot
from .decode_head import BaseDecodeHead
File "e:\mymodel\mmsegmentation\mmseg\models\decode_heads\decode_head.py", line 11, in
from ..losses import accuracy
File "e:\mymodel\mmsegmentation\mmseg\models\losses__init__.py", line 6, in
from .focal_loss import FocalLoss
File "e:\mymodel\mmsegmentation\mmseg\models\losses\focal_loss.py", line 6, in
from mmcv.ops import sigmoid_focal_loss as _sigmoid_focal_loss
File "D:\Python\lib\site-packages\mmcv\ops__init__.py", line 2, in
from .active_rotated_filter import active_rotated_filter
File "D:\Python\lib\site-packages\mmcv\ops\active_rotated_filter.py", line 12, in
['active_rotated_filter_forward', 'active_rotated_filter_backward'])
File "D:\Python\lib\site-packages\mmcv\utils\ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "D:\Python\lib\importlib\ init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: 找不到指定的程序。
MultiScaleDeformableAttention
frommmcv.ops.multi_scale_deform_attn
, You should installmmcv-full
if you need this module. warnings.warn('Fail to importMultiScaleDeformableAttention
from ' Traceback (most recent call last): File "e:/MyModel/train.py", line 13, inI have this problem when I use mmsegmentation, do you know why, thanks!!