faultdetection3 / services /thermal_service.py
Sanjayraju30's picture
Create thermal_service.py
631c8a1 verified
raw
history blame contribute delete
303 Bytes
from ultralytics import YOLO
thermal_model = YOLO("thermal_model.pt")
def detect_thermal_anomalies(image_path):
results = thermal_model(image_path)
flagged = []
for r in results:
if hasattr(r, 'temperature') and r.temperature > 75:
flagged.append(r)
return flagged