Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -8,7 +8,7 @@ from clipseg import CLIPDensePredT
|
|
| 8 |
transform = transforms.Compose([
|
| 9 |
transforms.ToTensor(),
|
| 10 |
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
|
| 11 |
-
transforms.Resize((352, 352)),
|
| 12 |
])
|
| 13 |
|
| 14 |
|
|
@@ -51,7 +51,7 @@ def predict(image, prompts):
|
|
| 51 |
|
| 52 |
def get_examples():
|
| 53 |
examples = [
|
| 54 |
-
['images/
|
| 55 |
['images/000002.jpg', 'train, tracks, electric pole, house'],
|
| 56 |
['images/00125.jpg', 'dog, flowers'],
|
| 57 |
['images/000010.jpg', 'horse, man, fence, buildings, hill'],
|
|
|
|
| 8 |
transform = transforms.Compose([
|
| 9 |
transforms.ToTensor(),
|
| 10 |
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
|
| 11 |
+
transforms.Resize((352, 352), antialias=True),
|
| 12 |
])
|
| 13 |
|
| 14 |
|
|
|
|
| 51 |
|
| 52 |
def get_examples():
|
| 53 |
examples = [
|
| 54 |
+
['images/000013.jpg', 'deer, tree, grass'],
|
| 55 |
['images/000002.jpg', 'train, tracks, electric pole, house'],
|
| 56 |
['images/00125.jpg', 'dog, flowers'],
|
| 57 |
['images/000010.jpg', 'horse, man, fence, buildings, hill'],
|