CocoStuff—基於Deeplab訓練數據的標定工具【1、翻譯】(未完)

1、CocoStuff簡介

CocoStuff是一款爲deeplab設計的,運行在Matlab中的語義標定工具,其標定結果和結合Deeplab訓練出的結果均爲mat文件格式,該項目源碼已在github上進行開源。python

2、說明

本文爲系列博客第一篇,主要對項目readme進行簡單的翻譯,主要是爲了本身在學習踩坑過程當中方便查閱說明,若是能幫到你們即是極好的。 *注:未完,部分只是先扔上來,未來會繼續完善。git

筆者在探索以前並未在網上搜索到關於CocoStuff的相關中文博客,因此這多是第一篇,有那裏不到位的請多多指教,互相學習。github

3、翻譯

COCO-Stuff 10K數據集 v1.1(目前已過期)shell

做者:Holger Caesar, Jasper Uijlings, Vittorio Ferrari json

概述

歡迎來到COCO-Stuff數據集的官方主頁。COCO-Stuff添加了像素級標定(標註)的流行的COCO數據集,這些標註能夠用於一些像語義分割、對象檢測和圖像字幕的場景理解任務。 ##目錄 亮點 更新 成果和將來計劃 數據集 語義分割模型 標定工具 Misc(未翻)app

亮點

10,000張來自COCO的複雜圖像ide

稠密的像素級標註工具

91個things類和91個stuff類學習

實例級標註來自COCO的的數據測試

物與物的複雜空間環境

每幅coco的圖片有5句說明

更新

2017年7月11日:添加了Resnet和VGG的Deeplab模型

2017年4月6日:數據集版本1.1:修改標籤指數

2017年3月31日:發佈JSON格式的標註

2017年3月9日:添加標籤層次腳本

2017年3月8日:更正arXiv 文件中的table 2

2017年1月10日:在標註工具中添加了提取SLICO超級像素的腳本

2016年12月12日:發佈數據集版本1.1和arXiv文件

成果

目前發佈的COCO-Stuff-10K版本包括訓練和測試的標註,以及咱們邀請用戶向咱們報告他們的結果用來補充這張表。在不久的未來,咱們會將COCO-Stuff擴展到COCO的全部圖像中,而且咱們會組織一個官方比賽,在比賽中的測試標註只會被組織者所知道。 點擊此處查看最新表格

Method Source Class-average accuracy Global accuracy Mean IOU FW IOU
FCN-16s [3] [1] 34.0% 52.0% 22.7% -
Deeplab VGG-16 (no CRF) [4] [1] 38.1% 57.8% 26.9% -
FCN-8s [3] [6] 38.5% 60.4% 27.2% -
DAG-RNN + CRF [6] [6] 42.8% 63.0% 31.2% -
OHE + DC + FCN+ [5] [5] 45.8% 66.6% 34.3% 51.2%
Deeplab ResNet (no CRF) [4] - 45.5% 65.1% 34.4% 50.4%
W2V + DC + FCN+ [5] [5] 45.1% 66.1% 34.7% 51.0%

數據集

Filename Description Size
cocostuff-10k-v1.1.zip COCO-Stuff dataset v. 1.1, images and annotations 2.0 GB
cocostuff-10k-v1.1.json COCO-Stuff dataset v. 1.1, annotations in JSON format (optional) 62.3 MB
cocostuff-labels.txt A list of the 1+91+91 classes in COCO-Stuff 2.3 KB
cocostuff-readme.txt This document 6.5 KB
Older files
cocostuff-10k-v1.0.zip COCO-Stuff dataset version 1.0, including images and annotations 2.6 GB

用法

爲了使用COCO-Stuff數據集,請按照下面的步驟:

  1. 從git上下載項目:git clone https://github.com/nightrome/cocostuff10k.git

  2. 在shell中打開數據集:cd cocostuff10k

  3. 若是你有Matlab,執行下面的命令: 把代碼文件添加到Matlab路徑中:startup(); 在Matlab中運行腳本demo:demo_cocoStuff(); 這個腳本顯示圖像、圖像內容、內容加標註以及圖像標題。

  4. 或者,運行下面的Linux命令或手動下載解壓數據集: wget --directory-prefix=downloads http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/cocostuff-10k-v1.1.zip unzip downloads/cocostuff-10k-v1.1.zip -d dataset/

MAT格式

COCO-Stuff的標註是儲存在每張圖對應的.mat文件中,這些文件的格式和Tighe等人使用的格式相同。每一個文件包括如下字段:

S: 像素化的標籤地圖的尺寸

names:COCO-Stuff中的東西的名字和類別,更多詳情請看Label Names & Indices

captions:圖片標題,由5個不一樣的人平均標註

regionMapStuff:與S大小相同的映射,恰中包含大約值的索引,1000個區域用來註釋圖像。

regionLabelStuff:每一個超級像素級的物品標籤的列表,這些regionMapStuff的索引都對應regionLabelStuff的條目。

