rasoulub commited on
Commit
af4cb72
·
verified ·
1 Parent(s): 8bf3ce6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,8 +9,8 @@ max_len = 10
9
  def ocr(plate_image, ocr_model):
10
  try:
11
  if 'yolo' in ocr_model:
12
- # model = YOLO(f'./weights/{ocr_model}.pt', task='detect')
13
- model = YOLO(f'./weights/best.pt', task='detect')
14
  preds = model.predict(plate_image)
15
  pred_data = [list(pred.boxes.data.cpu().numpy()[0]) for pred in preds[0]]
16
  x_sorted_preds = sorted(pred_data, key=lambda x:x[0])
 
9
  def ocr(plate_image, ocr_model):
10
  try:
11
  if 'yolo' in ocr_model:
12
+ model = YOLO(f'./weights/{ocr_model}.pt', task='detect')
13
+ # model = YOLO(f'./weights/best.pt', task='detect')
14
  preds = model.predict(plate_image)
15
  pred_data = [list(pred.boxes.data.cpu().numpy()[0]) for pred in preds[0]]
16
  x_sorted_preds = sorted(pred_data, key=lambda x:x[0])