深度學(xué)習(xí)語義分割科研小班第一期
)語義分割的數(shù)據(jù)集
最重要的語義分割的數(shù)據(jù)集之一是Pascal VOC2012
(二)代碼實(shí)現(xiàn)加載數(shù)據(jù)集
關(guān)于數(shù)據(jù)集可以直接用瀏覽器下載,也可以通過代碼下載
%matplotlib inline
import os
import torch
import torchvision
from d2l import torch as d2l
# 下載數(shù)據(jù)集
if os.path.isdir('../data/VOCdevkit/'):
? ?voc_dir = "../data/VOCdevkit/VOC2012"
else:
? ?d2l.DATA_HUB['voc2012'] = (d2l.DATA_URL + 'VOCtrainval_11-May-2012.tar',
? ? ? ? ? ? ? ? ? ? ? ? ? '4e443f8a2eca6b1dac8a6c57641b67dd40621a49')
? ?voc_dir = d2l.download_extract('voc2012', 'VOCdevkit/VOC2012')
標(biāo)簽: