遇见数据集

8bits-ai/ZOD-Mini-2D-Road-Scenes

收藏
Hugging Face2024-08-08 更新2025-04-26 收录
官方服务:

资源简介:

--- license: cc-by-sa-4.0 --- # ZOD-Mini-2D-Road-Scenes The `ZOD-Mini-2D-Road-Scenes` dataset is derived from the Zenseact Open Dataset (ZOD), property of Zenseact AB (© 2022 Zenseact AB), and is licensed under the permissive CC BY-SA 4.0. Any public use, distribution, or display of this dataset must contain this entire notice: > For this dataset, Zenseact AB has taken all reasonable measures to remove all personally identifiable information, including faces and license plates. To the extent that you like to request removal of specific images from the dataset, please contact privacy@zenseact.com. > > The purpose of Zenseact is to save lives in road traffic. We encourage use of this dataset with the intention of avoiding losses in road traffic. ZOD is not intended for military use. The `ZOD-Mini-2D-Road-Scenes` dataset includes 2D road images and their corresponding annotations to assist in the development of autonomous driving technologies. The development kit provided with the original dataset by Zenseact AB, licensed under the MIT License, can be found [here](https://github.com/zenseact/development-kit). # Lane Marking Detection Dataset Preparation This project prepares a YOLO segmentation dataset for lane marking detection from various resolutions and annotations. It involves extracting base datasets, converting annotations to the YOLO format, and organizing the dataset into training and validation sets. ## Project Structure ``` Lane-Marking-Detection/ ├── 1280x720_images.tar.gz ├── 640x360_images.tar.gz ├── annotations.tar.gz ├── extract_base_dataset.py ├── extract_yolo_seg_lane_marking_dataset.py ├── dataset/ ├── utils.py ├── safe_executor.py └── README.md ``` ## Setup ### Prerequisites - Python 3.x - Required Python packages: `tqdm`, `pyyaml`, `argparse` You can install the required packages using: ```sh pip install tqdm pyyaml argparse ``` ### Extracting Base Datasets The base datasets are stored as tar.gz files. You need to extract them to prepare the dataset for training. ### Usage #### Step 1: Extract Base Datasets The `extract_base_dataset.py` script extracts the base datasets for the specified resolution. ```sh python extract_base_dataset.py --from_res <resolution> ``` Supported resolutions can be found by checking the `utils.get_supported_resolutions()` function. #### Step 2: Prepare YOLO Segmentation Dataset The `extract_yolo_seg_lane_marking_dataset.py` script converts annotations to YOLO format and organizes the dataset into training and validation sets. ```sh python extract_yolo_seg_lane_marking_dataset.py --from_res <resolution> [--cache_enabled True/False] ``` **Arguments:** - `--from_res`: Specify the resolution of the dataset (e.g., `1280x720`, `640x360`). - `--cache_enabled`: Optional. Enable or disable caching (default is `False`). ### Example Commands #### Extract Base Dataset ```sh python extract_base_dataset.py --from_res 1280x720 ``` #### Prepare YOLO Segmentation Dataset ```sh python extract_yolo_seg_lane_marking_dataset.py --from_res 1280x720 --cache_enabled True ``` ## Detailed Script Descriptions ### `extract_base_dataset.py` This script extracts the base dataset for the specified resolution. ### `extract_yolo_seg_lane_marking_dataset.py` This script: 1. Converts annotations to YOLO format. 2. Splits the data into training and validation sets. 3. Prepares the dataset directory structure. 4. Creates a `dataset.yaml` file with the following structure: ```yaml path: <absolute_path_to_dataset> train: train # relative to 'path' val: val # relative to 'path' names: 0: lm_solid 1: lm_dashed ``` ### `safe_executor.py` This module provides a `SafeExecutor` context manager that ensures any changes are reverted if an exception occurs. ### `utils.py` This module contains utility functions used across the scripts, such as directory creation and file extraction. ## Example Directory Structure After Extraction ``` Lane-Marking-Detection/ ├── dataset/ │ ├── yolo_seg_lane_1280x720/ │ │ ├── train/ │ │ │ ├── 000000.jpg │ │ │ ├── 000000.txt │ │ ├── val/ │ │ │ ├── 128349.jpg │ │ │ ├── 128349.txt │ │ ├── dataset.yaml ``` ## Notes - Ensure you have the necessary permissions to read and write to the specified directories. - If the dataset directory already exists, the script will prompt you to confirm whether to remove it before proceeding. ## License This project is licensed under the MIT License. By using this dataset, you agree to the terms of the CC BY-SA 4.0 license.

