PKLot
收藏资源简介:
PKLot数据集包含12,416张从监控摄像头帧中提取的停车场图像。这些图像包括不同天气条件下的变化,如晴天、阴天和雨天。每个停车位都被标记为占用或空置。原始数据集的注释已转换为标准的目标检测格式,使用边界框包围旋转的矩形。
The PKLot dataset consists of 12,416 parking lot images extracted from surveillance camera frames. These images were captured under diverse weather conditions including sunny, overcast and rainy scenarios. Each parking space is annotated as either occupied or vacant. The original annotations of the dataset have been converted to the standard object detection format, where bounding boxes are used to enclose rotated rectangles.
数据集概述
数据集名称
Object Detection: Parking Spot
数据集简介
该数据集专注于使用YOLO V8架构进行停车位可用性的目标检测。数据集包含在不同天气条件下标注的停车场图像,类别标识为空闲和占用的停车位。
数据集内容
- 数据集名称: PKLot
- 图像数量: 12,416张
- 图像来源: 监控摄像头帧
- 天气条件: 晴天、多云、雨天
- 标注信息: 每个停车位标注为空闲或占用,标注格式为标准目标检测格式,包含旋转矩形的边界框。
数据集许可证
- 许可证类型: Creative Commons Attribution 4.0 License
- 数据集来源: PKLot数据集在Roboflow上的摘要
数据集引用
Almeida, P., Oliveira, L. S., Silva Jr, E., Britto Jr, A., Koerich, A., PKLot – A robust dataset for parking lot classification, Expert Systems with Applications, 42(11):4937-4949, 2015.
数据集结构
object-detection-parking-spot/ ├── configs/ # 预训练的YOLO V8权重文件 ├── data/ # 数据集 │ ├── preprocessed/ # 预处理后的数据集,包含标签和图像 │ └── raw/ # 原始下载的ZIP文件 ├── Dockerfile # Docker设置 ├── environment.yml # Conda环境设置 ├── examples.png # 示例可视化摘要图 ├── LICENSE # 项目许可证 ├── main.py # 主管道脚本 ├── README.md # 项目README ├── requirements.txt # Python依赖项 ├── results/ # 推理和评估的输出 │ ├── evaluation/ # 评估特定文件 │ ├── confusion_matrix.png # 混淆矩阵可视化 │ ├── confusion_matrix_norm.png # 归一化混淆矩阵 │ ├── F1_curve.png # F1曲线可视化 │ ├── P_curve.png # 精确度-置信度曲线 │ ├── PR_curve.png # 精确度-召回率曲线可视化 │ └── R_curve.png # 召回率-置信度曲线 │ ├── evaluation_metrics.txt # 评估指标摘要 │ ├── ground_truth_.png # 真实标签可视化 │ └── predicted_detection_.png # 模型预测可视化 ├── src/ # 源代码 │ ├── data.py # 数据准备脚本 │ ├── eval.py # 评估脚本 │ ├── infer.py # 推理脚本 │ └── train.py # 训练脚本 └── yolov8.png # YOLO V8示意图
评估结果
- 测试数据集: 1,242张图像,70,684个实例
- 评估指标:
- 精确度: 0.9978
- 召回率: 0.9972
- mAP@0.5: 0.9941
- mAP@0.5:0.95: 0.9707
可视化结果
- 混淆矩阵: 提供模型性能的可视化表示,显示每个类别的真正例、假正例和假反例。
- 精确度-召回率曲线: 用于理解模型在不同置信度阈值下的行为。
安装与使用
Conda环境设置
-
克隆仓库: bash git clone https://github.com/your-ai-solution/object-detection-parking-spot.git cd object-detection-parking-spot
-
创建Conda环境: bash conda env create -f environment.yml conda activate object-detection-parking-spot
-
安装依赖项: bash pip install -r requirements.txt
Docker设置(可选)
-
构建Docker镜像: bash docker build -t object-detection-parking-spot .
-
运行Docker容器: bash docker run --gpus all -v $(pwd)/data:/app/data -v $(pwd)/results:/app/results object-detection-parking-spot
使用
-
将数据集ZIP文件放置在
data/raw/目录下。 -
运行主脚本以自动化整个管道: bash python main.py
可选步骤
-
数据准备: 预处理数据集。 bash python src/data.py
-
训练: 训练YOLO V8模型。 bash python src/train.py
-
评估: 评估YOLO V8模型。 bash python src/eval.py
-
推理: 在随机测试图像上运行推理。 bash python src/infer.py




