text:
validation too slow

Prerequisite

[X] I have searched the existing and past issues but cannot get the expected help.
[X] I have read the FAQ documentation but cannot get the expected help.
[X] The bug has not been fixed in the latest version.

💬 Describe the reimplementation questions
I am trying to finetuning mask rcnn in my custom dataset with single GPU, but I found that it takes about 20mins to training and  75mins to validation(0.3~0.5 tasks/s), validation process was too slow, my logs are provided as below, is there any problem of my set up?
------------------------------------------------------------
sys.platform: linux
Python: 3.7.13 (default, Mar 29 2022, 02:18:16) [GCC 7.5.0]
CUDA available: True
GPU 0,1,2,3: GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Build cuda_11.1.TC455_06.29069683_0
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
PyTorch: 1.8.2+cu111
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.1
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
  - CuDNN 8.0.5
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.2, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.9.2+cu111
OpenCV: 4.5.5
MMCV: 1.4.8
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 11.1
MMDetection: 2.24.1+
------------------------------------------------------------

2022-10-12 13:06:32,263 - mmdet - INFO - Distributed training: False
2022-10-12 13:06:32,568 - mmdet - INFO - Config:
model = dict(
    type='MaskRCNN',
    backbone=dict(
        type='ResNet',
        depth=50,
        num_stages=4,
        out_indices=(0, 1, 2, 3),
        frozen_stages=1,
        norm_cfg=dict(type='BN', requires_grad=True),
        norm_eval=True,
        style='pytorch',
        init_cfg=dict(type='Pretrained', checkpoint='torchvision://resnet50')),
    neck=dict(
        type='FPN',
        in_channels=[256, 512, 1024, 2048],
        out_channels=256,
        num_outs=5),
    rpn_head=dict(
        type='RPNHead',
        in_channels=256,
        feat_channels=256,
        anchor_generator=dict(
            type='AnchorGenerator',
            scales=[8],
            ratios=[0.5, 1.0, 2.0],
            strides=[4, 8, 16, 32, 64]),
        bbox_coder=dict(
            type='DeltaXYWHBBoxCoder',
            target_means=[0.0, 0.0, 0.0, 0.0],
            target_stds=[1.0, 1.0, 1.0, 1.0]),
        loss_cls=dict(
            type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
        loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
    roi_head=dict(
        type='StandardRoIHead',
        bbox_roi_extractor=dict(
            type='SingleRoIExtractor',
            roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
            out_channels=256,
            featmap_strides=[4, 8, 16, 32]),
        bbox_head=dict(
            type='Shared2FCBBoxHead',
            in_channels=256,
            fc_out_channels=1024,
            roi_feat_size=7,
            num_classes=1,
            bbox_coder=dict(
                type='DeltaXYWHBBoxCoder',
                target_means=[0.0, 0.0, 0.0, 0.0],
                target_stds=[0.1, 0.1, 0.2, 0.2]),
            reg_class_agnostic=False,
            loss_cls=dict(
                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
            loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
        mask_roi_extractor=dict(
            type='SingleRoIExtractor',
            roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0),
            out_channels=256,
            featmap_strides=[4, 8, 16, 32]),
        mask_head=dict(
            type='FCNMaskHead',
            num_convs=4,
            in_channels=256,
            conv_out_channels=256,
            num_classes=1,
            loss_mask=dict(
                type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))),
    train_cfg=dict(
        rpn=dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.7,
                neg_iou_thr=0.3,
                min_pos_iou=0.3,
                match_low_quality=True,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=256,
                pos_fraction=0.5,
                neg_pos_ub=-1,
                add_gt_as_proposals=False),
            allowed_border=-1,
            pos_weight=-1,
            debug=False),
        rpn_proposal=dict(
            nms_pre=2000,
            max_per_img=1000,
            nms=dict(type='nms', iou_threshold=0.7),
            min_bbox_size=0),
        rcnn=dict(
            assigner=dict(
                type='MaxIoUAssigner',
                pos_iou_thr=0.5,
                neg_iou_thr=0.5,
                min_pos_iou=0.5,
                match_low_quality=True,
                ignore_iof_thr=-1),
            sampler=dict(
                type='RandomSampler',
                num=512,
                pos_fraction=0.25,
                neg_pos_ub=-1,
                add_gt_as_proposals=True),
            mask_size=28,
            pos_weight=-1,
            debug=False)),
    test_cfg=dict(
        rpn=dict(
            nms_pre=1000,
            max_per_img=1000,
            nms=dict(type='nms', iou_threshold=0.7),
            min_bbox_size=0),
        rcnn=dict(
            score_thr=0.05,
            nms=dict(type='nms', iou_threshold=0.5),
            max_per_img=100,
            mask_thr_binary=0.5)))
dataset_type = 'CocoDataset'
data_root = 'data/coco/'
img_norm_cfg = dict(
    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
    dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(
        type='Normalize',
        mean=[123.675, 116.28, 103.53],
        std=[58.395, 57.12, 57.375],
        to_rgb=True),
    dict(type='Pad', size_divisor=32),
    dict(type='DefaultFormatBundle'),
    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks'])
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(1333, 800),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(type='RandomFlip'),
            dict(
                type='Normalize',
                mean=[123.675, 116.28, 103.53],
                std=[58.395, 57.12, 57.375],
                to_rgb=True),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img'])
        ])
]
data = dict(
    samples_per_gpu=6,
    workers_per_gpu=6,
    train=dict(
        type='CocoDataset',
        ann_file='dataset/train/annotations.json',
        img_prefix='dataset/train/',
        pipeline=[
            dict(type='LoadImageFromFile'),
            dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
            dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
            dict(type='RandomFlip', flip_ratio=0.5),
            dict(
                type='Normalize',
                mean=[123.675, 116.28, 103.53],
                std=[58.395, 57.12, 57.375],
                to_rgb=True),
            dict(type='Pad', size_divisor=32),
            dict(type='DefaultFormatBundle'),
            dict(
                type='Collect',
                keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks'])
        ],
        classes=('car', )),
    val=dict(
        type='CocoDataset',
        ann_file='dataset/val/annotations.json',
        img_prefix='dataset/val/',
        pipeline=[
            dict(type='LoadImageFromFile'),
            dict(
                type='MultiScaleFlipAug',
                img_scale=(1333, 800),
                flip=False,
                transforms=[
                    dict(type='Resize', keep_ratio=True),
                    dict(type='RandomFlip'),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[58.395, 57.12, 57.375],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(type='ImageToTensor', keys=['img']),
                    dict(type='Collect', keys=['img'])
                ])
        ],
        classes=('car', )),
    test=dict(
        type='CocoDataset',
        ann_file='dataset/test/annotations.json',
        img_prefix='dataset/test/',
        pipeline=[
            dict(type='LoadImageFromFile'),
            dict(
                type='MultiScaleFlipAug',
                img_scale=(1333, 800),
                flip=False,
                transforms=[
                    dict(type='Resize', keep_ratio=True),
                    dict(type='RandomFlip'),
                    dict(
                        type='Normalize',
                        mean=[123.675, 116.28, 103.53],
                        std=[58.395, 57.12, 57.375],
                        to_rgb=True),
                    dict(type='Pad', size_divisor=32),
                    dict(type='ImageToTensor', keys=['img']),
                    dict(type='Collect', keys=['img'])
                ])
        ],
        classes=('car', )))
evaluation = dict(metric=['bbox', 'segm'])
optimizer = dict(type='SGD', lr=0.002, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)
lr_config = dict(
    policy='step',
    warmup='linear',
    warmup_iters=500,
    warmup_ratio=0.001,
    step=[8, 11])
runner = dict(type='EpochBasedRunner', max_epochs=12)
checkpoint_config = dict(interval=1)
log_config = dict(
    interval=50,
    hooks=[dict(type='TextLoggerHook'),
           dict(type='TensorboardLoggerHook')])
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 8)]
opencv_num_threads = 0
mp_start_method = 'fork'
auto_scale_lr = dict(enable=False, base_batch_size=8)
classes = ('car', )
fp16 = dict(loss_scale=512.0)
work_dir = './work_dirs/mask_rcnn_r50_fpn_1x_uvsd'
auto_resume = False
gpu_ids = [2]

