Ubuntu
commited on
Commit
·
7eda1e7
1
Parent(s):
56ef960
added COLOR_BGR2RGB
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from ultralytics import YOLO
|
3 |
from PIL import Image
|
@@ -6,6 +7,7 @@ model = YOLO('hotspot_detector.pt')
|
|
6 |
|
7 |
def detect_hotspots(image):
|
8 |
result = model(image)
|
|
|
9 |
|
10 |
for r in result:
|
11 |
im_array = r.plot()
|
|
|
1 |
+
import cv2
|
2 |
import gradio as gr
|
3 |
from ultralytics import YOLO
|
4 |
from PIL import Image
|
|
|
7 |
|
8 |
def detect_hotspots(image):
|
9 |
result = model(image)
|
10 |
+
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
11 |
|
12 |
for r in result:
|
13 |
im_array = r.plot()
|