justin2341 commited on
Commit
a82a533
·
verified ·
1 Parent(s): a10bd9b

Update demo.py

Browse files
Files changed (1) hide show
  1. demo.py +5 -1
demo.py CHANGED
@@ -53,7 +53,11 @@ def fire(frame):
53
  # image = cv2.resize(image, (1024, 640))
54
  for obj_name in object_name:
55
  # print(plate_number)
56
- image = plot_one_box(box[obj_name], image, label=object_name[obj_name], score=pro[obj_name], color=[0, 255, 0], line_thickness=1)
 
 
 
 
57
  image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
58
 
59
  fire_output = image.copy()
 
53
  # image = cv2.resize(image, (1024, 640))
54
  for obj_name in object_name:
55
  # print(plate_number)
56
+ if object_name[obj_name]:
57
+ if object_name[obj_name] == "fire":
58
+ image = plot_one_box(box[obj_name], image, label=object_name[obj_name], score=pro[obj_name], color=[0, 255, 0], line_thickness=1)
59
+ else:
60
+ image = plot_one_box(box[obj_name], image, label=object_name[obj_name], score=pro[obj_name], color=[0, 0, 255], line_thickness=1)
61
  image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
62
 
63
  fire_output = image.copy()