testmail-gmail commited on
Commit
b9a2424
·
1 Parent(s): 73cf163

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -131,6 +131,9 @@ def detect_Custom(img):
131
 
132
  if save_img or view_img:
133
  label = f'{names[int(cls)]} {conf:.2f}'
 
 
 
134
  if(cls == 1):
135
  x1 = int(xyxy[0].item())
136
  y1 = int(xyxy[1].item())
@@ -140,9 +143,6 @@ def detect_Custom(img):
140
  orig_img = im0
141
  crop_img = im0[y1:y2, x1:x2]
142
  cv2.imwrite('MRZ_1.png', crop_img)
143
- plot_one_box(xyxy, im0, label=label, color=colors[int(cls)], line_thickness=3)
144
- W, H = 300, 300
145
- box_voc = pbx.convert_bbox(xyxy, from_type="yolo", to_type="voc", image_size=(W,H))
146
 
147
  if view_img:
148
  cv2.imshow(str(p), im0)
 
131
 
132
  if save_img or view_img:
133
  label = f'{names[int(cls)]} {conf:.2f}'
134
+ plot_one_box(xyxy, im0, label=label, color=colors[int(cls)], line_thickness=3)
135
+ W, H = 300, 300
136
+ box_voc = pbx.convert_bbox(xyxy, from_type="yolo", to_type="voc", image_size=(W,H))
137
  if(cls == 1):
138
  x1 = int(xyxy[0].item())
139
  y1 = int(xyxy[1].item())
 
143
  orig_img = im0
144
  crop_img = im0[y1:y2, x1:x2]
145
  cv2.imwrite('MRZ_1.png', crop_img)
 
 
 
146
 
147
  if view_img:
148
  cv2.imshow(str(p), im0)