open-mmlab / mmyolo

OpenMMLab YOLO series toolbox and benchmark. Implemented RTMDet, RTMDet-Rotated,YOLOv5, YOLOv6, YOLOv7, YOLOv8,YOLOX, PPYOLOE, etc.
https://mmyolo.readthedocs.io/zh_CN/dev/
GNU General Public License v3.0
2.98k stars 535 forks source link

train yolov5_s-v61_syncbn_fast_1xb4-300e_balloon.py and meet data['category_id'] = self.cat_ids[label] IndexError: list index out of range #420

Closed GuocunWang closed 1 year ago

GuocunWang commented 1 year ago

Prerequisite

🐞 Describe the bug

I train the balloon detection following the quick start but meet the error as follows.

12/31 22:26:13 - mmengine - INFO - Epoch(val) [10][1/1] eta: 0:00:00 time: 1.2651 data_time: 0.7038 memory: 4764
Traceback (most recent call last): File "tools/train.py", line 106, in main() File "tools/train.py", line 102, in main runner.train() File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1678, in train model = self.train_loop.run() # type: ignore File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/loops.py", line 96, in run self.runner.val_loop.run() File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/loops.py", line 350, in run metrics = self.evaluator.evaluate(len(self.dataloader.dataset)) File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/evaluator/evaluator.py", line 79, in evaluate _results = metric.evaluate(size) File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/evaluator/metric.py", line 110, in evaluate _metrics = self.compute_metrics(results) # type: ignore File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 400, in compute_metrics result_files = self.results2json(preds, outfile_prefix) File "/home/***/anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 218, in results2json data['category_id'] = self.cat_ids[label] IndexError: list index out of range

I print the content and find that the label is 0 which is true, but the cat_ids is [ ]. I follow the docs and don't remake anything.

Environment

python mmyolo/utils/collect_env.py sys.platform: linux Python: 3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:49:35) [GCC 10.4.0] CUDA available: True numpy_random_seed: 2147483648 GPU 0: NVIDIA GeForce RTX 3090 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 11.1, V11.1.105 GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 PyTorch: 1.10.1 PyTorch compiling details: PyTorch built with:

TorchVision: 0.11.2 OpenCV: 4.7.0 MMEngine: 0.4.0 MMCV: 2.0.0rc3 MMDetection: 3.0.0rc5 MMYOLO: 0.2.0+27487fd

Additional information

No response

hhaAndroid commented 1 year ago

@WangGuocun Since your MMDetection is 3.0.0rc5, you will have to use the mmyolo dev branch for now

GuocunWang commented 1 year ago

@WangGuocun Since your MMDetection is 3.0.0rc5, you will have to use the mmyolo dev branch for now

Could you tell me what to do next? I just copy the code in the docs to install mmyolo.

hhaAndroid commented 1 year ago

@WangGuocun

git clone https://github.com/open-mmlab/mmyolo.git
cd mmyolo
git checkout dev
GuocunWang commented 1 year ago

I have change it, but still meet the error. But I can run other examples in the docs, such as the cat detection.

(mmyolo) ***:~/mmyolo$ git checkout dev 分支 'dev' 设置为跟踪来自 'origin' 的远程分支 'dev'。 切换到一个新分支 'dev'

.............. 01/02 21:18:42 - mmengine - INFO - Saving checkpoint at 10 epochs 01/02 21:18:43 - mmengine - WARNING - save_param_scheduler is True but self.param_schedulers is None, so skip saving parameter schedulers 01/02 21:18:45 - mmengine - INFO - Epoch(val) [10][1/1] eta: 0:00:00 time: 1.3469 data_time: 0.8048 memory: 4763
Traceback (most recent call last): File "tools/train.py", line 116, in main() File "tools/train.py", line 112, in main runner.train() File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1678, in train model = self.train_loop.run() # type: ignore File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/loops.py", line 96, in run self.runner.val_loop.run() File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/runner/loops.py", line 350, in run metrics = self.evaluator.evaluate(len(self.dataloader.dataset)) File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/evaluator/evaluator.py", line 79, in evaluate _results = metric.evaluate(size) File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmengine/evaluator/metric.py", line 110, in evaluate _metrics = self.compute_metrics(results) # type: ignore File "/home//anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 395, in compute_metrics result_files = self.results2json(preds, outfile_prefix) File "/home/***/anaconda3/envs/mmyolo/lib/python3.8/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 216, in results2json data['category_id'] = self.cat_ids[label] IndexError: list index out of range

(mmyolo) ***:~/mmyolo$ git branch

hhaAndroid commented 1 year ago

@WangGuocun ok let's confirm.

VoyagerXvoyagerx commented 1 year ago

@hhaAndroid Hi, I'm using MMEngine: 0.4.0 MMDetection: 3.0.0rc5 MMYOLO: 0.3.0+b0cf073, Also I've changed the metainfo to lowercase. I got the same error when training yolov7, while I trained yolov5 and yolov6 with my custom dataset successfully in the same environment. Here's the log:

