Pascal Voc資料集詳細介紹
阿新 • • 發佈:2018-12-19
1.首先了解VOC2012資料集的內容
資料集下載後解壓得到一個名為VOCdevkit的資料夾,該資料夾結構如下:
. └── VOCdevkit #根目錄 └── VOC2012 #不同年份的資料集,這裡只下載了2012的,還有2007等其它年份的 ├── Annotations #存放xml檔案,與JPEGImages中的圖片一一對應,解釋圖片的內容等等 ├── ImageSets #該目錄下存放的都是txt檔案,txt檔案中每一行包含一個圖片的名稱,末尾會加上±1表示正負樣本 │ ├── Action #存放的是人的動作,我們暫時不用 │ ├── Layout #存放的人體部位的資料。我們暫時不用 │ ├── Main │ └── Segmentation #存放的是可用於分割的資料,做檢測識別也是用不到的. ├── JPEGImages #存放源圖片 ├── SegmentationClass #存放的是圖片,分割後的效果,見下文的例子 └── SegmentationObject #存放的是圖片,分割後的效果,見下文的例子
1)JPEGImages資料夾
資料夾裡包含了訓練圖片和測試圖片,混放在一起,即資料集的原圖片
2)Annatations資料夾
資料夾存放的是xml格式的標籤檔案,每個xml檔案都對應於JPEGImages資料夾的一張圖片
3)ImageSets資料夾
Action存放的是人的動作,我們暫時不用 Layout存放的人體部位的資料。我們暫時不用 Main存放的是影象物體識別的資料,分為20類,Main裡面有test.txt , train.txt, val.txt ,trainval.txt.這四個檔案我們後面會生成 Segmentation存放的是可用於分割的資料,做檢測識別也是用不到的.
4)其他的資料夾不解釋了.
如果你下載了VOC2012資料集,那麼把它解壓,把各個資料夾裡面的東西刪除,保留資料夾名字。如果沒下載,那麼就仿照他的資料夾格式,自己建好空資料夾就行。
2.Annatations資料夾下xml介紹
<annotation> <folder>VOC2012</folder> #表明圖片來源 <filename>2007_000027.jpg</filename> #圖片名稱 <source> #圖片來源相關資訊 <database>The VOC2007 Database</database> <annotation>PASCAL VOC2007</annotation> <image>flickr</image> </source> <size> #影象尺寸 <width>486</width> <height>500</height> <depth>3</depth> </size> <segmented>0</segmented> #是否用於分割 <object> #包含的物體 <name>person</name> #物體類別 <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <bndbox> #物體的bbox <xmin>174</xmin> <ymin>101</ymin> <xmax>349</xmax> <ymax>351</ymax> </bndbox> <part> #物體的頭 <name>head</name> <bndbox> <xmin>169</xmin> <ymin>104</ymin> <xmax>209</xmax> <ymax>146</ymax> </bndbox> </part> <part> #物體的手 <name>hand</name> <bndbox> <xmin>278</xmin> <ymin>210</ymin> <xmax>297</xmax> <ymax>233</ymax> </bndbox> </part> <part> <name>foot</name> <bndbox> <xmin>273</xmin> <ymin>333</ymin> <xmax>297</xmax> <ymax>354</ymax> </bndbox> </part> <part> <name>foot</name> <bndbox> <xmin>319</xmin> <ymin>307</ymin> <xmax>340</xmax> <ymax>326</ymax> </bndbox> </part> </object> </annotation>