Cityscapes数据集gtFine部分介绍
Cityscape是一个大型语义分割数据集,包含多种类型数据和处理代码github处理代码地址:https://github.com/mcordts/cityscapesScripts官方网站:https://www.cityscapes-dataset.com/(推荐使用迅雷下载)其他博主数据集下载地址:https://blog.csdn.net/zym19941119...
Cityscape是一个大型语义分割数据集,包含多种类型数据子集和处理代码
Cityscape包含多种数据集,本文只关注gtFine/精细标注的语义分割部分
gtFine部分的标注,对应leftImg8bit的原始图片
数据及代码下载链接:
数据集官方网站:https://www.cityscapes-dataset.com/ (推荐使用迅雷下载)
github处理代码地址:https://github.com/mcordts/cityscapesScripts
国内下载连接:
aistudio下载链接(包括gtFine及leftImg8bit):https://aistudio.baidu.com/aistudio/datasetdetail/48855
gtFine数据(无对应的Img) 下载链接:https://pan.baidu.com/s/1hWRDTnDD1uE29W2691x1xQ 提取码:9tcd
其他博主数据集下载地址(包括gtFine及leftImg8bit):https://blog.csdn.net/zym19941119/article/details/81198315
gtFine数据集基本信息:
影像:
shape=(1024,2048,4)
num=2975+500+1525=5000幅
标注:
- 35个小类(name、id列,用于评测)
- 8大类(category、catId列,用于创建 ground truth)
- 20个train类(trainId列,官方提供,可根据需要调整)
可以在处理代码 helpers / labels.py中查看对应标签(可见本文末尾),labels.py中也包含了各种分类说明
gtFine文件结构:
数据分布:
train(aachen 174*4、bochum 96*4、bremen 316*4、cologne 154*4、darmstadt 85*4、dusseldorf 221*4、erfurt 109*4、hamburg 248*4、hanover 196*4、jena 119*4、krefeld 99*4、monchengladbach 94*4、strasbourg 365*4、stuttgart 196*4、tubingen 144*4、ulm 95*4、weimar 142*4、zurich 122*4),共2975*4个文件
val(frankfurt 267*4、lindau 59*4、munster 174*4),共500*4个文件
test(berlin 544*4、bielefeld 181*4、bonn 46*4、leverkusen 58*4、mainz 298*4、munich 398*4),共1525*4个文件
train、val单个样本结构:
- color: 彩色类别图(用于可视化观察)
- instanceIds: 实例分割ID
- labelIds: 标签ID(35小类)
- polygons: 边界多边形(35小类及对应边界像素位置)
如果需要使用trainId分类编码,可以直接调用preparation / createTrainIdLabelImgs.py,修改其中的路径参数(data_path/cityscapesPath)即可生成新gt(需要安装pillow库,部分版本安装后运行此代码报错pillow未安装,可以将helpers/chHelpers.py、preparation/json2labelImg.py 中的 from PIL import PILLOW_VERSION 改为import PIL)
如果需要其他类别也可以根据代码自行修改
test结构尚未研究
处理代码结构:
helpers
: helper files that are included by other scripts labels.py包含标签类别详解viewer
: view the images and the annotationspreparation
: convert the ground truth annotations into a format suitable for your approach createTrainIdLabelImgs.py可以创建trainId类标签图像evaluation
: validate your approachannotation
: the annotation tool used for labeling the datasetdownload
: downloader for Cityscapes packages
labels = [
# name id trainId category catId hasInstances ignoreInEval color
Label( 'unlabeled' , 0 , 255 , 'void' , 0 , False , True , ( 0, 0, 0) ),
Label( 'ego vehicle' , 1 , 255 , 'void' , 0 , False , True , ( 0, 0, 0) ),
Label( 'rectification border' , 2 , 255 , 'void' , 0 , False , True , ( 0, 0, 0) ),
Label( 'out of roi' , 3 , 255 , 'void' , 0 , False , True , ( 0, 0, 0) ),
Label( 'static' , 4 , 255 , 'void' , 0 , False , True , ( 0, 0, 0) ),
Label( 'dynamic' , 5 , 255 , 'void' , 0 , False , True , (111, 74, 0) ),
Label( 'ground' , 6 , 255 , 'void' , 0 , False , True , ( 81, 0, 81) ),
Label( 'road' , 7 , 0 , 'flat' , 1 , False , False , (128, 64,128) ),
Label( 'sidewalk' , 8 , 1 , 'flat' , 1 , False , False , (244, 35,232) ),
Label( 'parking' , 9 , 255 , 'flat' , 1 , False , True , (250,170,160) ),
Label( 'rail track' , 10 , 255 , 'flat' , 1 , False , True , (230,150,140) ),
Label( 'building' , 11 , 2 , 'construction' , 2 , False , False , ( 70, 70, 70) ),
Label( 'wall' , 12 , 3 , 'construction' , 2 , False , False , (102,102,156) ),
Label( 'fence' , 13 , 4 , 'construction' , 2 , False , False , (190,153,153) ),
Label( 'guard rail' , 14 , 255 , 'construction' , 2 , False , True , (180,165,180) ),
Label( 'bridge' , 15 , 255 , 'construction' , 2 , False , True , (150,100,100) ),
Label( 'tunnel' , 16 , 255 , 'construction' , 2 , False , True , (150,120, 90) ),
Label( 'pole' , 17 , 5 , 'object' , 3 , False , False , (153,153,153) ),
Label( 'polegroup' , 18 , 255 , 'object' , 3 , False , True , (153,153,153) ),
Label( 'traffic light' , 19 , 6 , 'object' , 3 , False , False , (250,170, 30) ),
Label( 'traffic sign' , 20 , 7 , 'object' , 3 , False , False , (220,220, 0) ),
Label( 'vegetation' , 21 , 8 , 'nature' , 4 , False , False , (107,142, 35) ),
Label( 'terrain' , 22 , 9 , 'nature' , 4 , False , False , (152,251,152) ),
Label( 'sky' , 23 , 10 , 'sky' , 5 , False , False , ( 70,130,180) ),
Label( 'person' , 24 , 11 , 'human' , 6 , True , False , (220, 20, 60) ),
Label( 'rider' , 25 , 12 , 'human' , 6 , True , False , (255, 0, 0) ),
Label( 'car' , 26 , 13 , 'vehicle' , 7 , True , False , ( 0, 0,142) ),
Label( 'truck' , 27 , 14 , 'vehicle' , 7 , True , False , ( 0, 0, 70) ),
Label( 'bus' , 28 , 15 , 'vehicle' , 7 , True , False , ( 0, 60,100) ),
Label( 'caravan' , 29 , 255 , 'vehicle' , 7 , True , True , ( 0, 0, 90) ),
Label( 'trailer' , 30 , 255 , 'vehicle' , 7 , True , True , ( 0, 0,110) ),
Label( 'train' , 31 , 16 , 'vehicle' , 7 , True , False , ( 0, 80,100) ),
Label( 'motorcycle' , 32 , 17 , 'vehicle' , 7 , True , False , ( 0, 0,230) ),
Label( 'bicycle' , 33 , 18 , 'vehicle' , 7 , True , False , (119, 11, 32) ),
Label( 'license plate' , -1 , -1 , 'vehicle' , 7 , False , True , ( 0, 0,142) ),
]

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐
所有评论(0)