Updating variable names
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def detect_objects(model_name,url_input,image_input,threshold):
|
|
| 31 |
processor = MaskFormerImageProcessor.from_pretrained(model_name)
|
| 32 |
model = MaskFormerForInstanceSegmentation.from_pretrained(model_name)
|
| 33 |
|
| 34 |
-
target_size = (image.
|
| 35 |
inputs = preprocessor(images=image, return_tensors="pt")
|
| 36 |
with torch.no_grad():
|
| 37 |
outputs = model(**inputs)
|
|
|
|
| 31 |
processor = MaskFormerImageProcessor.from_pretrained(model_name)
|
| 32 |
model = MaskFormerForInstanceSegmentation.from_pretrained(model_name)
|
| 33 |
|
| 34 |
+
target_size = (image.size[0], image.size[1])
|
| 35 |
inputs = preprocessor(images=image, return_tensors="pt")
|
| 36 |
with torch.no_grad():
|
| 37 |
outputs = model(**inputs)
|