(一)使用YOLOv3训练BDD100K数据集之数据集下载

目录

  • 1 数据集下载
  • 2 数据集简单分析
  • 3 标签文件分析

1 数据集下载

之前博客写 了如何使用YOLOv3训练自动驾驶数据集KITTI,它的图片尺寸普遍为1242x375(大约),且总共有提供标签的7481张训练集,还有未提供标签的7518张测试集,用于官方评测算法。如果我们自己要评测算法,需要从7481张训练集中划分一部分作为验证集,这样训练的数据又减少了。而BDD00K数据集总共拥有110k张图片,分为100k和10k两个部分。其中100k的部分提供有70k的带标签训练集数据10k带标签的验证集数据,此外还有20k未提供标签的数据用于官方评测算法。10k的部分只提供了图片,目前没有提供标签。数据集下载可以去官方网址,但是需要用教育邮箱注册账号,而且经常会出现下载到一半被禁止下载的提示,比较麻烦。这里找到了一个很好的下载地址,不需要账号,且不会出现下载中断的问题!
地址如下:

  • BDD00K所有数据(包括可行驶区域,分割,原始图片,对象检测标签)的下载地址:

https://archive.org/details/bdd100k

  • BDD00K所有图片的下载地址:

https://archive.org/download/bdd100k/bdd100k_labels.zip

  • BDD00K所有图片标签的下载地址:

https://archive.org/download/bdd100k/bdd100k_images.zip

这里,我只用到了bdd100k_labels.zipbdd100k_images.zip,但是我把bdd100k_drivable_maps.zipbdd100k_seg.zip也下载了,以防后面使用,如下:
(一)使用YOLOv3训练BDD100K数据集之数据集下载_第1张图片

2 数据集简单分析

解压bdd100k_labels.zipbdd100k_images.zip,会出现两个bdd100k文件夹,这两个文件夹内分别存储了imageslabels两个子文件夹,其中images文件夹内存放了1280x720的图片,labels存放了json格式的标签文件,我们把两个子文件夹合并到一个bdd100k文件夹内,方便查看和处理。文件目录树如下:

├── bdd100k
│   ├── images
│   │   ├── 100k
│   │   │   ├── test    # 20k测试集图片
│   │   │   ├── train   # 70k训练集图片
│   │   │   └── val     # 10k验证集图片
│   │   └── 10k
│   │   ├── test    # 2k测试集图片
│   │   ├── train    # 7k测试集图片
│   │   └── val    # 1k验证集图片
│   ├── labels
│   │   └── 100k 
│   │   ├── train  # 70k训练集标签
│   │   ├── val     # 10k验证集标签,这里没有提供20k测试集标签
  • 常见的自动驾驶数据集比较
    (一)使用YOLOv3训练BDD100K数据集之数据集下载_第2张图片

  • 道路目标检测各类物体数量分布
    BDD100K的道路目标检测部分总共有10类:bus,traffic light,traffic sign,person,bike,truck,moter,car,train,rider。各类对象数目统计分布如下:
    (一)使用YOLOv3训练BDD100K数据集之数据集下载_第3张图片

3 标签文件分析

随便查看一张图片images/100k/val/b1d9e136-9ab25cb3.jpg,如下:
(一)使用YOLOv3训练BDD100K数据集之数据集下载_第4张图片
并打开labels/100k/val/b1d9e136-9ab25cb3,json查看其内容,如下:

