# truck-temp-anomaly-checker **Repository Path**: naza/truck-temp-anomaly-checker ## Basic Information - **Project Name**: truck-temp-anomaly-checker - **Description**: 重卡温度传感器异常检测 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-06 - **Last Updated**: 2025-11-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 卡车温度异常检测项目 这是一个基于PaddleX的卡车温度异常检测项目,实现了自定义的Pipeline类,可以通过包安装模式被PaddleX工程发现和注册。 ## 项目结构 ``` truck-temp-anomaly-checker/ ├── setup.py # 包安装配置文件 ├── truck_temp_anomaly_checker/ # 主包目录 │ ├── __init__.py # 包初始化文件 │ └── custom_pipelines.py # 自定义Pipeline实现 └── README.md # 项目说明文档 ``` ## 安装方法 ### 开发模式安装(推荐) ```bash pip install -e /path/to/truck-temp-anomaly-checker ``` ### 常规安装 ```bash pip install /path/to/truck-temp-anomaly-checker ``` ## 使用示例 ```python # 1. 首先导入自定义包,这会触发Pipeline的自动注册 import truck_temp_anomaly_checker # 2. 导入BasePipeline from paddlex.inference.pipelines import BasePipeline # 3. 通过实体名称获取并实例化Pipeline temp_anomaly_pipeline = BasePipeline.get('truck_temperature_anomaly')() enhanced_pipeline = BasePipeline.get('enhanced_temperature_anomaly')() # 4. 使用Pipeline进行推理 result = temp_anomaly_pipeline(input_data) ``` ## 自定义Pipeline说明 ### TruckTemperatureAnomalyPipeline - **实体名称**: `truck_temperature_anomaly` - **功能**: 基础的卡车温度异常检测 - **使用场景**: 实时监控卡车运输过程中的温度变化,检测异常情况 ### EnhancedTemperaturePipeline - **实体名称**: `enhanced_temperature_anomaly` - **功能**: 增强版温度检测,提供更高级的分析功能 - **使用场景**: 需要预测性分析、多维度检测的复杂应用场景 ## 注意事项 1. 确保已正确安装PaddleX 3.0.0或更高版本 2. 导入顺序很重要:必须先导入自定义包,再尝试通过BasePipeline获取 3. 所有自定义Pipeline的entities属性值必须唯一,避免命名冲突 4. 在实际应用中,需要完善custom_pipelines.py中的预处理、推理和后处理逻辑 ## 扩展方法 要添加新的Pipeline类: 1. 在custom_pipelines.py中创建新的类,继承BasePipeline 2. 为新类定义唯一的entities属性 3. 在__init__.py中导入新创建的类 4. 更新README.md文档