Muyun99's wiki Muyun99's wiki
首页
学术搬砖
学习笔记
生活杂谈
wiki搬运
资源收藏
关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

Muyun99

努力成为一个善良的人
首页
学术搬砖
学习笔记
生活杂谈
wiki搬运
资源收藏
关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • 代码实践-目标检测

  • 代码实践-图像分割

  • 代码实践-自监督学习

  • 竞赛笔记-视觉竞赛

  • 框架解析-mmlab系列

    • MMClassifiction 框架学习导言
    • mmcls 是如何能够通过config 就搭建好一个模型的?
    • 为自己的 inicls 框架加上 fp16 训练
    • 为自己的 inicls 框架集成 Horovod
    • 为自己的 inicls 框架集成 DALI
    • mmsegmentation框架解析(上)
    • mmsegmentation框架解析(中)
    • mmsegmentation框架解析(下)
    • mmcv 使用
    • mmcv使用(中)--Config
    • 什么是 Register
    • 什么是 ABCMeta
    • mmseg数据集
      • mmsegmentation 数据集
    • mmseg 推理单张图像并保存
    • 计算loss和计算metric
  • 讲座记录-有意思的文章集合

  • 体会感悟-产品沉思录观后有感

  • 体会感悟-摄影

  • 系列笔记-

  • 系列笔记-乐理和五线谱

  • 系列笔记-爬虫实践

  • 系列笔记-Django学习笔记

  • 系列笔记-Git 使用笔记

  • 系列笔记-网站搭建

  • 系列笔记-图卷积网络

  • 课程笔记-MIT-NULL

  • 系列笔记-OpenCV-Python

  • 系列笔记-使用 Beancount 记账

  • 系列笔记-Python设计模式

  • 系列笔记-MLOps

  • 系列笔记-Apollo自动驾驶

  • 系列笔记-PaddlePaddle

  • 系列笔记-视频操作

  • Vue+Django前后端分离开发

  • 深度学习及机器学习理论知识学习笔记

  • PyTorch Tricks

  • 学习笔记
  • 框架解析-mmlab系列
Muyun99
2021-09-15

mmseg数据集

# mmsegmentation 数据集

# CustomDataset 类

def __getitem__(self, idx):
    """Get training/test data after pipeline.
    
    Args:
    idx (int): Index of data.
    
    Returns:
    dict: Training/test data (with annotation if `test_mode` is set
    False).
    """
    
    if self.test_mode:
        return self.prepare_test_img(idx)
    else:
        return self.prepare_train_img(idx)
    
def prepare_train_img(self, idx):
        """Get training data and annotations after pipeline.
    Args:
        idx (int): Index of data.

    Returns:
        dict: Training data and annotation after pipeline with new keys
            introduced by pipeline.
    """

    img_info = self.img_infos[idx]
    ann_info = self.get_ann_info(idx)
    results = dict(img_info=img_info, ann_info=ann_info)
    self.pre_pipeline(results)
    return self.pipeline(results)

def prepare_test_img(self, idx):
    """Get testing data after pipeline.

    Args:
        idx (int): Index of data.

    Returns:
        dict: Testing data after pipeline with new keys introduced by
            pipeline.
    """

    img_info = self.img_infos[idx]
    results = dict(img_info=img_info)
    self.pre_pipeline(results)
    return self.pipeline(results)
    
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
上次更新: 2021/09/26, 00:09:41
什么是 ABCMeta
mmseg 推理单张图像并保存

← 什么是 ABCMeta mmseg 推理单张图像并保存→

最近更新
01
Structured Knowledge Distillation for Semantic Segmentation
06-03
02
README 美化
05-20
03
常见 Tricks 代码片段
05-12
更多文章>
Theme by Vdoing | Copyright © 2021-2023 Muyun99 | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×