2022-10-12 13:06:32,569 - mmdet - INFO - Set random seed to 1547918333, deterministic: False
2022-10-12 13:06:33,072 - mmdet - INFO - initialize ResNet with init_cfg {'type': 'Pretrained', 'checkpoint': 'torchvision://resnet50'}
2022-10-12 13:06:33,433 - mmdet - INFO - initialize FPN with init_cfg {'type': 'Xavier', 'layer': 'Conv2d', 'distribution': 'uniform'}
2022-10-12 13:06:33,478 - mmdet - INFO - initialize RPNHead with init_cfg {'type': 'Normal', 'layer': 'Conv2d', 'std': 0.01}
2022-10-12 13:06:33,490 - mmdet - INFO - initialize Shared2FCBBoxHead with init_cfg [{'type': 'Normal', 'std': 0.01, 'override': {'name': 'fc_cls'}}, {'type': 'Normal', 'std': 0.001, 'override': {'name': 'fc_reg'}}, {'type': 'Xavier', 'distribution': 'uniform', 'override': [{'name': 'shared_fcs'}, {'name': 'cls_fcs'}, {'name': 'reg_fcs'}]}]
Name of parameter - Initialization information

backbone.conv1.weight - torch.Size([64, 3, 7, 7]):
PretrainedInit: load from torchvision://resnet50