(openmmlab) [ubuntu@VM-0-3-ubuntu ~/mmyolo]$ python tools/train.py configs/custom_dataset/yolov7_l_syncbn_fast_1xb32-100e_ionogram.py
01/09 23:26:36 - mmengine - WARNING - Failed to search registry with scope "mmyolo" in the "log_processor" registry tree. As a workaround, the current "log_processor" registry in "mmengine" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmyolo" is a correct scope, or whether the registry is initialized.
01/09 23:26:36 - mmengine - INFO - 
------------------------------------------------------------
System environment:
    sys.platform: linux
    Python: 3.8.15 (default, Nov 24 2022, 15:19:38) [GCC 11.2.0]
    CUDA available: True
    numpy_random_seed: 1381925
    GPU 0: Tesla V100-SXM2-32GB
    CUDA_HOME: :/usr/local/cuda-11.4:/usr/local/cuda-11.4
    GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
    PyTorch: 1.12.1
    PyTorch compiling details: PyTorch built with:
  - GCC 9.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 v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 11.3
  - 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_61,code=sm_61;-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;-gencode;arch=compute_37,code=compute_37
  - CuDNN 8.3.2  (built against CUDA 11.5)
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -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 -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, 

    TorchVision: 0.13.1
    OpenCV: 4.6.0
    MMEngine: 0.4.0

Runtime environment:
    cudnn_benchmark: True
    mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0}
    dist_cfg: {'backend': 'nccl'}
    seed: None
    Distributed launcher: none
    Distributed training: False
    GPU number: 1
------------------------------------------------------------

01/09 23:26:40 - mmengine - INFO - Config:
default_scope = 'mmyolo'
default_hooks = dict(
    timer=dict(type='IterTimerHook'),
    logger=dict(type='LoggerHook', interval=50),
    param_scheduler=dict(
        type='YOLOv5ParamSchedulerHook',
        scheduler_type='cosine',
        lr_factor=0.1,
        max_epochs=10),
    checkpoint=dict(
        type='CheckpointHook',
        interval=25,
        save_param_scheduler=False,
        save_best='auto',
        max_keep_ckpts=1),
    sampler_seed=dict(type='DistSamplerSeedHook'),
    visualization=dict(type='mmdet.DetVisualizationHook'))
env_cfg = dict(
    cudnn_benchmark=True,
    mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0),
    dist_cfg=dict(backend='nccl'))
vis_backends = [dict(type='LocalVisBackend')]
visualizer = dict(
    type='mmdet.DetLocalVisualizer',
    vis_backends=[dict(type='LocalVisBackend'),
                  dict(type='WandbVisBackend')],
    name='visualizer')
log_processor = dict(type='LogProcessor', window_size=50, by_epoch=True)
log_level = 'INFO'
load_from = './work_dirs/yolov7_l_syncbn_fast_8x16b-300e_coco_20221123_023601-8113c0eb.pth'
resume = False
file_client_args = dict(backend='disk')
data_root = './Iono4311/'
dataset_type = 'YOLOv5CocoDataset'
class_name = ('E', 'Es-l', 'Es-c', 'F1', 'F2', 'Spread-F')
num_classes = 6
metainfo = dict(
    classes=('E', 'Es-l', 'Es-c', 'F1', 'F2', 'Spread-F'),
    palette=[(250, 165, 30), (120, 69, 125), (53, 125, 34), (0, 11, 123),
             (130, 20, 12), (120, 121, 80)])
img_scale = (640, 640)
work_dir = './work_dirs/yolov7_l_100e'
save_epoch_intervals = 2
train_batch_size_per_gpu = 16
train_num_workers = 4
max_epochs = 10
base_lr = 0.00125
persistent_workers = True
val_batch_size_per_gpu = 1
val_num_workers = 2
batch_shapes_cfg = dict(
    type='BatchShapePolicy',
    batch_size=1,
    img_size=640,
    size_divisor=32,
    extra_pad_ratio=0.5)
anchors = [[[8, 6], [24, 4], [19, 9]], [[22, 19], [17, 49], [29, 45]],
           [[44, 66], [96, 76], [126, 59]]]
strides = [8, 16, 32]
num_det_layers = 3
model = dict(
    type='YOLODetector',
    data_preprocessor=dict(
        type='YOLOv5DetDataPreprocessor',
        mean=[0.0, 0.0, 0.0],
        std=[255.0, 255.0, 255.0],
        bgr_to_rgb=True),
    backbone=dict(
        type='YOLOv7Backbone',
        arch='L',
        norm_cfg=dict(type='BN', momentum=0.03, eps=0.001),
        act_cfg=dict(type='SiLU', inplace=True)),
    neck=dict(
        type='YOLOv7PAFPN',
        block_cfg=dict(
            type='ELANBlock',
            middle_ratio=0.5,
            block_ratio=0.25,
            num_blocks=4,
            num_convs_in_block=1),
        upsample_feats_cat_first=False,
        in_channels=[512, 1024, 1024],
        out_channels=[128, 256, 512],
        norm_cfg=dict(type='BN', momentum=0.03, eps=0.001),
        act_cfg=dict(type='SiLU', inplace=True)),
    bbox_head=dict(
        type='YOLOv7Head',
        head_module=dict(
            type='YOLOv7HeadModule',
            num_classes=6,
            in_channels=[256, 512, 1024],
            featmap_strides=[8, 16, 32],
            num_base_priors=3),
        prior_generator=dict(
            type='mmdet.YOLOAnchorGenerator',
            base_sizes=[[[8, 6], [24, 4], [19, 9]],
                        [[22, 19], [17, 49], [29, 45]],
                        [[44, 66], [96, 76], [126, 59]]],
            strides=[8, 16, 32]),
        loss_cls=dict(
            type='mmdet.CrossEntropyLoss',
            use_sigmoid=True,
            reduction='mean',
            loss_weight=0.0225),
        loss_bbox=dict(
            type='IoULoss',
            iou_mode='ciou',
            bbox_format='xywh',
            reduction='mean',
            loss_weight=0.05,
            return_iou=True),
        loss_obj=dict(
            type='mmdet.CrossEntropyLoss',
            use_sigmoid=True,
            reduction='mean',
            loss_weight=0.7),
        obj_level_weights=[4.0, 1.0, 0.4],
        prior_match_thr=4.0,
        simota_candidate_topk=10,
        simota_iou_weight=3.0,
        simota_cls_weight=1.0),
    test_cfg=dict(
        multi_label=True,
        nms_pre=30000,
        score_thr=0.001,
        nms=dict(type='nms', iou_threshold=0.65),
        max_per_img=300))
