Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,6 +29,7 @@ def rescale_bbox(bbox,orig_image_shape=(1024,1024),model_shape=352):
|
|
| 29 |
return [int(y1),int(x1),int(y2),int(x2)]
|
| 30 |
|
| 31 |
def detect_using_clip(image,prompts=[],threshould=0.4):
|
|
|
|
| 32 |
model_detections = dict()
|
| 33 |
inputs = processor(
|
| 34 |
text=prompts,
|
|
|
|
| 29 |
return [int(y1),int(x1),int(y2),int(x2)]
|
| 30 |
|
| 31 |
def detect_using_clip(image,prompts=[],threshould=0.4):
|
| 32 |
+
image = cv2.resize(image,(224,224))
|
| 33 |
model_detections = dict()
|
| 34 |
inputs = processor(
|
| 35 |
text=prompts,
|