Skip to content

Commit

Permalink
Update plot_repurposing_annotations.py (#8506)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavay-2001 committed Jul 4, 2024
1 parent bf01bab commit c304e3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gallery/others/plot_repurposing_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
=====================================
.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_repurposing_annotations.ipynb>`_
Try on `Colab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_repurposing_annotations.ipynb>`_
or :ref:`go to the end <sphx_glr_download_auto_examples_others_plot_repurposing_annotations.py>` to download the full example code.
The following example illustrates the operations available
Expand Down Expand Up @@ -149,8 +149,8 @@ def show(imgs):
model = fasterrcnn_resnet50_fpn(weights=weights, progress=False)
print(img.size())

tranforms = weights.transforms()
img = tranforms(img)
transforms = weights.transforms()
img = transforms(img)
target = {}
target["boxes"] = boxes
target["labels"] = labels = torch.ones((masks.size(0),), dtype=torch.int64)
Expand Down

0 comments on commit c304e3a

Please sign in to comment.