Spaces:
Running
on
Zero
Running
on
Zero
Update mask_adapter/sam_maskadapter.py
Browse files
mask_adapter/sam_maskadapter.py
CHANGED
@@ -284,11 +284,11 @@ class SAMPointVisualizationDemo(object):
|
|
284 |
height, width, _ = ori_image.shape
|
285 |
|
286 |
image = ori_image
|
287 |
-
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
288 |
-
ori_image = cv2.cvtColor(ori_image, cv2.COLOR_BGR2RGB)
|
289 |
|
290 |
input_point = np.array(points)
|
291 |
-
input_label = np.array([1])
|
292 |
|
293 |
with torch.no_grad():
|
294 |
self.predictor.set_image(image)
|
|
|
284 |
height, width, _ = ori_image.shape
|
285 |
|
286 |
image = ori_image
|
287 |
+
# image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
288 |
+
# ori_image = cv2.cvtColor(ori_image, cv2.COLOR_BGR2RGB)
|
289 |
|
290 |
input_point = np.array(points)
|
291 |
+
input_label = np.array([1] * len(points))
|
292 |
|
293 |
with torch.no_grad():
|
294 |
self.predictor.set_image(image)
|