diff --git a/README.md b/README.md index 1a0a62e..6ba3616 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ ## 项目结构 ``` -1BaseOnYOLO/ +2BaseOnYOLO_InfraredData/ ├── src/ # 核心源代码 │ ├── detect.py # YOLO目标检测模块 │ ├── extract_temp.py # ROI温度特征提取 @@ -31,10 +31,9 @@ ├── scripts/ # 工具脚本 │ ├── train.py # 模型训练/验证入口 │ ├── test_cuda.py # CUDA环境测试 -│ ├── download_dataset.py # 数据集下载 │ ├── convert_to_yolo.py # 数据集格式转换 -│ ├── retry_download.py # 下载失败重试 -│ └── usage_example.py # 使用示例 +│ ├── usage_example.py # 使用示例 +│ └── analyze_temp_features.py # ROI温度特征分析 ├── data/ # 数据目录 │ ├── dataset.yaml # YOLO数据集配置 │ ├── train/ # 训练集 @@ -48,7 +47,7 @@ │ │ └── labels/ # 测试标签 │ └── 标签.txt # 类别标签说明 ├── weights/ # 模型权重 -│ └── infrared_yolov8n.pt # 训练好的模型 +│ └── best.pt # 训练好的模型 ├── pyproject.toml # uv项目配置 └── README.md # 项目文档 ``` @@ -191,7 +190,7 @@ uv run python scripts/usage_example.py from src.detect import InfraredDetector # 初始化检测器 -detector = InfraredDetector("weights/infrared_yolov8n.pt", conf=0.25) +detector = InfraredDetector("weights/best.pt", conf=0.25) # 检测图像 detections = detector.detect("path/to/image.jpg") @@ -227,7 +226,7 @@ detector.detect_and_draw( from src.extract_temp import TempFeatureExtractor import cv2 -extractor = TempFeatureExtractor("weights/infrared_yolov8n.pt") +extractor = TempFeatureExtractor("weights/best.pt") # 读取红外图像 gray_img = cv2.imread("path/to/image.jpg", cv2.IMREAD_GRAYSCALE) @@ -259,7 +258,7 @@ print(f"温度标准差: {features['temp_std']}") ```python from src.diagnose import FaultDiagnoser -diagnoser = FaultDiagnoser("weights/infrared_yolov8n.pt") +diagnoser = FaultDiagnoser("weights/best.pt") result = diagnoser.diagnose("path/to/image.jpg") print(f"诊断状态: {result['summary']['status']}") @@ -325,7 +324,7 @@ threshold = { } diagnoser = FaultDiagnoser( - "weights/infrared_yolov8n.pt", + "weights/best.pt", temp_threshold=threshold ) ``` @@ -397,14 +396,14 @@ uv run python scripts/train.py train \ ### 验证模型 ```bash uv run python scripts/train.py validate \ - --model weights/infrared_yolov8n.pt \ + --model weights/best.pt \ --data data/dataset.yaml ``` ### 导出模型 ```bash uv run python scripts/train.py export \ - --model weights/infrared_yolov8n.pt \ + --model weights/best.pt \ --format onnx ```