Spaces:
Build error
Build error
Commit ·
3d516f2
1
Parent(s): 2a3b7f2
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,9 +7,9 @@ import cv2 as cv
|
|
| 7 |
import numpy as np
|
| 8 |
import re
|
| 9 |
|
| 10 |
-
model = RTDETR('rtdetr-l.pt')
|
| 11 |
|
| 12 |
-
model_SAM = SAM('mobile_sam.pt')
|
| 13 |
|
| 14 |
def image_mod(image):
|
| 15 |
ancho, alto = image.size
|
|
@@ -18,7 +18,7 @@ def image_mod(image):
|
|
| 18 |
|
| 19 |
for r in results:
|
| 20 |
boxes = r.boxes.xyxy
|
| 21 |
-
results_SAM = model_SAM(
|
| 22 |
|
| 23 |
for x in results_SAM:
|
| 24 |
im_array = x.plot()
|
|
|
|
| 7 |
import numpy as np
|
| 8 |
import re
|
| 9 |
|
| 10 |
+
model = RTDETR('Modelo/rtdetr-l.pt')
|
| 11 |
|
| 12 |
+
model_SAM = SAM('Modelo/mobile_sam.pt')
|
| 13 |
|
| 14 |
def image_mod(image):
|
| 15 |
ancho, alto = image.size
|
|
|
|
| 18 |
|
| 19 |
for r in results:
|
| 20 |
boxes = r.boxes.xyxy
|
| 21 |
+
results_SAM = model_SAM(image, bboxes = boxes)
|
| 22 |
|
| 23 |
for x in results_SAM:
|
| 24 |
im_array = x.plot()
|