chore: update project docs and scripts for new dataset

- 更新README.md数据集描述(12类,6735训练图+765验证图)
- 更新模型性能指标(新12类模型结果)
- 删除已过时的download_dataset.py和retry_download.py脚本
- 更新usage_example.py使用正确的路径和模型名
This commit is contained in:
SkyLi
2026-03-27 00:56:10 +08:00
parent 11c5e062c2
commit 787d17a870
4 changed files with 56 additions and 358 deletions
+39 -40
View File
@@ -94,23 +94,30 @@ cuDNN version: 9.1.0
### 数据来源
SCIDB红外电力设备数据集: https://www.scidb.cn/en/detail?dataSetId=e416c488169f484485ad7575dcfc43ce
电力设备红外图像数据集(12类)
### 数据规模
| 类别 | 图像数量 |
|------|----------|
| Wave Traps | 153 |
| Power Transformers | 178 |
| Circuit Breakers | 162 |
| Surge Arresters | 181 |
| Disconnectors | 89 |
| **总计** | **763** |
| 类别 | 类别ID |
|------|--------|
| bushing | 0 |
| arrester | 1 |
| breaker | 2 |
| clamp | 3 |
| conservator | 4 |
| current-transformer | 5 |
| disconnector | 6 |
| disconnector2 | 7 |
| disconnector3 | 8 |
| heat-sink | 9 |
| insulator | 10 |
| transformer | 11 |
| **总计** | **12类** |
### 数据划分
- 训练集: 610张 (80%)
- 验证集: 153张 (20%)
- 训练集: 6735张
- 验证集: 765张
---
@@ -118,22 +125,7 @@ SCIDB红外电力设备数据集: https://www.scidb.cn/en/detail?dataSetId=e416c
### 完整训练流程
**1. 下载数据集**
```bash
uv run python scripts/download_dataset.py \
--urls-file data/dataurls.txt \
--output-dir data/raw/images
```
**2. 转换数据格式**
```bash
uv run python scripts/convert_to_yolo.py \
--input-dir data/raw/images \
--output-dir data/infrared \
--whole-image
```
**3. 训练模型**
**训练模型**
```bash
uv run python scripts/train.py train \
--data data/dataset.yaml \
@@ -160,20 +152,27 @@ uv run python scripts/train.py train \
| 指标 | 值 |
|------|-----|
| mAP@0.5 | **99.5%** |
| mAP@0.5:0.95 | **99.5%** |
| Precision | **99.7%** |
| Recall | **99.4%** |
| mAP@0.5 | **76.42%** |
| mAP@0.5:0.95 | **61.64%** |
| Precision | **66.58%** |
| Recall | **87.93%** |
**各类别性能**:
| 类别 | Precision | Recall | mAP@0.5 |
|------|----------|--------|---------|
| Wave Traps | 0.998 | 1.000 | 0.995 |
| Power Transformers | 0.993 | 1.000 | 0.995 |
| Circuit Breakers | 0.998 | 1.000 | 0.995 |
| Surge Arresters | 1.000 | 0.971 | 0.995 |
| Disconnectors | 0.998 | 1.000 | 0.995 |
| bushing | 0.925 | 0.990 | 0.994 |
| arrester | 0.930 | 0.980 | 0.991 |
| breaker | 0.797 | 0.910 | 0.898 |
| clamp | 0.781 | 0.973 | 0.918 |
| conservator | 0.546 | 0.823 | 0.718 |
| current-transformer | 0.856 | 0.977 | 0.951 |
| disconnector | 0.651 | 0.975 | 0.813 |
| disconnector2 | 0.306 | 0.767 | 0.286 |
| disconnector3 | 0.566 | 0.940 | 0.886 |
| heat-sink | 0.612 | 0.429 | 0.546 |
| insulator | 0.731 | 0.966 | 0.880 |
| transformer | 0.289 | 0.822 | 0.290 |
---
@@ -209,7 +208,7 @@ for det in detections:
'bbox_xywh': [x_center, y_center, w, h], # 中心格式
'confidence': 0.995,
'class_id': 0,
'class_name': 'Wave Traps'
'class_name': 'bushing'
}
```
@@ -270,13 +269,13 @@ print(f"故障类型: {result['summary']['fault_types']}")
**诊断输出格式**:
```json
{
"image": "FLIR0150.jpg",
"image": "20230907095711003_jpg.rf.0e14e8b4344dce21114683dc3f3e7e2e.jpg",
"detections": [
{
"bbox": [x1, y1, x2, y2],
"confidence": 0.995,
"class_id": 0,
"class_name": "Wave Traps"
"class_name": "bushing"
}
],
"faults": [
@@ -552,7 +551,7 @@ A:
A:
```python
threshold = {"max_temp": 200, "std_temp": 40}
diagnoser = FaultDiagnoser("weights/infrared_yolov8n.pt", temp_threshold=threshold)
diagnoser = FaultDiagnoser("weights/best.pt", temp_threshold=threshold)
```
---