CodeJackR
commited on
Commit
·
d87db6a
1
Parent(s):
8b9c502
Manage image resizing
Browse files- handler.py +2 -3
handler.py
CHANGED
|
@@ -53,9 +53,8 @@ class EndpointHandler():
|
|
| 53 |
|
| 54 |
# 2. Prepare prompts and process the image
|
| 55 |
height, width = img.size[1], img.size[0]
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
input_labels = [[1, 1, 1]] # All positive points
|
| 59 |
|
| 60 |
inputs = self.processor(img, input_points=input_points, input_labels=input_labels, return_tensors="pt").to(device)
|
| 61 |
|
|
|
|
| 53 |
|
| 54 |
# 2. Prepare prompts and process the image
|
| 55 |
height, width = img.size[1], img.size[0]
|
| 56 |
+
input_points = [[[width // 2, height // 2]]]
|
| 57 |
+
input_labels = [[1]]
|
|
|
|
| 58 |
|
| 59 |
inputs = self.processor(img, input_points=input_points, input_labels=input_labels, return_tensors="pt").to(device)
|
| 60 |
|