pre_transform = [
    dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
    dict(type='LoadAnnotations', with_bbox=True)
]
mosiac4_pipeline = [
    dict(
        type='Mosaic',
        img_scale=(640, 640),
        pad_val=114.0,
        pre_transform=[
            dict(
                type='LoadImageFromFile',
                file_client_args=dict(backend='disk')),
            dict(type='LoadAnnotations', with_bbox=True)
        ]),
    dict(
        type='YOLOv5RandomAffine',
        max_rotate_degree=0.0,
        max_shear_degree=0.0,
        max_translate_ratio=0.2,
        scaling_ratio_range=(0.1, 2.0),
        border=(-320, -320),
        border_val=(114, 114, 114))
]
mosiac9_pipeline = [
    dict(
        type='Mosaic9',
        img_scale=(640, 640),
        pad_val=114.0,
        pre_transform=[
            dict(
                type='LoadImageFromFile',
                file_client_args=dict(backend='disk')),
            dict(type='LoadAnnotations', with_bbox=True)
        ]),
    dict(
        type='YOLOv5RandomAffine',
        max_rotate_degree=0.0,
        max_shear_degree=0.0,
        max_translate_ratio=0.2,
        scaling_ratio_range=(0.1, 2.0),
        border=(-320, -320),
        border_val=(114, 114, 114))
]
randchoice_mosaic_pipeline = dict(
    type='RandomChoice',
    transforms=[[{
        'type':
        'Mosaic',
        'img_scale': (640, 640),
        'pad_val':
        114.0,
        'pre_transform': [{
            'type': 'LoadImageFromFile',
            'file_client_args': {
                'backend': 'disk'
            }
        }, {
            'type': 'LoadAnnotations',
            'with_bbox': True
        }]
    }, {
        'type': 'YOLOv5RandomAffine',
        'max_rotate_degree': 0.0,
        'max_shear_degree': 0.0,
        'max_translate_ratio': 0.2,
        'scaling_ratio_range': (0.1, 2.0),
        'border': (-320, -320),
        'border_val': (114, 114, 114)
    }],
                [{
                    'type':
                    'Mosaic9',
                    'img_scale': (640, 640),
                    'pad_val':
                    114.0,
                    'pre_transform': [{
                        'type': 'LoadImageFromFile',
                        'file_client_args': {
                            'backend': 'disk'
                        }
                    }, {
                        'type': 'LoadAnnotations',
                        'with_bbox': True
                    }]
                }, {
                    'type': 'YOLOv5RandomAffine',
                    'max_rotate_degree': 0.0,
                    'max_shear_degree': 0.0,
                    'max_translate_ratio': 0.2,
                    'scaling_ratio_range': (0.1, 2.0),
                    'border': (-320, -320),
                    'border_val': (114, 114, 114)
                }]],
    prob=[0.8, 0.2])
