Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: mit
|
5 |
+
pretty_name: PaliGemma Multitask Dataset
|
6 |
+
size_categories:
|
7 |
+
- 1K<n<10K
|
8 |
+
task_categories:
|
9 |
+
- object-detection
|
10 |
+
- image-to-text
|
11 |
+
task_ids:
|
12 |
+
- visual-question-answering
|
13 |
+
- image-captioning
|
14 |
+
---
|
15 |
+
|
16 |
+
# GPRadar-Defect-MultiTask 数据集
|
17 |
+
|
18 |
+
本仓库包含用于微调PaLI-GEMMA多模态模型的地质雷达(GPR)缺陷检测数据集。该数据集专注于地下结构中的空洞和裂缝检测与分析。
|
19 |
+
|
20 |
+
## 数据集结构
|
21 |
+
|
22 |
+
数据集组织如下:
|
23 |
+
|
24 |
+
```
|
25 |
+
dataset/
|
26 |
+
├── annotations/ - 包含JSON和JSONL格式的标注文件
|
27 |
+
│ ├── _annotations.train.jsonl - 训练集标注
|
28 |
+
│ ├── _annotations.valid.jsonl - 验证集标注
|
29 |
+
│ ├── _annotations.test.jsonl - 测试集标注
|
30 |
+
│ ├── p-1.v1i.paligemma/ - 主数据集元数据
|
31 |
+
│ └── p-1.v1i.paligemma-multimodal/ - 多模态数据集元数据
|
32 |
+
├── images/ - 包含所有图像文件
|
33 |
+
```
|
34 |
+
|
35 |
+
## 特点
|
36 |
+
|
37 |
+
- 包含874张带注释的地质雷达扫描图像
|
38 |
+
- 图像预处理为640x640像素大小
|
39 |
+
- 支持多种任务类型:缺陷检测、位置定位和描述生成
|
40 |
+
- 提供PaliGemma格式的注释,适用于多模态模型训练
|
41 |
+
|
42 |
+
## 注释格式
|
43 |
+
|
44 |
+
数据集采用两种注释格式:
|
45 |
+
|
46 |
+
1. **JSONL格式**: 每行包含一条图像注释,格式如下:
|
47 |
+
```json
|
48 |
+
{"image": "image_filename.jpg", "prefix": "detect void ; crack", "suffix": "<loc0486><loc0156><loc0750><loc0592> void"}
|
49 |
+
```
|
50 |
+
|
51 |
+
2. **统一JSON格式**: 转换后的格式,每个注释包含图像文件名、边界框、标签和说明:
|
52 |
+
```json
|
53 |
+
{
|
54 |
+
"image_filename": "image_filename.jpg",
|
55 |
+
"boxes": [[x1, y1, w1, h1], [x2, y2, w2, h2]],
|
56 |
+
"labels": [0, 1], // 0表示void,1表示crack
|
57 |
+
"caption": "描述图像中的缺陷",
|
58 |
+
"source": "p1v1"
|
59 |
+
}
|
60 |
+
```
|
61 |
+
|
62 |
+
## 使用方法
|
63 |
+
|
64 |
+
### 验证数据集
|
65 |
+
|
66 |
+
验证数据集的一致性:
|
67 |
+
|
68 |
+
```bash
|
69 |
+
python run_upload.py --verify-only
|
70 |
+
```
|
71 |
+
|
72 |
+
### 转换注释
|
73 |
+
|
74 |
+
将注释转换为统一格式:
|
75 |
+
|
76 |
+
```bash
|
77 |
+
python run_upload.py --convert-only
|
78 |
+
```
|
79 |
+
|
80 |
+
### 上传到Hugging Face Hub
|
81 |
+
|
82 |
+
将数据集上传到Hugging Face Hub:
|
83 |
+
|
84 |
+
```bash
|
85 |
+
export HF_TOCKEN=your_huggingface_token
|
86 |
+
python run_upload.py --repo-id your-username/GPRadar-Defect-MultiTask
|
87 |
+
```
|
88 |
+
|
89 |
+
## 引用
|
90 |
+
|
91 |
+
如果您使用了这个数据集,请引用:
|
92 |
+
|
93 |
+
```
|
94 |
+
@misc{chen2024gprdefect,
|
95 |
+
title={GPRadar-Defect-MultiTask Dataset},
|
96 |
+
author={Chen, Xingqiang},
|
97 |
+
year={2024},
|
98 |
+
publisher={Hugging Face}
|
99 |
+
}
|
100 |
+
```
|
101 |
+
|
102 |
+
## 许可证
|
103 |
+
|
104 |
+
数据集采用CC BY 4.0许可证。
|