Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,6 +45,7 @@ def detect(img, reader, plate_detector):
|
|
| 45 |
myFont = ImageFont.truetype('MESPREG.ttf', 200)
|
| 46 |
|
| 47 |
I.text((100, 10), "No se detecta matricula", fill=(242, 190, 0), font=myFont)
|
|
|
|
| 48 |
return img, "No se detecta matricula"
|
| 49 |
crop = img[coor["ymin"][0]-int(img.shape[1]*p):coor["ymax"][0]+int(img.shape[1]*p), coor["xmin"][0]-int(img.shape[0]*p):coor["xmax"][0]+int(img.shape[0]*p)]
|
| 50 |
#Read text
|
|
|
|
| 45 |
myFont = ImageFont.truetype('MESPREG.ttf', 200)
|
| 46 |
|
| 47 |
I.text((100, 10), "No se detecta matricula", fill=(242, 190, 0), font=myFont)
|
| 48 |
+
img = img[:, :, ::-1]
|
| 49 |
return img, "No se detecta matricula"
|
| 50 |
crop = img[coor["ymin"][0]-int(img.shape[1]*p):coor["ymax"][0]+int(img.shape[1]*p), coor["xmin"][0]-int(img.shape[0]*p):coor["xmax"][0]+int(img.shape[0]*p)]
|
| 51 |
#Read text
|