train_pipeline = [
    dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
    dict(type='LoadAnnotations', with_bbox=True),
    dict(
        type='RandomChoice',
        transforms=[[{
            'type':
            'Mosaic',
            'img_scale': (640, 640),
            'pad_val':
            114.0,
            'pre_transform': [{
                'type': 'LoadImageFromFile',
                'file_client_args': {
                    'backend': 'disk'
                }
            }, {
                'type': 'LoadAnnotations',
                'with_bbox': True
            }]
        }, {
            'type': 'YOLOv5RandomAffine',
            'max_rotate_degree': 0.0,
            'max_shear_degree': 0.0,
            'max_translate_ratio': 0.2,
            'scaling_ratio_range': (0.1, 2.0),
            'border': (-320, -320),
            'border_val': (114, 114, 114)
        }],
                    [{
                        'type':
                        'Mosaic9',
                        'img_scale': (640, 640),
                        'pad_val':
                        114.0,
                        'pre_transform': [{
                            'type': 'LoadImageFromFile',
                            'file_client_args': {
                                'backend': 'disk'
                            }
                        }, {
                            'type': 'LoadAnnotations',
                            'with_bbox': True
                        }]
                    }, {
                        'type': 'YOLOv5RandomAffine',
                        'max_rotate_degree': 0.0,
                        'max_shear_degree': 0.0,
                        'max_translate_ratio': 0.2,
                        'scaling_ratio_range': (0.1, 2.0),
                        'border': (-320, -320),
                        'border_val': (114, 114, 114)
                    }]],
        prob=[0.8, 0.2]),
    dict(
        type='YOLOv5MixUp',
        alpha=8.0,
        beta=8.0,
        prob=0.15,
        pre_transform=[
            dict(
                type='LoadImageFromFile',
                file_client_args=dict(backend='disk')),
            dict(type='LoadAnnotations', with_bbox=True),
            dict(
                type='RandomChoice',
                transforms=[[{
                    'type':
                    'Mosaic',
                    'img_scale': (640, 640),
                    'pad_val':
                    114.0,
                    'pre_transform': [{
                        'type': 'LoadImageFromFile',
                        'file_client_args': {
                            'backend': 'disk'
                        }
                    }, {
                        'type': 'LoadAnnotations',
                        'with_bbox': True
                    }]
                }, {
                    'type': 'YOLOv5RandomAffine',
                    'max_rotate_degree': 0.0,
                    'max_shear_degree': 0.0,
                    'max_translate_ratio': 0.2,
                    'scaling_ratio_range': (0.1, 2.0),
                    'border': (-320, -320),
                    'border_val': (114, 114, 114)
                }],
                            [{
                                'type':
                                'Mosaic9',
                                'img_scale': (640, 640),
                                'pad_val':
                                114.0,
                                'pre_transform': [{
                                    'type': 'LoadImageFromFile',
                                    'file_client_args': {
                                        'backend': 'disk'
                                    }
                                }, {
                                    'type': 'LoadAnnotations',
                                    'with_bbox': True
                                }]
                            }, {
                                'type': 'YOLOv5RandomAffine',
                                'max_rotate_degree': 0.0,
                                'max_shear_degree': 0.0,
                                'max_translate_ratio': 0.2,
                                'scaling_ratio_range': (0.1, 2.0),
                                'border': (-320, -320),
                                'border_val': (114, 114, 114)
                            }]],
                prob=[0.8, 0.2])
        ]),
    dict(type='YOLOv5HSVRandomAug'),
    dict(type='mmdet.RandomFlip', prob=0.5),
    dict(
        type='mmdet.PackDetInputs',
        meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape', 'flip',
                   'flip_direction'))
]
train_dataloader = dict(
    batch_size=16,
    num_workers=4,
    persistent_workers=True,
    pin_memory=True,
    sampler=dict(type='DefaultSampler', shuffle=True),
    collate_fn=dict(type='yolov5_collate'),
    dataset=dict(
        type='YOLOv5CocoDataset',
        data_root='./Iono4311/',
        ann_file='annotations/train.json',
        data_prefix=dict(img='train_images/'),
        filter_cfg=dict(filter_empty_gt=False, min_size=32),
        pipeline=[
            dict(
                type='LoadImageFromFile',
                file_client_args=dict(backend='disk')),
            dict(type='LoadAnnotations', with_bbox=True),
            dict(
                type='RandomChoice',
                transforms=[[{
                    'type':
                    'Mosaic',
                    'img_scale': (640, 640),
                    'pad_val':
                    114.0,
                    'pre_transform': [{
                        'type': 'LoadImageFromFile',
                        'file_client_args': {
                            'backend': 'disk'
                        }
                    }, {
                        'type': 'LoadAnnotations',
                        'with_bbox': True
                    }]
                }, {
                    'type': 'YOLOv5RandomAffine',
                    'max_rotate_degree': 0.0,
                    'max_shear_degree': 0.0,
                    'max_translate_ratio': 0.2,
                    'scaling_ratio_range': (0.1, 2.0),
                    'border': (-320, -320),
                    'border_val': (114, 114, 114)
                }],
                            [{
                                'type':
                                'Mosaic9',
                                'img_scale': (640, 640),
                                'pad_val':
                                114.0,
                                'pre_transform': [{
                                    'type': 'LoadImageFromFile',
                                    'file_client_args': {
                                        'backend': 'disk'
                                    }
                                }, {
                                    'type': 'LoadAnnotations',
                                    'with_bbox': True
                                }]
                            }, {
                                'type': 'YOLOv5RandomAffine',
                                'max_rotate_degree': 0.0,
                                'max_shear_degree': 0.0,
                                'max_translate_ratio': 0.2,
                                'scaling_ratio_range': (0.1, 2.0),
                                'border': (-320, -320),
                                'border_val': (114, 114, 114)
                            }]],
                prob=[0.8, 0.2]),
            dict(
                type='YOLOv5MixUp',
                alpha=8.0,
                beta=8.0,
                prob=0.15,
                pre_transform=[
                    dict(
                        type='LoadImageFromFile',
                        file_client_args=dict(backend='disk')),
                    dict(type='LoadAnnotations', with_bbox=True),
                    dict(
                        type='RandomChoice',
                        transforms=[[{
                            'type':
                            'Mosaic',
                            'img_scale': (640, 640),
                            'pad_val':
                            114.0,
                            'pre_transform': [{
                                'type': 'LoadImageFromFile',
                                'file_client_args': {
                                    'backend': 'disk'
                                }
                            }, {
                                'type': 'LoadAnnotations',
                                'with_bbox': True
                            }]
                        }, {
                            'type': 'YOLOv5RandomAffine',
                            'max_rotate_degree': 0.0,
                            'max_shear_degree': 0.0,
                            'max_translate_ratio': 0.2,
                            'scaling_ratio_range': (0.1, 2.0),
                            'border': (-320, -320),
                            'border_val': (114, 114, 114)
                        }],
                                    [{
                                        'type':
                                        'Mosaic9',
                                        'img_scale': (640, 640),
                                        'pad_val':
                                        114.0,
                                        'pre_transform': [{
                                            'type': 'LoadImageFromFile',
                                            'file_client_args': {
                                                'backend': 'disk'
                                            }
                                        }, {
                                            'type': 'LoadAnnotations',
                                            'with_bbox': True
                                        }]
                                    }, {
                                        'type': 'YOLOv5RandomAffine',
                                        'max_rotate_degree': 0.0,
                                        'max_shear_degree': 0.0,
                                        'max_translate_ratio': 0.2,
                                        'scaling_ratio_range': (0.1, 2.0),
                                        'border': (-320, -320),
                                        'border_val': (114, 114, 114)
                                    }]],
                        prob=[0.8, 0.2])
                ]),
            dict(type='YOLOv5HSVRandomAug'),
            dict(type='mmdet.RandomFlip', prob=0.5),
            dict(
                type='mmdet.PackDetInputs',
                meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                           'flip', 'flip_direction'))
        ]))
