mmalb-debug:assert ‘mix_results‘ in results
创始人
2024-11-14 19:33:39
0

问题描述

应用mmsegmentation中的RandomMosaic数据增强算法:
dict(type=‘RandomMosaic’, prob=0.2, img_scale=tuple(size * factor for size, factor in zip(img_scale, (2, 2))))

Bug

mmsegmentation/mmseg/datasets/pipelines/transforms.py", line 1166, in _mosaic_transform_img
assert ‘mix_results’ in results
AssertionError

解决方案

使用 MultiImageMixDataset 作为包装(wrapper)去混合多个数据集的图片。 MultiImageMixDataset可以被类似 mosaic 和 mixup 的多图混合数据増广使用。

MultiImageMixDataset 与 Mosaic 数据増广一起使用的例子:

train_pipeline = [     dict(type='RandomMosaic', prob=1),     dict(type='Resize', img_scale=(1024, 512), keep_ratio=True),     dict(type='RandomFlip', prob=0.5),     dict(type='PackSegInputs') ]  train_dataset = dict(     type='MultiImageMixDataset',     dataset=dict(         type=dataset_type,         reduce_zero_label=False,         img_dir=data_root + "images/train",         ann_dir=data_root + "annotations/train",         pipeline=[             dict(type='LoadImageFromFile'),             dict(type='LoadAnnotations'),         ]     ),     pipeline=train_pipeline ) 

reference1
reference2-mmseg文档

相关内容

热门资讯

透视存在!aapoker能控制... 透视存在!aapoker能控制牌吗,从来是真的有挂(透视)wpk教程(有挂插件)1、每一步都需要思考...
透视攻略!拱趴大菠萝开挂方法,... 透视攻略!拱趴大菠萝开挂方法,大菠萝免费辅助,实用技巧(有挂攻略)暗藏猫腻,小编详细说明拱趴大菠萝开...
透视科技!aapoker透视插... 透视科技!aapoker透视插件,aapoker怎么设置提高好牌几率,我来教教你(有挂揭秘);1、用...
透视好友!哈糖大菠萝有没有挂,... 透视好友!哈糖大菠萝有没有挂,从前真的有挂(透视)可靠教程(有挂脚本)亲,关键说明,哈糖大菠萝有没有...
透视科技!pokerworld... 透视科技!pokerworld修改器,悦扑克脚本,大神讲解(有挂辅助);1、许多玩家不知道poker...
透视有挂!aapoker透视插... 透视有挂!aapoker透视插件,aapoker辅助怎么用,实用技巧(有挂攻略);1)aapoker...
透视规律!hhpoker德州作... 透视规律!hhpoker德州作弊,原生真的是有挂(透视)介绍教程(有挂黑科技)进入游戏-大厅左侧-新...
透视脚本!aapoker透视怎... 透视脚本!aapoker透视怎么用,aapoker发牌逻辑,曝光教程(有挂解说)1、上手简单,内置详...
透视辅助!拱趴大菠萝挂,pok... 透视辅助!拱趴大菠萝挂,pokemmo手机辅助软件,解密教程(有挂插件)1、pokemmo手机辅助软...
透视教学!wepoker透视脚... 透视教学!wepoker透视脚本,原先是有挂(透视)攻略方法(有挂细节)一、wepoker透视脚本A...