JSON格式

另外,咱們還提供了JSON格式的標註,這些標註是從COCO中複製出來的。咱們使用RLE編碼格式,將圖像中呈現的每種東西的類別都標註了單個註釋。要獲取標註: wget--directory-prefix=dataset/annotations-json http://calvin.inf.ed.ac.uk/wpcontent/uploads/data/cocostuffdataset/cocostuff-10k-v1.1.json

或者用這個腳本從.mat文件中提取它們

##標籤名稱&指數 爲了與COCO兼容,版本1.1有91個東西類(1-91),91個東西類(92-182)和一個類「未標記」(0)。請注意,Coco2015中的11個Thing類沒有任何分段註釋。課桌、門和鏡子既能夠是東西,也能夠是東西,所以既能夠是可可,也能夠是可可。爲了不混淆,咱們在coco-thing中的那些類中添加了後綴「-東西」。類的完整列表能夠找到這裏.。舊版的COCO-東西1.0有80個東西類(2-81個),91個東西類(82-172個)和一個類「未標記」(1)

Label等級體系

標籤的層次結構存儲在CocoStuffClass‘中。爲了使其可視化,在matlab中運行CocoStuffClasses.showClassHierarchyStuffThings()`(也可用於簡單的東西和東西類)。輸出應該相似於下面的圖

語義分割模型

爲了鼓勵對stuff and things的進一步研究,咱們提供了通過訓練的語義分割模型 ###DeepLab VGG-16 Use the following steps to download and setup the DeepLab [4] semantic segmentation model trained on COCO-Stuff. It requires deeplab-public-ver2, which is built on Caffe:

  1. Install Cuda. I recommend version 7.0. For version 8.0 you will need to apply the fix described here in step 3.
  2. Download deeplab-public-ver2: git submodule update --init models/deeplab/deeplab-public-ver2
  3. Compile and configure deeplab-public-ver2 following the author's instructions. Depending on your system setup you might have to install additional packages, but a minimum setup could look like this:
  • cd models/deeplab/deeplab-public-ver2
  • cp Makefile.config.example Makefile.config
  • Optionally add CuDNN support or modify library paths in the Makefile.
  • make all -j8
  • cd ../..
  1. Configure the COCO-Stuff dataset:
  • Create folders: mkdir models/deeplab/deeplab-public-ver2/cocostuff && mkdir models/deeplab/deeplab-public-ver2/cocostuff/data
  • Create a symbolic link to the images: cd models/deeplab/cocostuff/data && ln -s ../../../../dataset/images images && cd ../../../..
  • Convert the annotations by running the Matlab script: startup(); convertAnnotationsDeeplab();
  1. Download the base VGG-16 model:
  • wget --directory-prefix=models/deeplab/cocostuff/model/deeplabv2_vgg16 http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/deeplabv2_vgg16_init.caffemodel
  1. Run cd models/deeplab && ./run_cocostuff_vgg16.sh to train and test the network on COCO-Stuff.

DeepLab ResNet 101

The default Deeplab model performs center crops of size 513*513 pixels of an image, if any side is larger than that. Since we want to segment the whole image at test time, we choose to resize the images to 513x513, perform the semantic segmentation and then rescale it elsewhere. Note that without the final step, the performance might differ slightly.

  1. Follow steps 1-4 of the DeepLab VGG-16 section above.
  2. Download the base ResNet model:
  • wget --directory-prefix=models/deeplab/cocostuff/model/deeplabv2_resnet101 http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/deeplabv2_resnet101_init.caffemodel
  1. Rescale the images and annotations:
  • cd models/deeplab
  • python rescaleImages.py
  • python rescaleAnnotations.py
  1. Run ./run_cocostuff_resnet101.sh to train and test the network on COCO-Stuff.

標註工具

在[1]中,咱們提出了一個簡單而有效的文本註釋工具,用於註釋可可數據集。它使用畫筆工具對SLICO超級像素進行註釋(使用帶有內容標籤的codeofAchantet al.)]進行預計算)。這些註釋被現有的來自COCO的像素級事物註釋所覆蓋。 咱們提供了註釋工具的基本版本:

  • 準備須要的數據:
    • 指定一個username annotator/data/input/user.txt.
    • 建立一個圖片list文件annotator/data/input/imageLists/<user>.list.
    • 在Matlab中提取全部圖片的things標籤: extractThings().
    • 在Matlab中提取全部圖片的超像素: extractSLICOSuperpixels().
    • 在這個文件的最上面的參數設置是否啓用超像素、things標籤、多邊形繪圖CocoStuffAnnotator.m.
  • 在Matlab中運行標註工具: CocoStuffAnnotator();
    • 工具把.mat的標籤文件放在這裏annotator/data/output/annotations.
    • 經過在Matlab中運行這個腳本將標註預覽爲.png格式 annotator/code/exportImages.m.這些預覽圖會存在這裏 annotator/data/output/preview.
相關文章
相關標籤/搜索