Update README.md
Browse files
README.md
CHANGED
@@ -40,11 +40,11 @@ Here is how to use this model:
|
|
40 |
import requests
|
41 |
import torch
|
42 |
from PIL import Image
|
43 |
-
from transformers import
|
44 |
|
45 |
|
46 |
# load Mask2Former fine-tuned on COCO panoptic segmentation
|
47 |
-
processor =
|
48 |
model = Mask2FormerForUniversalSegmentation.from_pretrained("facebook/mask2former-swin-base-coco-panoptic")
|
49 |
|
50 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
|
|
40 |
import requests
|
41 |
import torch
|
42 |
from PIL import Image
|
43 |
+
from transformers import AutoImageProcessor, Mask2FormerForUniversalSegmentation
|
44 |
|
45 |
|
46 |
# load Mask2Former fine-tuned on COCO panoptic segmentation
|
47 |
+
processor = AutoImageProcessor.from_pretrained("facebook/mask2former-swin-base-coco-panoptic")
|
48 |
model = Mask2FormerForUniversalSegmentation.from_pretrained("facebook/mask2former-swin-base-coco-panoptic")
|
49 |
|
50 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|