repo
stringlengths
1
99
file
stringlengths
13
215
code
stringlengths
12
59.2M
file_length
int64
12
59.2M
avg_line_length
float64
3.82
1.48M
max_line_length
int64
12
2.51M
extension_type
stringclasses
1 value
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/decode_heads/aspp_head.py
import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmseg.ops import resize from ..builder import HEADS from .decode_head import BaseDecodeHead class ASPPModule(nn.ModuleList): """Atrous Spatial Pyramid Pooling (ASPP) Module. Args: dilations (tuple[int]): Dilation rate of each la...
3,419
30.666667
76
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/decode_heads/psa_head.py
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import ConvModule from mmseg.ops import resize from ..builder import HEADS from .decode_head import BaseDecodeHead try: from mmcv.ops import PSAMask except ModuleNotFoundError: PSAMask = None @HEADS.register_module() class PSAH...
7,484
36.994924
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/decode_heads/gc_head.py
import torch from mmcv.cnn import ContextBlock from ..builder import HEADS from .fcn_head import FCNHead @HEADS.register_module() class GCHead(FCNHead): """GCNet: Non-local Networks Meet Squeeze-Excitation Networks and Beyond. This head is the implementation of `GCNet <https://arxiv.org/abs/1904.11492>`...
1,591
32.166667
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/decode_heads/point_head.py
# Modified from https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend/point_head/point_head.py # noqa import torch import torch.nn as nn from mmcv.cnn import ConvModule, normal_init from mmcv.ops import point_sample from mmseg.models.builder import HEADS from mmseg.ops import resize from ..lo...
14,674
40.928571
126
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/utils/se_layer.py
import mmcv import torch.nn as nn from mmcv.cnn import ConvModule from .make_divisible import make_divisible class SELayer(nn.Module): """Squeeze-and-Excitation Module. Args: channels (int): The input (and output) channels of the SE layer. ratio (int): Squeeze ratio in SELayer, the intermedi...
2,103
35.275862
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/utils/res_layer.py
from mmcv.cnn import build_conv_layer, build_norm_layer from torch import nn as nn class ResLayer(nn.Sequential): """ResLayer to build ResNet style backbone. Args: block (nn.Module): block used to build ResLayer. inplanes (int): inplanes of block. planes (int): planes of block. ...
3,315
33.905263
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/utils/self_attention_block.py
import torch from mmcv.cnn import ConvModule, constant_init from torch import nn as nn from torch.nn import functional as F class SelfAttentionBlock(nn.Module): """General self-attention block/non-local block. Please refer to https://arxiv.org/abs/1706.03762 for details about key, query and value. A...
6,125
37.2875
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/utils/up_conv_block.py
import torch import torch.nn as nn from mmcv.cnn import ConvModule, build_upsample_layer class UpConvBlock(nn.Module): """Upsample convolution block in decoder for UNet. This upsample convolution block consists of one upsample module followed by one convolution block. The upsample module expands the ...
3,968
37.911765
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/utils/inverted_residual.py
from mmcv.cnn import ConvModule from torch import nn from torch.utils import checkpoint as cp from .se_layer import SELayer class InvertedResidual(nn.Module): """InvertedResidual block for MobileNetV2. Args: in_channels (int): The input channels of the InvertedResidual block. out_channels (i...
7,005
32.521531
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/segmentors/base.py
import logging import warnings from abc import ABCMeta, abstractmethod from collections import OrderedDict import mmcv import numpy as np import torch import torch.distributed as dist import torch.nn as nn from mmcv.runner import auto_fp16 class BaseSegmentor(nn.Module): """Base class for segmentors.""" __m...
10,349
36.773723
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/segmentors/cascade_encoder_decoder.py
from torch import nn from mmseg.core import add_prefix from mmseg.ops import resize from .. import builder from ..builder import SEGMENTORS from .encoder_decoder import EncoderDecoder @SEGMENTORS.register_module() class CascadeEncoderDecoder(EncoderDecoder): """Cascade Encoder Decoder segmentors. CascadeEnc...
3,668
36.060606
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/segmentors/encoder_decoder.py
import torch import torch.nn as nn import torch.nn.functional as F from mmseg.core import add_prefix from mmseg.ops import resize from .. import builder from ..builder import SEGMENTORS from .base import BaseSegmentor @SEGMENTORS.register_module() class EncoderDecoder(BaseSegmentor): """Encoder Decoder segmentor...
11,129
36.857143
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/losses/dice_loss.py
"""Modified from https://github.com/LikeLy-Journey/SegmenTron/blob/master/ segmentron/solver/loss.py (Apache-2.0 License)""" import torch import torch.nn as nn import torch.nn.functional as F from ..builder import LOSSES from .utils import weighted_loss @weighted_loss def dice_loss(pred, target, ...
4,158
33.658333
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/losses/lovasz_loss.py
"""Modified from https://github.com/bermanmaxim/LovaszSoftmax/blob/master/pytor ch/lovasz_losses.py Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim Berman 2018 ESAT-PSI KU Leuven (MIT License)""" import mmcv import torch import torch.nn as nn import torch.nn.functional as F from ..builder import LOSSES from .u...
11,310
36.207237
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/losses/utils.py
import functools import torch.nn.functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are "none", "mean" and "sum". Return: Tensor: Reduced loss tensor. """ reduction_enum = ...
3,147
29.862745
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/losses/accuracy.py
import torch.nn as nn def accuracy(pred, target, topk=1, thresh=None): """Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class, ...) target (torch.Tensor): The target of each prediction, shape (N, , ...) topk (...
2,970
36.607595
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/losses/cross_entropy_loss.py
import torch import torch.nn as nn import torch.nn.functional as F from ..builder import LOSSES from .utils import weight_reduce_loss def cross_entropy(pred, label, weight=None, class_weight=None, reduction='mean', avg_factor=N...
7,354
35.959799
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/hrnet.py
import torch.nn as nn from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmseg.ops import Upsample, resize from mmseg.utils import get_root_logger from ..builder impo...
21,106
36.96223
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/mobilenet_v2.py
import logging import torch.nn as nn from mmcv.cnn import ConvModule, constant_init, kaiming_init from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from ..builder import BACKBONES from ..utils import InvertedResidual, make_divisible @BACKBONES.register_module() class MobileNe...
6,941
37.353591
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/fast_scnn.py
import torch import torch.nn as nn from mmcv.cnn import (ConvModule, DepthwiseSeparableConvModule, constant_init, kaiming_init) from torch.nn.modules.batchnorm import _BatchNorm from mmseg.models.decode_heads.psp_head import PPM from mmseg.ops import resize from ..builder import BACKBONES from .....
14,376
37.236702
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/resnet.py
import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, build_plugin_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmseg.utils import get_root_logger fr...
24,210
34.139332
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/cgnet.py
import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (ConvModule, build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmseg.utils import get_root_logg...
13,103
34.608696
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/resnext.py
import math from mmcv.cnn import build_conv_layer, build_norm_layer from ..builder import BACKBONES from ..utils import ResLayer from .resnet import Bottleneck as _Bottleneck from .resnet import ResNet class Bottleneck(_Bottleneck): """Bottleneck block for ResNeXt. If style is "pytorch", the stride-two lay...
5,121
34.082192
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/mobilenet_v3.py
import logging import mmcv import torch.nn as nn from mmcv.cnn import ConvModule, constant_init, kaiming_init from mmcv.cnn.bricks import Conv2dAdaptivePadding from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from ..builder import BACKBONES from ..utils import InvertedResidual...
10,302
39.246094
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/unet.py
import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (UPSAMPLE_LAYERS, ConvModule, build_activation_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmseg.utils import get...
18,189
41.302326
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/models/backbones/resnest.py
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.checkpoint as cp from mmcv.cnn import build_conv_layer, build_norm_layer from ..builder import BACKBONES from ..utils import ResLayer from .resnet import Bottleneck as _Bottleneck from .resnet import ResNetV1d class RS...
10,090
31.034921
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/datasets/custom.py
import os import os.path as osp from functools import reduce import mmcv import numpy as np from mmcv.utils import print_log from terminaltables import AsciiTable from torch.utils.data import Dataset from mmseg.core import eval_metrics from mmseg.utils import get_root_logger from .builder import DATASETS from .pipeli...
14,413
36.438961
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/datasets/dataset_wrappers.py
from torch.utils.data.dataset import ConcatDataset as _ConcatDataset from .builder import DATASETS @DATASETS.register_module() class ConcatDataset(_ConcatDataset): """A wrapper of concatenated dataset. Same as :obj:`torch.utils.data.dataset.ConcatDataset`, but concat the group flag for image aspect rati...
1,499
28.411765
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/datasets/builder.py
import copy import platform import random from functools import partial import numpy as np from mmcv.parallel import collate from mmcv.runner import get_dist_info from mmcv.utils import Registry, build_from_cfg from mmcv.utils.parrots_wrapper import DataLoader, PoolDataLoader from torch.utils.data import DistributedSa...
5,871
33.541176
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/datasets/pipelines/formating.py
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..builder import PIPELINES def to_tensor(data): """Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch.T...
9,228
30.934256
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/ops/wrappers.py
import warnings import torch import torch.nn as nn import torch.nn.functional as F def resize(input, size=None, scale_factor=None, mode='nearest', align_corners=None, warning=True): if warning: if size is not None and align_corners: input...
1,920
34.574074
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/mmseg/ops/encoding.py
import torch from torch import nn from torch.nn import functional as F class Encoding(nn.Module): """Encoding Layer: a learnable residual encoder. Input is of shape (batch_size, channels, height, width). Output is of shape (batch_size, num_codes, channels). Args: channels: dimension of the ...
2,788
36.186667
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_config.py
import glob import os from os.path import dirname, exists, isdir, join, relpath from mmcv import Config from torch import nn from mmseg.models import build_segmentor def _get_config_directory(): """Find the predefined segmentor config directory.""" try: # Assume we are running in the source mmsegmen...
6,019
36.391304
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_eval_hook.py
import logging import tempfile from unittest.mock import MagicMock, patch import mmcv.runner import pytest import torch import torch.nn as nn from mmcv.runner import obj_from_dict from torch.utils.data import DataLoader, Dataset from mmseg.apis import single_gpu_test from mmseg.core import DistEvalHook, EvalHook cl...
6,659
33.329897
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_sampler.py
import pytest import torch from mmseg.core import OHEMPixelSampler from mmseg.models.decode_heads import FCNHead def _context_for_ohem(): return FCNHead(in_channels=32, channels=16, num_classes=19) def test_ohem_sampler(): with pytest.raises(AssertionError): # seg_logit and seg_label must be of th...
1,361
33.923077
73
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_forward.py
"""pytest tests/test_forward.py.""" import copy from os.path import dirname, exists, join from unittest.mock import patch import numpy as np import pytest import torch import torch.nn as nn from mmcv.utils.parrots_wrapper import SyncBatchNorm, _BatchNorm def _demo_mm_inputs(input_shape=(2, 3, 8, 16), num_classes=10)...
7,425
28.585657
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_unet.py
import pytest import torch from mmcv.cnn import ConvModule from torch import nn from mmseg.models.backbones.unet import (BasicConvBlock, DeconvModule, InterpConv, UNet, UpConvBlock) from .utils import check_norm_state def test_unet_basic_conv_block(): with pytest.raises(A...
30,265
35.641646
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_mobilenet_v3.py
import pytest import torch from mmseg.models.backbones import MobileNetV3 def test_mobilenet_v3(): with pytest.raises(AssertionError): # check invalid arch MobileNetV3('big') with pytest.raises(AssertionError): # check invalid reduction_factor MobileNetV3(reduction_factor=0) ...
1,931
27.835821
76
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_blocks.py
import mmcv import pytest import torch from mmseg.models.utils import (InvertedResidual, InvertedResidualV3, SELayer, make_divisible) def test_make_divisible(): # test with min_value = None assert make_divisible(10, 4) == 12 assert make_divisible(9, 4) == 12 assert mak...
6,569
37.647059
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_resnet.py
import pytest import torch from mmcv.ops import DeformConv2dPack from mmcv.utils.parrots_wrapper import _BatchNorm from torch.nn.modules import AvgPool2d, GroupNorm from mmseg.models.backbones import ResNet, ResNetV1d from mmseg.models.backbones.resnet import BasicBlock, Bottleneck from mmseg.models.utils import ResLa...
20,346
34.447735
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_cgnet.py
import pytest import torch from mmseg.models.backbones import CGNet from mmseg.models.backbones.cgnet import (ContextGuidedBlock, GlobalContextExtractor) def test_cgnet_GlobalContextExtractor(): block = GlobalContextExtractor(16, 16, with_cp=True) x = torch.randn(2, ...
5,166
33.218543
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/utils.py
import torch from torch.nn.modules import GroupNorm from torch.nn.modules.batchnorm import _BatchNorm from mmseg.models.backbones.resnet import BasicBlock, Bottleneck from mmseg.models.backbones.resnext import Bottleneck as BottleneckX def is_block(modules): """Check if is ResNet building block.""" if isinst...
1,258
28.27907
71
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_resnest.py
import pytest import torch from mmseg.models.backbones import ResNeSt from mmseg.models.backbones.resnest import Bottleneck as BottleneckS def test_resnest_bottleneck(): with pytest.raises(AssertionError): # Style must be in ['pytorch', 'caffe'] BottleneckS(64, 64, radix=2, reduction_factor=4, st...
1,420
31.295455
76
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_resnext.py
import pytest import torch from mmseg.models.backbones import ResNeXt from mmseg.models.backbones.resnext import Bottleneck as BottleneckX from .utils import is_block def test_renext_bottleneck(): with pytest.raises(AssertionError): # Style must be in ['pytorch', 'caffe'] BottleneckX(64, 64, grou...
1,934
30.209677
72
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_backbones/test_fast_scnn.py
import pytest import torch from mmseg.models.backbones import FastSCNN def test_fastscnn_backbone(): with pytest.raises(AssertionError): # Fast-SCNN channel constraints. FastSCNN( 3, (32, 48), 64, (64, 96, 128), (2, 2, 1), global_out_channels=127, h...
848
25.53125
66
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_losses/test_dice_loss.py
import torch def test_dice_lose(): from mmseg.models import build_loss # test dice loss with loss_type = 'multi_class' loss_cfg = dict( type='DiceLoss', reduction='none', class_weight=[1.0, 2.0, 3.0], loss_weight=1.0, ignore_index=1) dice_loss = build_loss(loss...
793
24.612903
51
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_losses/test_ce_loss.py
import pytest import torch def test_ce_loss(): from mmseg.models import build_loss # use_mask and use_sigmoid cannot be true at the same time with pytest.raises(AssertionError): loss_cfg = dict( type='CrossEntropyLoss', use_mask=True, use_sigmoid=True, ...
1,580
31.265306
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_losses/test_lovasz_loss.py
import pytest import torch def test_lovasz_loss(): from mmseg.models import build_loss # loss_type should be 'binary' or 'multi_class' with pytest.raises(AssertionError): loss_cfg = dict( type='LovaszLoss', loss_type='Binary', reduction='none', loss...
2,003
30.809524
75
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_losses/test_utils.py
import numpy as np import pytest import torch from mmseg.models.losses import Accuracy, reduce_loss, weight_reduce_loss def test_weight_reduce_loss(): loss = torch.rand(1, 3, 4, 4) weight = torch.zeros(1, 3, 4, 4) weight[:, :, :2, :2] = 1 # test reduce_loss() reduced = reduce_loss(loss, 'none') ...
3,109
30.414141
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_cc_head.py
import pytest import torch from mmseg.models.decode_heads import CCHead from .utils import to_cuda def test_cc_head(): head = CCHead(in_channels=32, channels=16, num_classes=19) assert len(head.convs) == 2 assert hasattr(head, 'cca') if not torch.cuda.is_available(): pytest.skip('CCHead requi...
499
26.777778
62
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_ocr_head.py
import torch from mmseg.models.decode_heads import FCNHead, OCRHead from .utils import to_cuda def test_ocr_head(): inputs = [torch.randn(1, 32, 45, 45)] ocr_head = OCRHead( in_channels=32, channels=16, num_classes=19, ocr_channels=8) fcn_head = FCNHead(in_channels=32, channels=16, num_classes=1...
594
30.315789
68
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_ema_head.py
import torch from mmseg.models.decode_heads import EMAHead from .utils import to_cuda def test_emanet_head(): head = EMAHead( in_channels=32, ema_channels=24, channels=16, num_stages=3, num_bases=16, num_classes=19) for param in head.ema_mid_conv.parameters(): ...
604
25.304348
57
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_decode_head.py
from unittest.mock import patch import pytest import torch from mmseg.models.decode_heads.decode_head import BaseDecodeHead from .utils import to_cuda @patch.multiple(BaseDecodeHead, __abstractmethods__=set()) def test_decode_head(): with pytest.raises(AssertionError): # default input_transform doesn't...
2,731
34.947368
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_apc_head.py
import pytest import torch from mmseg.models.decode_heads import APCHead from .utils import _conv_has_norm, to_cuda def test_apc_head(): with pytest.raises(AssertionError): # pool_scales must be list|tuple APCHead(in_channels=32, channels=16, num_classes=19, pool_scales=1) # test no norm_cf...
1,715
28.084746
75
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_psp_head.py
import pytest import torch from mmseg.models.decode_heads import PSPHead from .utils import _conv_has_norm, to_cuda def test_psp_head(): with pytest.raises(AssertionError): # pool_scales must be list|tuple PSPHead(in_channels=32, channels=16, num_classes=19, pool_scales=1) # test no norm_cf...
1,092
29.361111
75
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_lraspp_head.py
import pytest import torch from mmseg.models.decode_heads import LRASPPHead def test_lraspp_head(): with pytest.raises(ValueError): # check invalid input_transform LRASPPHead( in_channels=(16, 16, 576), in_index=(0, 1, 2), channels=128, input_transf...
2,058
29.279412
77
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_gc_head.py
import torch from mmseg.models.decode_heads import GCHead from .utils import to_cuda def test_gc_head(): head = GCHead(in_channels=32, channels=16, num_classes=19) assert len(head.convs) == 2 assert hasattr(head, 'gc_block') inputs = [torch.randn(1, 32, 45, 45)] if torch.cuda.is_available(): ...
446
26.9375
62
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_enc_head.py
import torch from mmseg.models.decode_heads import EncHead from .utils import to_cuda def test_enc_head(): # with se_loss, w.o. lateral inputs = [torch.randn(1, 32, 21, 21)] head = EncHead( in_channels=[32], channels=16, num_classes=19, in_index=[-1]) if torch.cuda.is_available(): hea...
1,585
32.041667
69
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_da_head.py
import torch from mmseg.models.decode_heads import DAHead from .utils import to_cuda def test_da_head(): inputs = [torch.randn(1, 32, 45, 45)] head = DAHead(in_channels=32, channels=16, num_classes=19, pam_channels=8) if torch.cuda.is_available(): head, inputs = to_cuda(head, inputs) outputs...
602
30.736842
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_uper_head.py
import pytest import torch from mmseg.models.decode_heads import UPerHead from .utils import _conv_has_norm, to_cuda def test_uper_head(): with pytest.raises(AssertionError): # fpn_in_channels must be list|tuple UPerHead(in_channels=32, channels=16, num_classes=19) # test no norm_cfg he...
1,031
28.485714
77
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_dm_head.py
import pytest import torch from mmseg.models.decode_heads import DMHead from .utils import _conv_has_norm, to_cuda def test_dm_head(): with pytest.raises(AssertionError): # filter_sizes must be list|tuple DMHead(in_channels=32, channels=16, num_classes=19, filter_sizes=1) # test no norm_cfg...
1,718
28.135593
75
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_nl_head.py
import torch from mmseg.models.decode_heads import NLHead from .utils import to_cuda def test_nl_head(): head = NLHead(in_channels=32, channels=16, num_classes=19) assert len(head.convs) == 2 assert hasattr(head, 'nl_block') inputs = [torch.randn(1, 32, 45, 45)] if torch.cuda.is_available(): ...
446
26.9375
62
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_aspp_head.py
import pytest import torch from mmseg.models.decode_heads import ASPPHead, DepthwiseSeparableASPPHead from .utils import _conv_has_norm, to_cuda def test_aspp_head(): with pytest.raises(AssertionError): # pool_scales must be list|tuple ASPPHead(in_channels=32, channels=16, num_classes=19, dilati...
2,542
32.460526
75
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_point_head.py
import torch from mmcv.utils import ConfigDict from mmseg.models.decode_heads import FCNHead, PointHead from .utils import to_cuda def test_point_head(): inputs = [torch.randn(1, 32, 45, 45)] point_head = PointHead( in_channels=[32], in_index=[0], channels=16, num_classes=19) assert len(point_he...
810
34.26087
73
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_ann_head.py
import torch from mmseg.models.decode_heads import ANNHead from .utils import to_cuda def test_ann_head(): inputs = [torch.randn(1, 16, 45, 45), torch.randn(1, 32, 21, 21)] head = ANNHead( in_channels=[16, 32], channels=16, num_classes=19, in_index=[-2, -1], project_c...
495
23.8
69
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_fcn_head.py
import pytest import torch from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule from mmcv.utils.parrots_wrapper import SyncBatchNorm from mmseg.models.decode_heads import DepthwiseSeparableFCNHead, FCNHead from .utils import to_cuda def test_fcn_head(): with pytest.raises(AssertionError): # num...
4,493
33.305344
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_psa_head.py
import pytest import torch from mmseg.models.decode_heads import PSAHead from .utils import _conv_has_norm, to_cuda def test_psa_head(): with pytest.raises(AssertionError): # psa_type must be in 'bi-direction', 'collect', 'distribute' PSAHead( in_channels=32, channels=16,...
3,596
28.483607
72
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_heads/test_dnl_head.py
import torch from mmseg.models.decode_heads import DNLHead from .utils import to_cuda def test_dnl_head(): # DNL with 'embedded_gaussian' mode head = DNLHead(in_channels=32, channels=16, num_classes=19) assert len(head.convs) == 2 assert hasattr(head, 'dnl_block') assert head.dnl_block.temperatur...
1,557
33.622222
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_necks/test_fpn.py
import torch from mmseg.models import FPN def test_fpn(): in_channels = [256, 512, 1024, 2048] inputs = [ torch.randn(1, c, 56 // 2**i, 56 // 2**i) for i, c in enumerate(in_channels) ] fpn = FPN(in_channels, 256, len(in_channels)) outputs = fpn(inputs) assert outputs[0].shape...
531
27
59
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_models/test_segmentors/utils.py
import numpy as np import torch from torch import nn from mmseg.models import BACKBONES, HEADS from mmseg.models.decode_heads.cascade_decode_head import BaseCascadeDecodeHead from mmseg.models.decode_heads.decode_head import BaseDecodeHead def _demo_mm_inputs(input_shape=(1, 3, 8, 16), num_classes=10): """Create...
3,439
27.666667
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/tests/test_data/test_dataset_builder.py
import math import os.path as osp import pytest from torch.utils.data import (DistributedSampler, RandomSampler, SequentialSampler) from mmseg.datasets import (DATASETS, ConcatDataset, build_dataloader, build_dataset) @DATASETS.register_module() class ToyDat...
6,087
30.544041
78
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/pspnet/pspnet_r101b-d8_769x769_80k_cityscapes.py
_base_ = './pspnet_r50-d8_769x769_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet101', backbone=dict(type='ResNet', depth=101))
154
30
52
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/pspnet/pspnet_r50b-d8_769x769_80k_cityscapes.py
_base_ = './pspnet_r50-d8_769x769_80k_cityscapes.py' model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
133
43.666667
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/pspnet/pspnet_r101b-d8_512x1024_80k_cityscapes.py
_base_ = './pspnet_r50-d8_512x1024_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet101', backbone=dict(type='ResNet', depth=101))
155
30.2
53
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/pspnet/pspnet_r50b-d8_512x1024_80k_cityscapes.py
_base_ = './pspnet_r50-d8_512x1024_80k_cityscapes.py' model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
134
44
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/pspnet/pspnet_r18b-d8_769x769_80k_cityscapes.py
_base_ = './pspnet_r50-d8_769x769_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet18', backbone=dict(type='ResNet', depth=18), decode_head=dict( in_channels=512, channels=128, ), auxiliary_head=dict(in_channels=256, channels=64))
283
27.4
54
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/pspnet/pspnet_r18b-d8_512x1024_80k_cityscapes.py
_base_ = './pspnet_r50-d8_512x1024_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet18', backbone=dict(type='ResNet', depth=18), decode_head=dict( in_channels=512, channels=128, ), auxiliary_head=dict(in_channels=256, channels=64))
284
27.5
54
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_d6_r50b-d16_512x1024_80k_cityscapes.py
_base_ = './fcn_d6_r50-d16_512x1024_80k_cityscapes.py' model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
135
44.333333
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_r101b-d8_512x1024_80k_cityscapes.py
_base_ = './fcn_r50-d8_512x1024_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet101', backbone=dict(type='ResNet', depth=101))
152
29.6
50
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_r50b-d8_769x769_80k_cityscapes.py
_base_ = './fcn_r50-d8_769x769_80k_cityscapes.py' model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
130
42.666667
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_d6_r101b-d16_512x1024_80k_cityscapes.py
_base_ = './fcn_d6_r50b-d16_512x1024_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet101', backbone=dict(type='ResNet', depth=101))
157
30.6
55
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_d6_r50b-d16_769x769_80k_cityscapes.py
_base_ = './fcn_d6_r50-d16_769x769_80k_cityscapes.py' model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
134
44
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_d6_r101b-d16_769x769_80k_cityscapes.py
_base_ = './fcn_d6_r50b-d16_769x769_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet101', backbone=dict(type='ResNet', depth=101))
156
30.4
54
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_r18b-d8_512x1024_80k_cityscapes.py
_base_ = './fcn_r50-d8_512x1024_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet18', backbone=dict(type='ResNet', depth=18), decode_head=dict( in_channels=512, channels=128, ), auxiliary_head=dict(in_channels=256, channels=64))
281
27.2
54
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_r101b-d8_769x769_80k_cityscapes.py
_base_ = './fcn_r50-d8_769x769_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet101', backbone=dict(type='ResNet', depth=101))
151
29.4
49
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_r18b-d8_769x769_80k_cityscapes.py
_base_ = './fcn_r50-d8_769x769_80k_cityscapes.py' model = dict( pretrained='torchvision://resnet18', backbone=dict(type='ResNet', depth=18), decode_head=dict( in_channels=512, channels=128, ), auxiliary_head=dict(in_channels=256, channels=64))
280
27.1
54
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/fcn/fcn_r50b-d8_512x1024_80k_cityscapes.py
_base_ = './fcn_r50-d8_512x1024_80k_cityscapes.py' model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
131
43
79
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/ccnet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,258
26.977778
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/ann_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,346
27.659574
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/gcnet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,326
27.234043
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/encnet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,435
28.306122
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/danet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,261
27.044444
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/dnl_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,316
27.021277
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/pspnet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,271
27.266667
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/upernet_r50.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 1, 1), strides=...
1,301
27.933333
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/apcnet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,302
27.955556
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/psanet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,406
27.14
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/deeplabv3plus_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,343
27.595745
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/emanet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,329
26.708333
74
py
Swin-Transformer-Semantic-Segmentation-mmseg
Swin-Transformer-Semantic-Segmentation-mmseg-master/configs/_base_/models/dmnet_r50-d8.py
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='EncoderDecoder', pretrained='open-mmlab://resnet50_v1c', backbone=dict( type='ResNetV1c', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), dilations=(1, 1, 2, 4), strides=...
1,302
27.955556
74
py