Fix typos
Browse files
README.md
CHANGED
@@ -46,19 +46,19 @@ processor = OneFormerProcessor.from_pretrained("shi-labs/oneformer_coco_swin_lar
|
|
46 |
model = OneFormerForUniversalSegmentation.from_pretrained("shi-labs/oneformer_coco_swin_large")
|
47 |
|
48 |
# Semantic Segmentation
|
49 |
-
semantic_inputs = processor(images=image, ["semantic"] return_tensors="pt")
|
50 |
semantic_outputs = model(**semantic_inputs)
|
51 |
# pass through image_processor for postprocessing
|
52 |
predicted_semantic_map = processor.post_process_semantic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]
|
53 |
|
54 |
# Instance Segmentation
|
55 |
-
instance_inputs = processor(images=image, ["instance"] return_tensors="pt")
|
56 |
instance_outputs = model(**instance_inputs)
|
57 |
# pass through image_processor for postprocessing
|
58 |
predicted_instance_map = processor.post_process_instance_segmentation(outputs, target_sizes=[image.size[::-1]])[0]["segmentation"]
|
59 |
|
60 |
# Panoptic Segmentation
|
61 |
-
panoptic_inputs = processor(images=image, ["panoptic"] return_tensors="pt")
|
62 |
panoptic_outputs = model(**panoptic_inputs)
|
63 |
# pass through image_processor for postprocessing
|
64 |
predicted_semantic_map = processor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]["segmentation"]
|
|
|
46 |
model = OneFormerForUniversalSegmentation.from_pretrained("shi-labs/oneformer_coco_swin_large")
|
47 |
|
48 |
# Semantic Segmentation
|
49 |
+
semantic_inputs = processor(images=image, task_inputs=["semantic"], return_tensors="pt")
|
50 |
semantic_outputs = model(**semantic_inputs)
|
51 |
# pass through image_processor for postprocessing
|
52 |
predicted_semantic_map = processor.post_process_semantic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]
|
53 |
|
54 |
# Instance Segmentation
|
55 |
+
instance_inputs = processor(images=image, task_inputs=["instance"], return_tensors="pt")
|
56 |
instance_outputs = model(**instance_inputs)
|
57 |
# pass through image_processor for postprocessing
|
58 |
predicted_instance_map = processor.post_process_instance_segmentation(outputs, target_sizes=[image.size[::-1]])[0]["segmentation"]
|
59 |
|
60 |
# Panoptic Segmentation
|
61 |
+
panoptic_inputs = processor(images=image, task_inputs=["panoptic"], return_tensors="pt")
|
62 |
panoptic_outputs = model(**panoptic_inputs)
|
63 |
# pass through image_processor for postprocessing
|
64 |
predicted_semantic_map = processor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-1]])[0]["segmentation"]
|