test_pipeline = [
    dict(type='LoadImageFromFile', file_client_args=dict(backend='disk')),
    dict(type='YOLOv5KeepRatioResize', scale=(640, 640)),
    dict(
        type='LetterResize',
        scale=(640, 640),
        allow_scale_up=False,
        pad_val=dict(img=114)),
    dict(type='LoadAnnotations', with_bbox=True, _scope_='mmdet'),
    dict(
        type='mmdet.PackDetInputs',
        meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                   'scale_factor', 'pad_param'))
]
val_dataloader = dict(
    batch_size=1,
    num_workers=2,
    persistent_workers=True,
    pin_memory=True,
    drop_last=False,
    sampler=dict(type='DefaultSampler', shuffle=False),
    dataset=dict(
        type='YOLOv5CocoDataset',
        data_root='./Iono4311/',
        test_mode=True,
        data_prefix=dict(img='val_images/'),
        ann_file='annotations/val.json',
        pipeline=[
            dict(
                type='LoadImageFromFile',
                file_client_args=dict(backend='disk')),
            dict(type='YOLOv5KeepRatioResize', scale=(640, 640)),
            dict(
                type='LetterResize',
                scale=(640, 640),
                allow_scale_up=False,
                pad_val=dict(img=114)),
            dict(type='LoadAnnotations', with_bbox=True, _scope_='mmdet'),
            dict(
                type='mmdet.PackDetInputs',
                meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                           'scale_factor', 'pad_param'))
        ],
        batch_shapes_cfg=dict(
            type='BatchShapePolicy',
            batch_size=1,
            img_size=640,
            size_divisor=32,
            extra_pad_ratio=0.5)))
test_dataloader = dict(
    batch_size=1,
    num_workers=2,
    persistent_workers=True,
    pin_memory=True,
    drop_last=False,
    sampler=dict(type='DefaultSampler', shuffle=False),
    dataset=dict(
        type='YOLOv5CocoDataset',
        data_root='./Iono4311/',
        test_mode=True,
        data_prefix=dict(img='test_images/'),
        ann_file='annotations/test.json',
        pipeline=[
            dict(
                type='LoadImageFromFile',
                file_client_args=dict(backend='disk')),
            dict(type='YOLOv5KeepRatioResize', scale=(640, 640)),
            dict(
                type='LetterResize',
                scale=(640, 640),
                allow_scale_up=False,
                pad_val=dict(img=114)),
            dict(type='LoadAnnotations', with_bbox=True, _scope_='mmdet'),
            dict(
                type='mmdet.PackDetInputs',
                meta_keys=('img_id', 'img_path', 'ori_shape', 'img_shape',
                           'scale_factor', 'pad_param'))
        ],
        batch_shapes_cfg=dict(
            type='BatchShapePolicy',
            batch_size=1,
            img_size=640,
            size_divisor=32,
            extra_pad_ratio=0.5)))
param_scheduler = None
optim_wrapper = dict(
    type='OptimWrapper',
    optimizer=dict(
        type='SGD',
        lr=0.00125,
        momentum=0.937,
        weight_decay=0.0005,
        nesterov=True,
        batch_size_per_gpu=16),
    constructor='YOLOv7OptimWrapperConstructor')
val_evaluator = dict(
    type='mmdet.CocoMetric',
    proposal_nums=(100, 1, 10),
    ann_file='./Iono4311/annotations/val.json',
    metric='bbox')
test_evaluator = dict(
    type='mmdet.CocoMetric',
    proposal_nums=(100, 1, 10),
    ann_file='./Iono4311/annotations/test.json',
    metric='bbox')
train_cfg = dict(
    type='EpochBasedTrainLoop', max_epochs=10, val_interval=2, val_begin=1)
