CodeJackR commited on
Commit
d87db6a
·
1 Parent(s): 8b9c502

Manage image resizing

Browse files
Files changed (1) hide show
  1. 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
- # Use multiple points for better segmentation
57
- input_points = [[[width // 4, height // 4], [width // 2, height // 2], [3 * width // 4, 3 * height // 4]]]
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