Sanjayraju30 commited on
Commit
3b01344
·
verified ·
1 Parent(s): 18c4da4

Create thermal_service.py

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