Skip to content

Commit

Permalink
[fbsync] Update plot_repurposing_annotations.py (#8506)
Browse files Browse the repository at this point in the history
Reviewed By: vmoens

Differential Revision: D60596238

fbshipit-source-id: 2a88e445ea73d0289c771ea0726fe081eaad21b7
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Aug 2, 2024
1 parent e1db9db commit 7b38473
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 7b38473

Please sign in to comment.