custom_hooks = [
    dict(
        type='EMAHook',
        ema_type='ExpMomentumEMA',
        momentum=0.0001,
        update_buffers=True,
        strict_load=False,
        priority=49)
]
val_cfg = dict(type='ValLoop')
test_cfg = dict(type='TestLoop')
launcher = 'none'

01/09 23:26:40 - mmengine - WARNING - The "visualizer" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:40 - mmengine - WARNING - The "visualizer" registry in mmdet did not set import location. Fallback to call `mmdet.utils.register_all_modules` instead.
01/09 23:26:40 - mmengine - WARNING - The "vis_backend" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
wandb: Currently logged in as: 19211416. Use `wandb login --relogin` to force relogin
wandb: Tracking run with wandb version 0.13.7
wandb: Run data is saved locally in /home/ubuntu/mmyolo/work_dirs/yolov7_l_100e/20230109_232636/vis_data/wandb/run-20230109_232645-3stgv9ud
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run firm-pine-33
wandb: ⭐️ View project at https://wandb.ai/19211416/mmyolo-tools
wandb: 🚀 View run at https://wandb.ai/19211416/mmyolo-tools/runs/3stgv9ud
01/09 23:26:54 - mmengine - WARNING - The "model" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:54 - mmengine - WARNING - The "model" registry in mmdet did not set import location. Fallback to call `mmdet.utils.register_all_modules` instead.
01/09 23:26:54 - mmengine - WARNING - The "task util" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:54 - mmengine - WARNING - The "task util" registry in mmdet did not set import location. Fallback to call `mmdet.utils.register_all_modules` instead.
01/09 23:26:56 - mmengine - INFO - Distributed training is not used, all SyncBatchNorm (SyncBN) layers in the model will be automatically reverted to BatchNormXd layers if they are used.
01/09 23:26:56 - mmengine - WARNING - The "hook" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:56 - mmengine - WARNING - The "hook" registry in mmdet did not set import location. Fallback to call `mmdet.utils.register_all_modules` instead.
01/09 23:26:56 - mmengine - INFO - Hooks will be executed in the following order:
before_run:
(VERY_HIGH   ) RuntimeInfoHook                    
(49          ) EMAHook                            
(BELOW_NORMAL) LoggerHook                         
 -------------------- 
after_load_checkpoint:
(49          ) EMAHook                            
 -------------------- 
before_train:
(9           ) YOLOv5ParamSchedulerHook           
(VERY_HIGH   ) RuntimeInfoHook                    
(49          ) EMAHook                            
(NORMAL      ) IterTimerHook                      
(VERY_LOW    ) CheckpointHook                     
 -------------------- 
before_train_epoch:
(VERY_HIGH   ) RuntimeInfoHook                    
(NORMAL      ) IterTimerHook                      
(NORMAL      ) DistSamplerSeedHook                
 -------------------- 
before_train_iter:
(9           ) YOLOv5ParamSchedulerHook           
(VERY_HIGH   ) RuntimeInfoHook                    
(NORMAL      ) IterTimerHook                      
 -------------------- 
after_train_iter:
(9           ) YOLOv5ParamSchedulerHook           
(VERY_HIGH   ) RuntimeInfoHook                    
(49          ) EMAHook                            
(NORMAL      ) IterTimerHook                      
(BELOW_NORMAL) LoggerHook                         
(VERY_LOW    ) CheckpointHook                     
 -------------------- 
after_train_epoch:
(9           ) YOLOv5ParamSchedulerHook           
(NORMAL      ) IterTimerHook                      
(VERY_LOW    ) CheckpointHook                     
 -------------------- 
before_val_epoch:
(49          ) EMAHook                            
(NORMAL      ) IterTimerHook                      
 -------------------- 
before_val_iter:
(NORMAL      ) IterTimerHook                      
 -------------------- 
after_val_iter:
(NORMAL      ) IterTimerHook                      
(NORMAL      ) DetVisualizationHook               
(BELOW_NORMAL) LoggerHook                         
 -------------------- 
after_val_epoch:
(VERY_HIGH   ) RuntimeInfoHook                    
(49          ) EMAHook                            
(NORMAL      ) IterTimerHook                      
(BELOW_NORMAL) LoggerHook                         
(VERY_LOW    ) CheckpointHook                     
 -------------------- 
before_save_checkpoint:
(49          ) EMAHook                            
 -------------------- 
before_test_epoch:
(49          ) EMAHook                            
(NORMAL      ) IterTimerHook                      
 -------------------- 
before_test_iter:
(NORMAL      ) IterTimerHook                      
 -------------------- 
after_test_iter:
(NORMAL      ) IterTimerHook                      
(NORMAL      ) DetVisualizationHook               
(BELOW_NORMAL) LoggerHook                         
 -------------------- 
after_test_epoch:
(VERY_HIGH   ) RuntimeInfoHook                    
(49          ) EMAHook                            
(NORMAL      ) IterTimerHook                      
(BELOW_NORMAL) LoggerHook                         
 -------------------- 
after_run:
(BELOW_NORMAL) LoggerHook                         
 -------------------- 
