Update README.md
Browse files
README.md
CHANGED
|
@@ -49,12 +49,12 @@ with torch.inference_mode():
|
|
| 49 |
outputs = model(**inputs)
|
| 50 |
|
| 51 |
# Prepare the original image size in the format (height, width)
|
| 52 |
-
|
| 53 |
|
| 54 |
# Post-process the model outputs to get final segmentation prediction
|
| 55 |
preds = processor.post_process_instance_segmentation(
|
| 56 |
outputs,
|
| 57 |
-
|
| 58 |
)
|
| 59 |
|
| 60 |
# Visualize the segmentation mask
|
|
@@ -62,4 +62,15 @@ plt.imshow(preds[0]["segmentation"])
|
|
| 62 |
plt.axis("off")
|
| 63 |
plt.title("Instance Segmentation")
|
| 64 |
plt.show()
|
| 65 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
outputs = model(**inputs)
|
| 50 |
|
| 51 |
# Prepare the original image size in the format (height, width)
|
| 52 |
+
target_sizes = [(image.height, image.width)]
|
| 53 |
|
| 54 |
# Post-process the model outputs to get final segmentation prediction
|
| 55 |
preds = processor.post_process_instance_segmentation(
|
| 56 |
outputs,
|
| 57 |
+
target_sizes=target_sizes,
|
| 58 |
)
|
| 59 |
|
| 60 |
# Visualize the segmentation mask
|
|
|
|
| 62 |
plt.axis("off")
|
| 63 |
plt.title("Instance Segmentation")
|
| 64 |
plt.show()
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Citation
|
| 68 |
+
If you find our work useful, please consider citing us as:
|
| 69 |
+
```bibtex
|
| 70 |
+
@inproceedings{kerssies2025eomt,
|
| 71 |
+
author = {Kerssies, Tommie and Cavagnero, Niccolò and Hermans, Alexander and Norouzi, Narges and Averta, Giuseppe and Leibe, Bastian and Dubbelman, Gijs and de Geus, Daan},
|
| 72 |
+
title = {Your ViT is Secretly an Image Segmentation Model},
|
| 73 |
+
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
|
| 74 |
+
year = {2025},
|
| 75 |
+
}
|
| 76 |
+
```
|