Spaces:
Running
on
Zero
Running
on
Zero
debug
Browse files
examples/blobctrl/blobctrl_app.py
CHANGED
@@ -1025,7 +1025,7 @@ def segmentation(img, sel_pix):
|
|
1025 |
for p, l in sel_pix:
|
1026 |
points.append(p)
|
1027 |
labels.append(l)
|
1028 |
-
mobile_predictor.set_image(img if isinstance(img, np.ndarray) else np.array(img))
|
1029 |
with torch.no_grad():
|
1030 |
masks, _, _ = mobile_predictor.predict(point_coords=np.array(points), point_labels=np.array(labels), multimask_output=False)
|
1031 |
print("=======img=========")
|
@@ -1715,7 +1715,7 @@ with block as demo:
|
|
1715 |
## select point
|
1716 |
input_image.select(
|
1717 |
get_point,
|
1718 |
-
[
|
1719 |
[input_image, original_mask],
|
1720 |
)
|
1721 |
|
|
|
1025 |
for p, l in sel_pix:
|
1026 |
points.append(p)
|
1027 |
labels.append(l)
|
1028 |
+
mobile_predictor.set_image(img.astype(np.uint8) if isinstance(img, np.ndarray) else np.array(img).astype(np.uint8))
|
1029 |
with torch.no_grad():
|
1030 |
masks, _, _ = mobile_predictor.predict(point_coords=np.array(points), point_labels=np.array(labels), multimask_output=False)
|
1031 |
print("=======img=========")
|
|
|
1715 |
## select point
|
1716 |
input_image.select(
|
1717 |
get_point,
|
1718 |
+
[input_image, selected_points],
|
1719 |
[input_image, original_mask],
|
1720 |
)
|
1721 |
|