backbone.bn1.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.bn1.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.conv1.weight - torch.Size([64, 64, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.bn1.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.bn1.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.conv2.weight - torch.Size([64, 64, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.bn2.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.bn2.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.conv3.weight - torch.Size([256, 64, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.bn3.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.bn3.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.downsample.0.weight - torch.Size([256, 64, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.downsample.1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.0.downsample.1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.conv1.weight - torch.Size([64, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.bn1.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.bn1.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.conv2.weight - torch.Size([64, 64, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.bn2.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.bn2.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.conv3.weight - torch.Size([256, 64, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.bn3.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.1.bn3.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.conv1.weight - torch.Size([64, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.bn1.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.bn1.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.conv2.weight - torch.Size([64, 64, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.bn2.weight - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.bn2.bias - torch.Size([64]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.conv3.weight - torch.Size([256, 64, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.bn3.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer1.2.bn3.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.conv1.weight - torch.Size([128, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.bn1.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.bn1.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.conv2.weight - torch.Size([128, 128, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.bn2.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.bn2.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.conv3.weight - torch.Size([512, 128, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.bn3.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.bn3.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.downsample.0.weight - torch.Size([512, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.downsample.1.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.0.downsample.1.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.conv1.weight - torch.Size([128, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.bn1.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.bn1.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.conv2.weight - torch.Size([128, 128, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.bn2.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.bn2.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.conv3.weight - torch.Size([512, 128, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.bn3.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.1.bn3.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.conv1.weight - torch.Size([128, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.bn1.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.bn1.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.conv2.weight - torch.Size([128, 128, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.bn2.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.bn2.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.conv3.weight - torch.Size([512, 128, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.bn3.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.2.bn3.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.conv1.weight - torch.Size([128, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.bn1.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.bn1.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.conv2.weight - torch.Size([128, 128, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.bn2.weight - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.bn2.bias - torch.Size([128]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.conv3.weight - torch.Size([512, 128, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.bn3.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer2.3.bn3.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.conv1.weight - torch.Size([256, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.bn1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.bn1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.conv2.weight - torch.Size([256, 256, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.bn2.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.bn2.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.conv3.weight - torch.Size([1024, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.bn3.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.bn3.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.downsample.0.weight - torch.Size([1024, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.downsample.1.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.0.downsample.1.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.conv1.weight - torch.Size([256, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.bn1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.bn1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.conv2.weight - torch.Size([256, 256, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.bn2.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.bn2.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.conv3.weight - torch.Size([1024, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.bn3.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.1.bn3.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.conv1.weight - torch.Size([256, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.bn1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.bn1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.conv2.weight - torch.Size([256, 256, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.bn2.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.bn2.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.conv3.weight - torch.Size([1024, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.bn3.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.2.bn3.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.conv1.weight - torch.Size([256, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.bn1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.bn1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.conv2.weight - torch.Size([256, 256, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.bn2.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.bn2.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.conv3.weight - torch.Size([1024, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.bn3.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.3.bn3.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.conv1.weight - torch.Size([256, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.bn1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.bn1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.conv2.weight - torch.Size([256, 256, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.bn2.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.bn2.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.conv3.weight - torch.Size([1024, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.bn3.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.4.bn3.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.conv1.weight - torch.Size([256, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.bn1.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.bn1.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.conv2.weight - torch.Size([256, 256, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.bn2.weight - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.bn2.bias - torch.Size([256]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.conv3.weight - torch.Size([1024, 256, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.bn3.weight - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer3.5.bn3.bias - torch.Size([1024]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.conv1.weight - torch.Size([512, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.bn1.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.bn1.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.conv2.weight - torch.Size([512, 512, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.bn2.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.bn2.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.conv3.weight - torch.Size([2048, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.bn3.weight - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.bn3.bias - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.downsample.0.weight - torch.Size([2048, 1024, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.downsample.1.weight - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.0.downsample.1.bias - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.conv1.weight - torch.Size([512, 2048, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.bn1.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.bn1.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.conv2.weight - torch.Size([512, 512, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.bn2.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.bn2.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.conv3.weight - torch.Size([2048, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.bn3.weight - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.1.bn3.bias - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.conv1.weight - torch.Size([512, 2048, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.bn1.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.bn1.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.conv2.weight - torch.Size([512, 512, 3, 3]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.bn2.weight - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.bn2.bias - torch.Size([512]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.conv3.weight - torch.Size([2048, 512, 1, 1]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.bn3.weight - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

backbone.layer4.2.bn3.bias - torch.Size([2048]):
PretrainedInit: load from torchvision://resnet50

neck.lateral_convs.0.conv.weight - torch.Size([256, 256, 1, 1]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.lateral_convs.0.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.lateral_convs.1.conv.weight - torch.Size([256, 512, 1, 1]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.lateral_convs.1.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.lateral_convs.2.conv.weight - torch.Size([256, 1024, 1, 1]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.lateral_convs.2.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.lateral_convs.3.conv.weight - torch.Size([256, 2048, 1, 1]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.lateral_convs.3.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.fpn_convs.0.conv.weight - torch.Size([256, 256, 3, 3]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.fpn_convs.0.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.fpn_convs.1.conv.weight - torch.Size([256, 256, 3, 3]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.fpn_convs.1.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.fpn_convs.2.conv.weight - torch.Size([256, 256, 3, 3]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.fpn_convs.2.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

neck.fpn_convs.3.conv.weight - torch.Size([256, 256, 3, 3]):
XavierInit: gain=1, distribution=uniform, bias=0

neck.fpn_convs.3.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

rpn_head.rpn_conv.weight - torch.Size([256, 256, 3, 3]):
NormalInit: mean=0, std=0.01, bias=0

rpn_head.rpn_conv.bias - torch.Size([256]):
NormalInit: mean=0, std=0.01, bias=0

rpn_head.rpn_cls.weight - torch.Size([3, 256, 1, 1]):
NormalInit: mean=0, std=0.01, bias=0

rpn_head.rpn_cls.bias - torch.Size([3]):
NormalInit: mean=0, std=0.01, bias=0

rpn_head.rpn_reg.weight - torch.Size([12, 256, 1, 1]):
NormalInit: mean=0, std=0.01, bias=0

rpn_head.rpn_reg.bias - torch.Size([12]):
NormalInit: mean=0, std=0.01, bias=0

roi_head.bbox_head.fc_cls.weight - torch.Size([2, 1024]):
NormalInit: mean=0, std=0.01, bias=0

roi_head.bbox_head.fc_cls.bias - torch.Size([2]):
NormalInit: mean=0, std=0.01, bias=0

roi_head.bbox_head.fc_reg.weight - torch.Size([4, 1024]):
NormalInit: mean=0, std=0.001, bias=0

roi_head.bbox_head.fc_reg.bias - torch.Size([4]):
NormalInit: mean=0, std=0.001, bias=0

roi_head.bbox_head.shared_fcs.0.weight - torch.Size([1024, 12544]):
XavierInit: gain=1, distribution=uniform, bias=0

roi_head.bbox_head.shared_fcs.0.bias - torch.Size([1024]):
XavierInit: gain=1, distribution=uniform, bias=0

roi_head.bbox_head.shared_fcs.1.weight - torch.Size([1024, 1024]):
XavierInit: gain=1, distribution=uniform, bias=0

roi_head.bbox_head.shared_fcs.1.bias - torch.Size([1024]):
XavierInit: gain=1, distribution=uniform, bias=0

roi_head.mask_head.convs.0.conv.weight - torch.Size([256, 256, 3, 3]):
Initialized by user-defined `init_weights` in ConvModule

roi_head.mask_head.convs.0.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

roi_head.mask_head.convs.1.conv.weight - torch.Size([256, 256, 3, 3]):
Initialized by user-defined `init_weights` in ConvModule

roi_head.mask_head.convs.1.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

roi_head.mask_head.convs.2.conv.weight - torch.Size([256, 256, 3, 3]):
Initialized by user-defined `init_weights` in ConvModule

roi_head.mask_head.convs.2.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

roi_head.mask_head.convs.3.conv.weight - torch.Size([256, 256, 3, 3]):
Initialized by user-defined `init_weights` in ConvModule

roi_head.mask_head.convs.3.conv.bias - torch.Size([256]):
The value is the same before and after calling `init_weights` of MaskRCNN

roi_head.mask_head.upsample.weight - torch.Size([256, 256, 2, 2]):
Initialized by user-defined `init_weights` in FCNMaskHead

roi_head.mask_head.upsample.bias - torch.Size([256]):
Initialized by user-defined `init_weights` in FCNMaskHead

roi_head.mask_head.conv_logits.weight - torch.Size([1, 256, 1, 1]):
Initialized by user-defined `init_weights` in FCNMaskHead

roi_head.mask_head.conv_logits.bias - torch.Size([1]):
Initialized by user-defined `init_weights` in FCNMaskHead
2022-10-12 13:06:46,591 - mmdet - INFO - Automatic scaling of learning rate (LR) has been disabled.
2022-10-12 13:06:47,500 - mmdet - INFO - Start running, host: user@user-Super-Server, work_dir: /home/user/yyc/UAV_mmdetection/work_dirs/mask_rcnn_r50_fpn_1x_uvsd
2022-10-12 13:06:47,500 - mmdet - INFO - Hooks will be executed in the following order:
before_run:
(VERY_HIGH   ) StepLrUpdaterHook
(ABOVE_NORMAL) Fp16OptimizerHook
(NORMAL      ) CheckpointHook
(LOW         ) EvalHook
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
before_train_epoch:
(VERY_HIGH   ) StepLrUpdaterHook
(NORMAL      ) NumClassCheckHook
(LOW         ) IterTimerHook
(LOW         ) EvalHook
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
before_train_iter:
(VERY_HIGH   ) StepLrUpdaterHook
(LOW         ) IterTimerHook
(LOW         ) EvalHook
 --------------------
after_train_iter:
(ABOVE_NORMAL) Fp16OptimizerHook
(NORMAL      ) CheckpointHook
(LOW         ) IterTimerHook
(LOW         ) EvalHook
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
after_train_epoch:
(NORMAL      ) CheckpointHook
(LOW         ) EvalHook
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
before_val_epoch:
(NORMAL      ) NumClassCheckHook
(LOW         ) IterTimerHook
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
before_val_iter:
(LOW         ) IterTimerHook
 --------------------
after_val_iter:
(LOW         ) IterTimerHook
 --------------------
after_val_epoch:
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
after_run:
(VERY_LOW    ) TextLoggerHook
(VERY_LOW    ) TensorboardLoggerHook
 --------------------
2022-10-12 13:06:47,501 - mmdet - INFO - workflow: [('train', 8)], max: 12 epochs
2022-10-12 13:06:47,502 - mmdet - INFO - Checkpoints will be saved to /home/user/mmdetection/work_dirs/mask_rcnn_r50_fpn_1x_**** by HardDiskBackend.

Environment
sys.platform: linux
Python: 3.7.13 (default, Mar 29 2022, 02:18:16) [GCC 7.5.0]
CUDA available: True
GPU 0,1,2,3: GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Build cuda_11.1.TC455_06.29069683_0
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
PyTorch: 1.8.2+cu111
PyTorch compiling details: PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) oneAPI Math Kernel Library Version 2021.4-Product Build 20210904 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.1
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86
  - CuDNN 8.0.5
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.1, CUDNN_VERSION=8.0.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.2, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.9.2+cu111
OpenCV: 4.5.5
MMCV: 1.4.8
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 11.1
MMDetection: 2.24.1+

Expected results
No response
Additional information
No response

Seems the dataset size is too small. The model may haven't converged at the first several epochs. You can try to use RepeatDataset to enlarge the dataset size or increase the interval of the evaluation hook.

Seems the dataset size is too small. The model may haven't converged at the first several epochs. You can try to use RepeatDataset to enlarge the dataset size or increase the interval of the evaluation hook.

Thx!


text:
[Docs] How to calculate the area of the predicted object detection box?

Branch
master branch  https://mmdetection.readthedocs.io/en/latest/
📚 The doc issue
Hello! How can I calculate the area of the predicted object detection box? What should I do.
Suggest a potential alternative/fix
No response

Each predicted box is in format of "x0, y0, x1, y1", which means the top left and bottom right corner of the box.
You can calculate the area by (x1 - x0) * (y1 - y0).

Thank you. When I execute test.py, I get a tif file to draw the box. Where can I get x0, y0, x1, y1 coordinate files?

source: gharchive/issue

repo: open-mmlab/mmdetection

license_type: permissive

license_source: github-api