Spaces:
Sleeping
Sleeping
Commit
·
6ab12cc
1
Parent(s):
42545c2
adding text box
Browse files- Clip_model_notebook.ipynb +0 -0
- app.py +1 -1
Clip_model_notebook.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def visualize_images(image,detections,prompt):
|
|
| 61 |
return image_copy
|
| 62 |
for bbox in detections[prompt]:
|
| 63 |
cv2.rectangle(image_copy, (int(bbox[1]), int(bbox[0])), (int(bbox[3]), int(bbox[2])), (255, 0, 0), 2)
|
| 64 |
-
cv2.putText(image_copy,(int(bbox[1]), int(bbox[0])),cv2.FONT_HERSHEY_SIMPLEX, 2, 255)
|
| 65 |
return image_copy
|
| 66 |
|
| 67 |
|
|
|
|
| 61 |
return image_copy
|
| 62 |
for bbox in detections[prompt]:
|
| 63 |
cv2.rectangle(image_copy, (int(bbox[1]), int(bbox[0])), (int(bbox[3]), int(bbox[2])), (255, 0, 0), 2)
|
| 64 |
+
cv2.putText(image_copy,str(prompt),(int(bbox[1]), int(bbox[0])),cv2.FONT_HERSHEY_SIMPLEX, 2, 255)
|
| 65 |
return image_copy
|
| 66 |
|
| 67 |
|