目標檢測之-Caffe-SSD系列(一)資料的處理-PASCAL VOC
阿新 • • 發佈:2019-02-18
目標檢測任務之資料的處理
常見的目標檢測資料集之PASCAL VOC
1 . PASCAL VOC資料集介紹
資料集名稱 | 訓練集(本地訓) | 測試集(本地測) |
---|---|---|
PASCAL VOC | 2007 trainval + 2012 trainval(“07+12”) | 2007 test |
訓練驗證集和測試集比例為1:1
……… | VOC2007(trainval) | VOC2007(test) | VOC2012(trainval) | VOC2012(test) |
---|---|---|---|---|
圖片數 | 9963 | 約9963 | 11540 | 約11540 |
注:單獨的VOC2012應該只包含08至12年的資料。
資料集英文標籤(20類) | 資料集中文標籤(20類) |
---|---|
人 | person |
鳥,貓,牛,狗,馬,羊 | bird, cat, cow, dog, horse, sheep |
飛機,自行車,船,巴士,汽車,摩托車,火車 | aeroplane, bicycle, boat, bus, car, motorbike, train |
瓶,椅子,餐桌,盆栽,沙發,電視/顯示器 | bottle, chair, dining table, potted plant, sofa, tv/monitor |
2 . 檢測任務Bounding Box標籤
2.1 Bouding Box標註原則:
除非Bounding box必須擴大來包含物體(<5%),如說汽車上的天線,那麼Bounding box必須只包含物體的可見部分,不包含預估部分。
2.2 標註資訊
標註資訊是以xml檔案儲存的,我們需要讀取xml檔案,然後將裡面的資訊讀取出來。
import xml.etree.ElementTree as ET
tree=ET.parse(in_file) # 將xml檔案解析成一個樹結構的資料,然後依次解析出xml檔案中的內容,儲存為xxx.txt檔案,裡面記錄了class, x_min, y_min, x_max, y_max