Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ def foward_pass(image_input: np.ndarray, points: List[List[int]]) -> np.ndarray:
|
|
87 |
print('SAM-Segmentation-started------->')
|
88 |
global cache_data
|
89 |
image_input = Image.fromarray(image_input)
|
90 |
-
inputs = processor(image_input, input_boxes=
|
91 |
if not cache_data or not torch.equal(inputs['pixel_values'],cache_data[0]):
|
92 |
embedding = model.get_image_embeddings(inputs["pixel_values"])
|
93 |
pixels = inputs["pixel_values"]
|
|
|
87 |
print('SAM-Segmentation-started------->')
|
88 |
global cache_data
|
89 |
image_input = Image.fromarray(image_input)
|
90 |
+
inputs = processor(image_input, input_boxes=points, return_tensors="pt").to(device)
|
91 |
if not cache_data or not torch.equal(inputs['pixel_values'],cache_data[0]):
|
92 |
embedding = model.get_image_embeddings(inputs["pixel_values"])
|
93 |
pixels = inputs["pixel_values"]
|