Sanjayraju30 commited on
Commit
631c8a1
·
verified ·
1 Parent(s): 8f3c13e

Create thermal_service.py

Browse files
Files changed (1) hide show
  1. services/thermal_service.py +11 -0
services/thermal_service.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from ultralytics import YOLO
2
+
3
+ thermal_model = YOLO("thermal_model.pt")
4
+
5
+ def detect_thermal_anomalies(image_path):
6
+ results = thermal_model(image_path)
7
+ flagged = []
8
+ for r in results:
9
+ if hasattr(r, 'temperature') and r.temperature > 75:
10
+ flagged.append(r)
11
+ return flagged