nnunet编辑自己的数据集

nnunet编辑自己的数据集2d

以我使用的2d数据为例,需要如下格式

需要将训练样本和标签分别放入imagesTr和labelTr中,imagesTs中放验证数据,nnunet使用交叉验证不需要测试数据。

然后根据dataset.json来分编辑数据集,2d这些都是必须的,numTraining就是图像总数,这里会有一个断言。另外需要在每张图像命名后面标注多模态_0000

{ 
 "channel_names": { 
   "0": "R",
   "1": "G",
   "2": "B"
 }, 
 "labels": { 
    "background": 0,
    "T1": 1,
    "T2": 2,
    "T3": 3,
    "T4": 4,
    "T5": 5,
    "T6": 6,
    "T7": 7,
    "T8": 8,
    "T9": 9,
    "T10": 10,
    "T11": 11,
    "T12": 12,
    "L1": 13,
    "L2": 14,
    "L3": 15,
    "L4": 16,
    "L5": 17
}, 
 "numTraining": 656, 
 "file_ending": ".png",
 "name": "Dataset606_spineXray",
 "description": "This dataset was from the MICCAI 2017 Robotic Instrument Segmentation Challenge https://endovissub2017-roboticinstrumentsegmentation.grand-challenge.org/Home/"
 }

图像的名字无所谓,最后加上一个_0000,表示单一模态,图像和标签名字对应即可,标签不需要_0000

3d的dataset.json也大差不差

{
    "channel_names": {
        "0": "CT"
    },
    "labels": {
        "background": 0,
        "liver": 1,
        "right kidney": 2,
        "spleen": 3,
        "pancreas": 4,
        "aorta": 5,
        "inferior vena cava": 6,
        "right adrenal gland": 7,
        "left adrenal gland": 8,
        "gallbladder": 9,
        "esophagus": 10,
        "stomach": 11,
        "duodenum": 12,
        "left kidney": 13
    },
    "numTraining": 50,
    "file_ending": ".nii.gz",
    "name": "Dataset701_AbdomenCT",
    "description": "This dataset was from MICCAI FLARE 2022 Challenge. The training set contained 50 CT scans that were from the MSD Pancreas dataset and the annotations were from AbdomenCT-1K. Another 50 validation cases were from TCIA and the annotations were provided by the challenge organizers."
}

@end

  • 9
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值