01/09 23:26:59 - mmengine - WARNING - The "loop" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - WARNING - The "dataset" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - WARNING - The "transform" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - WARNING - The "transform" registry in mmdet did not set import location. Fallback to call `mmdet.utils.register_all_modules` instead.
loading annotations into memory...
Done (t=0.04s)
creating index...
index created!
01/09 23:26:59 - mmengine - WARNING - The "data sampler" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - WARNING - The "optimizer constructor" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - INFO - Optimizer groups: 95 .bias, 95 conv.weight, 98 other
01/09 23:26:59 - mmengine - WARNING - The "optimizer" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - WARNING - The "optim_wrapper" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
loading annotations into memory...
Done (t=0.01s)
creating index...
index created!
01/09 23:26:59 - mmengine - WARNING - The "metric" registry in mmyolo did not set import location. Fallback to call `mmyolo.utils.register_all_modules` instead.
01/09 23:26:59 - mmengine - WARNING - The "metric" registry in mmdet did not set import location. Fallback to call `mmdet.utils.register_all_modules` instead.
loading annotations into memory...
Done (t=0.01s)
creating index...
index created!
Loads checkpoint by local backend from path: ./work_dirs/yolov7_l_syncbn_fast_8x16b-300e_coco_20221123_023601-8113c0eb.pth
The model and loaded state dict do not match exactly