---许可证:CC BY-SA 4.0--- # ZOD-Mini-2D道路场景数据集 本`ZOD-Mini-2D道路场景数据集`源自Zenseact开放数据集(Zenseact Open Dataset, ZOD),其归属权归Zenseact AB所有(© 2022 Zenseact AB),并采用宽松的CC BY-SA 4.0许可证授权。任何公开使用、分发或展示本数据集时,必须包含完整的本声明: > 针对本数据集,Zenseact AB已采取所有合理措施移除所有个人可识别信息,包括人脸与车牌。若您希望申请移除数据集中的特定图像,请联系privacy@zenseact.com。 > > Zenseact的宗旨是挽救道路交通安全生命。我们鼓励本数据集的使用以规避道路交通事故损失。ZOD不得用于军事用途。 `ZOD-Mini-2D道路场景数据集`包含二维道路图像及其对应标注,旨在助力自动驾驶技术的研发。Zenseact AB随原始数据集一同发布的开发套件采用MIT许可证授权,可于[此处](https://github.com/zenseact/development-kit)获取。 # 车道标记检测数据集制备 本项目基于不同分辨率的原始数据与标注,构建用于车道标记检测的YOLO分割数据集,流程涵盖基础数据集解压、标注格式转换为YOLO格式,以及将数据集划分为训练集与验证集。 ## 项目结构 Lane-Marking-Detection/ ├── 1280x720_images.tar.gz ├── 640x360_images.tar.gz ├── annotations.tar.gz ├── extract_base_dataset.py ├── extract_yolo_seg_lane_marking_dataset.py ├── dataset/ ├── utils.py ├── safe_executor.py └── README.md ## 环境配置 ### 前置依赖 - Python 3.x - 所需Python第三方库:`tqdm`、`pyyaml`、`argparse` 您可通过以下命令安装所需依赖: sh pip install tqdm pyyaml argparse ### 基础数据集解压 基础数据集以tar.gz格式存储,需先完成解压以准备训练用数据集。 ## 使用方法 #### 步骤1:解压基础数据集 `extract_base_dataset.py`脚本可针对指定分辨率解压基础数据集。 sh python extract_base_dataset.py --from_res <resolution> 支持的分辨率可通过查看`utils.get_supported_resolutions()`函数获取。 #### 步骤2:构建YOLO分割数据集 `extract_yolo_seg_lane_marking_dataset.py`脚本可将标注转换为YOLO格式,并将数据集划分为训练集与验证集。 sh python extract_yolo_seg_lane_marking_dataset.py --from_res <resolution> [--cache_enabled True/False] **参数说明:** - `--from_res`:指定数据集分辨率(例如`1280x720`、`640x360`)。 - `--cache_enabled`:可选参数,启用或禁用缓存(默认值为`False`)。 ## 示例命令 ### 解压基础数据集 sh python extract_base_dataset.py --from_res 1280x720 ### 构建YOLO分割数据集 sh python extract_yolo_seg_lane_marking_dataset.py --from_res 1280x720 --cache_enabled True ## 脚本详细说明 ### `extract_base_dataset.py` 本脚本用于解压指定分辨率的基础数据集。 ### `extract_yolo_seg_lane_marking_dataset.py` 本脚本: 1. 将标注转换为YOLO格式; 2. 将数据划分为训练集与验证集; 3. 构建数据集目录结构; 4. 生成结构如下的`dataset.yaml`文件: yaml path: <absolute_path_to_dataset> train: train # relative to 'path' val: val # relative to 'path' names: 0: lm_solid 1: lm_dashed ### `safe_executor.py` 本模块提供`SafeExecutor`上下文管理器,可确保在发生异常时回滚所有已执行的修改。 ### `utils.py` 本模块包含脚本中使用的各类工具函数,例如目录创建与文件解压。 ## 解压后示例目录结构 Lane-Marking-Detection/ ├── dataset/ │ ├── yolo_seg_lane_1280x720/ │ │ ├── train/ │ │ │ ├── 000000.jpg │ │ │ ├── 000000.txt │ │ ├── val/ │ │ │ ├── 128349.jpg │ │ │ ├── 128349.txt │ │ ├── dataset.yaml ## 注意事项 - 请确保您拥有指定目录的读写权限。 - 若数据集目录已存在,脚本将在执行前提示您确认是否删除原有目录。 ## 许可证 本项目采用MIT许可证进行授权。 使用本数据集即表示您同意遵守CC BY-SA 4.0许可证的条款。

提供机构:
8bits-ai
二维码
社区交流群
二维码
科研交流群
商业服务