-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I built the environment strictly according to the official documentation, but the following issue still occurs: No module named 'mmcv._ext'.This issue has been raised by others before.
/root/miniconda3/envs/dermseg/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
from .autonotebook import tqdm as notebook_tqdm
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 8
6 from skimage.segmentation import mark_boundaries
7 from PIL import Image
----> 8 from models.cae_seg import CAEv2_seg
9 from utils.train_utils import largestConnectComponent
File ~/autodl-tmp/PanDerm/segmentation/models/cae_seg.py:4
2 import torch.nn as nn
3 from mmengine.config import Config
----> 4 from mmseg.models import build_segmentor
5 from mmseg.models.utils import resize
8 class CAEv2_seg(nn.Module):
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/models/init.py:3
1 # Copyright (c) OpenMMLab. All rights reserved.
2 from .assigners import * # noqa: F401,F403
----> 3 from .backbones import * # noqa: F401,F403
4 from .builder import (BACKBONES, HEADS, LOSSES, SEGMENTORS, build_backbone,
5 build_head, build_loss, build_segmentor)
6 from .data_preprocessor import SegDataPreProcessor
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/models/backbones/init.py:2
1 # Copyright (c) OpenMMLab. All rights reserved.
----> 2 from .beit import BEiT
3 from .bisenetv1 import BiSeNetV1
4 from .bisenetv2 import BiSeNetV2
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/models/backbones/beit.py:19
16 from torch.nn.modules.utils import _pair as to_2tuple
18 from mmseg.registry import MODELS
---> 19 from ..utils import PatchEmbed
20 from .vit import TransformerEncoderLayer as VisionTransformerEncoderLayer
23 class BEiTAttention(BaseModule):
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/models/utils/init.py:2
1 # Copyright (c) OpenMMLab. All rights reserved.
----> 2 from .basic_block import BasicBlock, Bottleneck
3 from .embed import PatchEmbed
4 from .encoding import Encoding
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/models/utils/basic_block.py:10
7 from torch import Tensor
9 from mmseg.registry import MODELS
---> 10 from mmseg.utils import OptConfigType
13 class BasicBlock(BaseModule):
14 """Basic block from ResNet <[https://arxiv.org/abs/1512.03385>](https://arxiv.org/abs/1512.03385%3E%60).
15
16 Args:
(...)
28 init_cfg (dict, optional): Initialization config dict. Default: None.
29 """
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/utils/init.py:24
19 from .typing_utils import (ConfigType, ForwardResults, MultiConfig,
20 OptConfigType, OptMultiConfig, OptSampleList,
21 SampleList, TensorDict, TensorList)
23 # isort: off
---> 24 from .mask_classification import MatchMasks, seg_data_to_instance_data
26 all = [
27 'collect_env',
28 'register_all_modules',
(...)
69 'bdd100k_palette',
70 ]
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmseg/utils/mask_classification.py:5
2 from typing import List, Tuple
4 import torch
----> 5 from mmcv.ops import point_sample
6 from mmengine.structures import InstanceData
7 from torch import Tensor
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmcv/ops/init.py:3
1 # Copyright (c) OpenMMLab. All rights reserved.
2 from mmcv.utils import IS_MLU_AVAILABLE
----> 3 from .active_rotated_filter import active_rotated_filter
4 from .assign_score_withk import assign_score_withk
5 from .ball_query import ball_query
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmcv/ops/active_rotated_filter.py:10
6 from torch.autograd.function import once_differentiable
8 from ..utils import ext_loader
---> 10 ext_module = ext_loader.load_ext(
11 '_ext',
12 ['active_rotated_filter_forward', 'active_rotated_filter_backward'])
15 class ActiveRotatedFilterFunction(Function):
16 """Encoding the orientation information and generating orientation-
17 sensitive features.
18
19 The details are described in the paper Align Deep Features for Oriented 20 Object Detection <[https://arxiv.org/abs/2008.09397>_](https://arxiv.org/abs/2008.09397%3E_%60).
21 """
File ~/miniconda3/envs/dermseg/lib/python3.10/site-packages/mmcv/utils/ext_loader.py:13, in load_ext(name, funcs)
12 def load_ext(name, funcs):
---> 13 ext = importlib.import_module('mmcv.' + name)
14 for fun in funcs:
15 assert hasattr(ext, fun), f'{fun} miss in module {name}'
File ~/miniconda3/envs/dermseg/lib/python3.10/importlib/init.py:126, in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'mmcv._ext'