size mismatch for bbox_head.head_module.convs_pred.0.1.weight: copying a param with shape torch.Size([255, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([33, 256, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.0.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([33]).
size mismatch for bbox_head.head_module.convs_pred.0.2.implicit: copying a param with shape torch.Size([1, 255, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 33, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.1.1.weight: copying a param with shape torch.Size([255, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([33, 512, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.1.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([33]).
size mismatch for bbox_head.head_module.convs_pred.1.2.implicit: copying a param with shape torch.Size([1, 255, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 33, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.2.1.weight: copying a param with shape torch.Size([255, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([33, 1024, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.2.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([33]).
size mismatch for bbox_head.head_module.convs_pred.2.2.implicit: copying a param with shape torch.Size([1, 255, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 33, 1, 1]).
The model and loaded state dict do not match exactly

size mismatch for bbox_head.head_module.convs_pred.0.1.weight: copying a param with shape torch.Size([255, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([33, 256, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.0.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([33]).
size mismatch for bbox_head.head_module.convs_pred.0.2.implicit: copying a param with shape torch.Size([1, 255, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 33, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.1.1.weight: copying a param with shape torch.Size([255, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([33, 512, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.1.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([33]).
size mismatch for bbox_head.head_module.convs_pred.1.2.implicit: copying a param with shape torch.Size([1, 255, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 33, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.2.1.weight: copying a param with shape torch.Size([255, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([33, 1024, 1, 1]).
size mismatch for bbox_head.head_module.convs_pred.2.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([33]).
size mismatch for bbox_head.head_module.convs_pred.2.2.implicit: copying a param with shape torch.Size([1, 255, 1, 1]) from checkpoint, the shape in current model is torch.Size([1, 33, 1, 1]).
01/09 23:27:03 - mmengine - INFO - Load checkpoint from ./work_dirs/yolov7_l_syncbn_fast_8x16b-300e_coco_20221123_023601-8113c0eb.pth
01/09 23:27:03 - mmengine - INFO - Checkpoints will be saved to /home/ubuntu/mmyolo/work_dirs/yolov7_l_100e.
01/09 23:27:34 - mmengine - INFO - Epoch(train)  [1][ 50/189]  lr: 6.1250e-05  eta: 0:18:42  time: 0.6099  data_time: 0.0162  memory: 22819  loss: 0.1689  loss_cls: 0.0000  loss_obj: 0.1689  loss_bbox: 0.0000
01/09 23:27:58 - mmengine - INFO - Epoch(train)  [1][100/189]  lr: 1.2375e-04  eta: 0:16:25  time: 0.4917  data_time: 0.0008  memory: 18070  loss: 0.0961  loss_cls: 0.0000  loss_obj: 0.0961  loss_bbox: 0.0000
01/09 23:28:23 - mmengine - INFO - Epoch(train)  [1][150/189]  lr: 1.8625e-04  eta: 0:15:24  time: 0.4922  data_time: 0.0008  memory: 18070  loss: 0.0661  loss_cls: 0.0000  loss_obj: 0.0661  loss_bbox: 0.0000
01/09 23:28:47 - mmengine - INFO - Exp name: yolov7_l_syncbn_fast_1xb32-100e_ionogram_20230109_232636
01/09 23:29:12 - mmengine - INFO - Epoch(train)  [2][ 50/189]  lr: 2.9095e-04  eta: 0:14:50  time: 0.5028  data_time: 0.0106  memory: 20765  loss: 0.0405  loss_cls: 0.0000  loss_obj: 0.0405  loss_bbox: 0.0000
01/09 23:29:37 - mmengine - INFO - Epoch(train)  [2][100/189]  lr: 3.5207e-04  eta: 0:14:10  time: 0.4932  data_time: 0.0009  memory: 18069  loss: 0.0324  loss_cls: 0.0000  loss_obj: 0.0324  loss_bbox: 0.0000
01/09 23:30:01 - mmengine - INFO - Epoch(train)  [2][150/189]  lr: 4.1319e-04  eta: 0:13:35  time: 0.4935  data_time: 0.0009  memory: 18069  loss: 0.0265  loss_cls: 0.0000  loss_obj: 0.0265  loss_bbox: 0.0000
01/09 23:30:20 - mmengine - INFO - Exp name: yolov7_l_syncbn_fast_1xb32-100e_ionogram_20230109_232636
01/09 23:30:23 - mmengine - INFO - Epoch(val)  [2][ 50/646]    eta: 0:00:29  time: 0.0491  data_time: 0.0018  memory: 18069  
01/09 23:30:24 - mmengine - INFO - Epoch(val)  [2][100/646]    eta: 0:00:21  time: 0.0302  data_time: 0.0003  memory: 721  
01/09 23:30:26 - mmengine - INFO - Epoch(val)  [2][150/646]    eta: 0:00:17  time: 0.0294  data_time: 0.0003  memory: 721  
01/09 23:30:27 - mmengine - INFO - Epoch(val)  [2][200/646]    eta: 0:00:15  time: 0.0295  data_time: 0.0021  memory: 721  
01/09 23:30:29 - mmengine - INFO - Epoch(val)  [2][250/646]    eta: 0:00:13  time: 0.0300  data_time: 0.0032  memory: 721  
01/09 23:30:30 - mmengine - INFO - Epoch(val)  [2][300/646]    eta: 0:00:11  time: 0.0295  data_time: 0.0030  memory: 721  
01/09 23:30:32 - mmengine - INFO - Epoch(val)  [2][350/646]    eta: 0:00:09  time: 0.0298  data_time: 0.0032  memory: 721  
01/09 23:30:33 - mmengine - INFO - Epoch(val)  [2][400/646]    eta: 0:00:07  time: 0.0301  data_time: 0.0038  memory: 721  
01/09 23:30:35 - mmengine - INFO - Epoch(val)  [2][450/646]    eta: 0:00:06  time: 0.0308  data_time: 0.0046  memory: 721  
01/09 23:30:36 - mmengine - INFO - Epoch(val)  [2][500/646]    eta: 0:00:04  time: 0.0308  data_time: 0.0046  memory: 721  
01/09 23:30:38 - mmengine - INFO - Epoch(val)  [2][550/646]    eta: 0:00:03  time: 0.0301  data_time: 0.0038  memory: 721  
01/09 23:30:39 - mmengine - INFO - Epoch(val)  [2][600/646]    eta: 0:00:01  time: 0.0305  data_time: 0.0037  memory: 721  
Traceback (most recent call last):
  File "tools/train.py", line 116, in <module>
    main()
  File "tools/train.py", line 112, in main
    runner.train()
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1678, in train
    model = self.train_loop.run()  # type: ignore
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/loops.py", line 96, in run
    self.runner.val_loop.run()
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/runner/loops.py", line 350, in run
    metrics = self.evaluator.evaluate(len(self.dataloader.dataset))
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/evaluator/evaluator.py", line 79, in evaluate
    _results = metric.evaluate(size)
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmengine/evaluator/metric.py", line 110, in evaluate
    _metrics = self.compute_metrics(results)  # type: ignore
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 395, in compute_metrics
    result_files = self.results2json(preds, outfile_prefix)
  File "/home/ubuntu/.conda/envs/openmmlab/lib/python3.8/site-packages/mmdet/evaluation/metrics/coco_metric.py", line 216, in results2json
    data['category_id'] = self.cat_ids[label]
IndexError: list index out of range

Would you mind giving me a hand with this?

GuocunWang commented 1 year ago

The file is fixed as follow. You can try to change it.

metainfo = { 'CLASSES': ('balloon', ), 'PALETTE': [

'classes': ('balloon', ),

# 'palette': [
    (220, 20, 60),
]

}

VoyagerXvoyagerx commented 1 year ago

Thanks for your reply, I'm sorry that I forgot to add the metainfo to val_dataloader['dataset'] in the config. Besides, the latest version MMYOLO 0.3.0 uses lowercase [#428]. So please use

metainfo = {
    'classes': ('balloon', ),
    'palette': [(220, 20, 60),]
}

instead.

lb-hit commented 1 year ago

@hhaAndroid hi, My config file has the metainfo. When I changed the backbone following the official docs, I met the same question. How to fix it?

lb-hit commented 1 year ago

@WangGuocun ok let's confirm. @hhaAndroid @WangGuocun hi, have you confirmed that?

todesti2 commented 11 months ago

你好,我遇到了同样的问题,只不过我用的是在YOLOV7,找了很多种方法都没有解决,我不知道该怎么办了,恳请得到你们的帮助,万分感谢!

todesti2 commented 11 months ago

Hello, I'm experiencing the same problem, except that I'm using in YOLOV7, and I've searched for many ways to solve it, I don't know what to do, I'm begging to get your help, thank you very much!

todesti2 commented 11 months ago

刚说完我就解决了,大家一定要注意先生成针对自己数据集的anchors!!!我的问题就在这里!

1dmesh commented 4 months ago

Thanks for your reply, I'm sorry that I forgot to add the metainfo to val_dataloader['dataset'] in the config. Besides, the latest version MMYOLO 0.3.0 uses lowercase [#428]. So please use

metainfo = {
    'classes': ('balloon', ),
    'palette': [(220, 20, 60),]
}

instead.

Sorry to necro an older post, but this helped me fix a problem I was encountering too. Thank you so much for documenting it here! 😄 ❤️