{
    "name": "b1d9e136-9ab25cb3",
    "frames": [
        {
            "timestamp": 10000, //表示在时间点为10000下的图片
            "objects": [
                {
                    "category": "traffic sign",	//存在一个traffic sign类别的对象
                    "id": 0,
                    "attributes": {
                        "occluded": false,
                        "truncated": false,
                        "trafficLightColor": "none"  //交通标志的颜色
                    },
                    "box2d": {	//左上角和右下角的四个坐标值
                        "x1": 373.484793,
                        "y1": 218.719691,
                        "x2": 418.816665,
                        "y2": 234.533134
                    }
                },
                {
                    "category": "person",	//存在一个person类别的对象
                    "id": 1,
                    "attributes": {
                        "occluded": false,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 887.948822,
                        "y1": 329.413797,
                        "x2": 903.762266,
                        "y2": 369.474519
                    }
                },
                {
                    "category": "person",	//存在一个person类别的对象
                    "id": 2,
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 355.562892,
                        "y1": 309.383434,
                        "x2": 368.213647,
                        "y2": 326.251107
                    }
                },
                {
                    "category": "person",	//存在一个person类别的对象
                    "id": 3,	
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 258.573769,
                        "y1": 295.678449,
                        "x2": 282.82105,
                        "y2": 347.335698
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 4,
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 786.742784,
                        "y1": 336.793403,
                        "x2": 806.773146,
                        "y2": 368.420289
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 5,
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 744.573602,
                        "y1": 331.522255,
                        "x2": 797.285079,
                        "y2": 378.962585
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 6,
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 718.217861,
                        "y1": 316.763042,
                        "x2": 755.115896,
                        "y2": 378.962586
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 7,
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 459.931618,
                        "y1": 317.81727,
                        "x2": 506.31772,
                        "y2": 362.094912
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 8,
                    "attributes": {
                        "occluded": true,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 348.183284,
                        "y1": 319.92573,
                        "x2": 375.593253,
                        "y2": 368.420289
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 9,
                    "attributes": {
                        "occluded": false,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 365.050957,
                        "y1": 299.895368,
                        "x2": 484.178899,
                        "y2": 390.559112
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 10,
                    "attributes": {
                        "occluded": false,
                        "truncated": false,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 467.311224,
                        "y1": 274.593858,
                        "x2": 751.953209,
                        "y2": 523.392035
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 11,
                    "attributes": {
                        "occluded": false,
                        "truncated": true,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 1.341755,
                        "y1": 296.732679,
                        "x2": 323.936004,
                        "y2": 521.283577
                    }
                },
                {
                    "category": "car",	//存在一个car类别的对象
                    "id": 12,	
                    "attributes": {
                        "occluded": false,
                        "truncated": true,
                        "trafficLightColor": "none"
                    },
                    "box2d": {
                        "x1": 872.135381,
                        "y1": 236.641594,
                        "x2": 1278.013765,
                        "y2": 684.68916
                    }
                },
            //道路可行驶区域的标签
                {
                    "category": "area/drivable",
                    "id": 13,
                    "attributes": {},
                    "poly2d": [
                        [
                            379.295348,
                            522.084962,
                            "L"
                        ],
                        [
                            833.816375,
                            531.298227,
                            "L"
                        ],
                        [
                            978.157509,
                            649.535114,
                            "L"
                        ],
                        [
                            760.110261,
                            631.108585,
                            "C"
                        ],
                        [
                            499.06778,
                            611.146514,
                            "C"
                        ],
                        [
                            257.987372,
                            628.037498,
                            "C"
                        ],
                        [
                            379.295348,
                            522.084962,
                            "L"
                        ]
                    ]
                },
            //可选择的行驶区域的标签
                {
                    "category": "area/alternative",
                    "id": 14,
                    "attributes": {},
                    "poly2d": [
                        [
                            763.318996,
                            386.437234,
                            "L"
                        ],
                        [
                            755.503629,
                            448.378849,
                            "L"
                        ],
                        [
                            873.740518,
                            532.83377,
                            "L"
                        ],
                        [
                            866.256426,
                            421.87471,
                            "L"
                        ],
                        [
                            763.318996,
                            386.437234,
                            "L"
                        ]
                    ]
                },
                {
                    "category": "area/alternative",
                    "id": 15,
                    "attributes": {},
                    "poly2d": [
                        [
                            810.568964,
                            374.624742,
                            "L"
                        ],
                        [
                            867.943924,
                            388.124733,
                            "L"
                        ],
                        [
                            871.318922,
                            415.124715,
                            "L"
                        ],
                        [
                            776.818987,
                            381.374738,
                            "L"
                        ],
                        [
                            810.568964,
                            374.624742,
                            "L"
                        ]
                    ]
                },
            //单一的白色车道线
                {
                    "category": "lane/single white",
                    "id": 16,
                    "attributes": {
                        "direction": "parallel",
                        "style": "dashed"
                    },
                    "poly2d": [
                        [
                            472.553479,
                            437.976395,
                            "L"
                        ],
                        [
                            429.011966,
                            468.711581,
                            "L"
                        ],
                        [
                            234.355791,
                            627.51004,
                            "L"
                        ]
                    ]
                },
             //单一的白色车道线
                {
                    "category": "lane/single white",
                    "id": 17,
                    "attributes": {
                        "direction": "parallel",
                        "style": "dashed"
                    },
                    "poly2d": [
                        [
                            476.395377,
                            423.889435,
                            "L"
                        ],
                        [
                            412.363741,
                            464.869683,
                            "L"
                        ],
                        [
                            210.023769,
                            627.51004,
                            "L"
                        ]
                    ]
                },
             //单一的白色车道线
                {
                    "category": "lane/single white",
                    "id": 18,
                    "attributes": {
                        "direction": "parallel",
                        "style": "solid"
                    },
                    "poly2d": [
                        [
                            749.17015,
                            462.308417,
                            "L"
                        ],
                        [
                            984.806573,
                            654.403328,
                            "L"
                        ]
                    ]
                },
             //单一的白色车道线
                {
                    "category": "lane/single white",
                    "id": 19,
                    "attributes": {
                        "direction": "parallel",
                        "style": "solid"
                    },
                    "poly2d": [
                        [
                            750.450783,
                            441.818294,
                            "L"
                        ],
                        [
                            1046.276945,
                            659.525859,
                            "L"
                        ]
                    ]
                },
             //单一的白色车道线
                {
                    "category": "lane/single white",
                    "id": 20,
                    "attributes": {
                        "direction": "parallel",
                        "style": "dashed"
                    },
                    "poly2d": [
                        [
                            749.17015,
                            380.347922,
                            "L"
                        ],
                        [
                            874.672158,
                            414.925006,
                            "L"
                        ]
                    ]
                },
             //单一的白色车道线
                {
                    "category": "lane/single white",
                    "id": 21,
                    "attributes": {
                        "direction": "parallel",
                        "style": "dashed"
                    },
                    "poly2d": [
                        [
                            795.272928,
                            371.383493,
                            "L"
                        ],
                        [
                            877.233423,
                            390.592984,
                            "L"
                        ]
                    ]
                },
             //道路路边的车道线
                {
                    "category": "lane/road curb",
                    "id": 22,
                    "attributes": {
                        "direction": "parallel",
                        "style": "solid"
                    },
                    "poly2d": [
                        [
                            829.850012,
                            371.383493,
                            "L"
                        ],
                        [
                            882.355954,
                            380.347922,
                            "L"
                        ]
                    ]
                },
             //道路路边的车道线
                {
                    "category": "lane/road curb",
                    "id": 23,
                    "attributes": {
                        "direction": "parallel",
                        "style": "solid"
                    },
                    "poly2d": [
                        [
                            307.351856,
                            366.260962,
                            "L"
                        ],
                        [
                            352.174002,
                            361.138431,
                            "L"
                        ]
                    ]
                }
            ]
        }
    ],
    "attributes": {
        "weather": "undefined",
        "scene": "city street",
        "timeofday": "daytime"
    }
}
```

你可能感兴趣的:(Jetson,TX2)