Foggy_driving数据集下载以及将其转换成VOC数据格式

本文提供了Foggy_driving数据集的官方下载链接和百度网盘资源,包括原始数据和已转换为VOC格式的数据。同时,分享了一段使用python进行数据集转换的代码。
摘要由CSDN通过智能技术生成

Foggy_driving数据集官方下载地址
百度网盘下载链接:https://pan.baidu.com/s/1q4dhnlX-doxlt13Mi-uFZQ
提取码:2ap3
VOC格式的Foggy_driving数据集百度网盘下载链接:https://pan.baidu.com/s/14bIND62U0wyhXLvUy5nJFQ
提取码:ekrn

将Foggy_driving数据集转换成VOC数据格式的python代码如下:

###Foggy_driving中的gtbox标注为txt格式,现工作需要将目标检测标注转为pascal voc格式的标注格式
###Foggy_driving数据集的图片在leftImg8bit中(且分为了test:pedestrian、public和test_extra:pedestrain、web)
###目标检测的标注在bboxGt中(且分为了test:pedestrian、public和test_extra:pedestrain、web)
####所以需要将bounding_box标注放到同一个文件夹中,方便读取
import os, sys
import glob
from PIL import Image

# 图像存储位置
src_img_dir = "D:/XUEXI/CODES/Detections/DATASET/Foggy_Driving/Foggy_Driving/VOC2007/JPEGImages"
# 图像的 ground truth 的 txt 文件存放位置
src_txt_dir = "D:/XUEXI/CODES/Detections/DATASET/Foggy_Driving/bboxGt"
###生成的xml文件想要保存的位置
src_xml_dir = "D:/XUEXI/CODES/Detections/DATASET/Foggy_Driving/Foggy_Driving/VOC2007/Annotations"
### - `bboxGt`
###the bounding box annotations induced from the above semantic annotations, available for all 101 images of the dataset.
# Annotations are encoded as `txt` files, in which each line corresponds to a single object and is formatted as
#    ```
#    {class} {xmin} {ymin} {xmax} {ymax}
#    ```
#    `class` stands for the ID of the class this object belongs to, and the rest four elements encode the extent of
#    its bounding box in 1-based integer pixel coordinates. The 8 relevant classes are encoded with the following IDs:
#    - *car*: 0
#    - *person*: 1
#    - *bicycle*: 2
#    - *bus*: 3
#    - *truck*: 4
#    - *train*: 5
#    - *motorcycle*: 6
#    - *rider*: 7
classes = {
   '0': 'car','1': 'person','2'
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值