Update app.py
Browse files
app.py
CHANGED
|
@@ -56,9 +56,9 @@ def Get_Densefeature(image, candidate_labels):
|
|
| 56 |
|
| 57 |
image = image.convert("RGB")
|
| 58 |
|
| 59 |
-
image = resize_short_edge(image,target_size=
|
| 60 |
|
| 61 |
-
image_input = image_processor(images=image, max_num_patches=
|
| 62 |
# captions = ["电脑","黑猫","窗户","window","white cat","book"]
|
| 63 |
captions = candidate_labels
|
| 64 |
|
|
|
|
| 56 |
|
| 57 |
image = image.convert("RGB")
|
| 58 |
|
| 59 |
+
image = resize_short_edge(image,target_size=1024)
|
| 60 |
|
| 61 |
+
image_input = image_processor(images=image, max_num_patches=4096, return_tensors="pt").to(device)
|
| 62 |
# captions = ["电脑","黑猫","窗户","window","white cat","book"]
|
| 63 |
captions = candidate_labels
|
| 64 |
|