Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
7b4681a6
Unverified
Commit
7b4681a6
authored
Nov 13, 2023
by
Nicolas Hug
Committed by
GitHub
Nov 13, 2023
Browse files
Remove BETA status for v2 transforms (#8111)
parent
0e2a5ae7
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
12 deletions
+10
-12
torchvision/transforms/v2/functional/_utils.py
torchvision/transforms/v2/functional/_utils.py
+1
-1
torchvision/tv_tensors/__init__.py
torchvision/tv_tensors/__init__.py
+1
-1
torchvision/tv_tensors/_bounding_boxes.py
torchvision/tv_tensors/_bounding_boxes.py
+2
-2
torchvision/tv_tensors/_dataset_wrapper.py
torchvision/tv_tensors/_dataset_wrapper.py
+1
-3
torchvision/tv_tensors/_image.py
torchvision/tv_tensors/_image.py
+1
-1
torchvision/tv_tensors/_mask.py
torchvision/tv_tensors/_mask.py
+1
-1
torchvision/tv_tensors/_torch_function_helpers.py
torchvision/tv_tensors/_torch_function_helpers.py
+1
-1
torchvision/tv_tensors/_tv_tensor.py
torchvision/tv_tensors/_tv_tensor.py
+1
-1
torchvision/tv_tensors/_video.py
torchvision/tv_tensors/_video.py
+1
-1
No files found.
torchvision/transforms/v2/functional/_utils.py
View file @
7b4681a6
...
@@ -67,7 +67,7 @@ _BUILTIN_DATAPOINT_TYPES = {
...
@@ -67,7 +67,7 @@ _BUILTIN_DATAPOINT_TYPES = {
def
register_kernel
(
functional
,
tv_tensor_cls
):
def
register_kernel
(
functional
,
tv_tensor_cls
):
"""
[BETA]
Decorate a kernel to register it for a functional and a (custom) tv_tensor type.
"""Decorate a kernel to register it for a functional and a (custom) tv_tensor type.
See :ref:`sphx_glr_auto_examples_transforms_plot_custom_tv_tensors.py` for usage
See :ref:`sphx_glr_auto_examples_transforms_plot_custom_tv_tensors.py` for usage
details.
details.
...
...
torchvision/tv_tensors/__init__.py
View file @
7b4681a6
...
@@ -13,7 +13,7 @@ from ._video import Video
...
@@ -13,7 +13,7 @@ from ._video import Video
# Until `disable` is removed, there will be graph breaks after all calls to functional transforms
# Until `disable` is removed, there will be graph breaks after all calls to functional transforms
@
torch
.
compiler
.
disable
@
torch
.
compiler
.
disable
def
wrap
(
wrappee
,
*
,
like
,
**
kwargs
):
def
wrap
(
wrappee
,
*
,
like
,
**
kwargs
):
"""
[BETA]
Convert a :class:`torch.Tensor` (``wrappee``) into the same :class:`~torchvision.tv_tensors.TVTensor` subclass as ``like``.
"""Convert a :class:`torch.Tensor` (``wrappee``) into the same :class:`~torchvision.tv_tensors.TVTensor` subclass as ``like``.
If ``like`` is a :class:`~torchvision.tv_tensors.BoundingBoxes`, the ``format`` and ``canvas_size`` of
If ``like`` is a :class:`~torchvision.tv_tensors.BoundingBoxes`, the ``format`` and ``canvas_size`` of
``like`` are assigned to ``wrappee``, unless they are passed as ``kwargs``.
``like`` are assigned to ``wrappee``, unless they are passed as ``kwargs``.
...
...
torchvision/tv_tensors/_bounding_boxes.py
View file @
7b4681a6
...
@@ -10,7 +10,7 @@ from ._tv_tensor import TVTensor
...
@@ -10,7 +10,7 @@ from ._tv_tensor import TVTensor
class
BoundingBoxFormat
(
Enum
):
class
BoundingBoxFormat
(
Enum
):
"""
[BETA]
Coordinate format of a bounding box.
"""Coordinate format of a bounding box.
Available formats are
Available formats are
...
@@ -25,7 +25,7 @@ class BoundingBoxFormat(Enum):
...
@@ -25,7 +25,7 @@ class BoundingBoxFormat(Enum):
class
BoundingBoxes
(
TVTensor
):
class
BoundingBoxes
(
TVTensor
):
"""
[BETA]
:class:`torch.Tensor` subclass for bounding boxes.
""":class:`torch.Tensor` subclass for bounding boxes.
.. note::
.. note::
There should be only one :class:`~torchvision.tv_tensors.BoundingBoxes`
There should be only one :class:`~torchvision.tv_tensors.BoundingBoxes`
...
...
torchvision/tv_tensors/_dataset_wrapper.py
View file @
7b4681a6
...
@@ -17,9 +17,7 @@ __all__ = ["wrap_dataset_for_transforms_v2"]
...
@@ -17,9 +17,7 @@ __all__ = ["wrap_dataset_for_transforms_v2"]
def
wrap_dataset_for_transforms_v2
(
dataset
,
target_keys
=
None
):
def
wrap_dataset_for_transforms_v2
(
dataset
,
target_keys
=
None
):
"""[BETA] Wrap a ``torchvision.dataset`` for usage with :mod:`torchvision.transforms.v2`.
"""Wrap a ``torchvision.dataset`` for usage with :mod:`torchvision.transforms.v2`.
.. v2betastatus:: wrap_dataset_for_transforms_v2 function
Example:
Example:
>>> dataset = torchvision.datasets.CocoDetection(...)
>>> dataset = torchvision.datasets.CocoDetection(...)
...
...
torchvision/tv_tensors/_image.py
View file @
7b4681a6
...
@@ -9,7 +9,7 @@ from ._tv_tensor import TVTensor
...
@@ -9,7 +9,7 @@ from ._tv_tensor import TVTensor
class
Image
(
TVTensor
):
class
Image
(
TVTensor
):
"""
[BETA]
:class:`torch.Tensor` subclass for images.
""":class:`torch.Tensor` subclass for images.
.. note::
.. note::
...
...
torchvision/tv_tensors/_mask.py
View file @
7b4681a6
...
@@ -9,7 +9,7 @@ from ._tv_tensor import TVTensor
...
@@ -9,7 +9,7 @@ from ._tv_tensor import TVTensor
class
Mask
(
TVTensor
):
class
Mask
(
TVTensor
):
"""
[BETA]
:class:`torch.Tensor` subclass for segmentation and detection masks.
""":class:`torch.Tensor` subclass for segmentation and detection masks.
Args:
Args:
data (tensor-like, PIL.Image.Image): Any data that can be turned into a tensor with :func:`torch.as_tensor` as
data (tensor-like, PIL.Image.Image): Any data that can be turned into a tensor with :func:`torch.as_tensor` as
...
...
torchvision/tv_tensors/_torch_function_helpers.py
View file @
7b4681a6
...
@@ -16,7 +16,7 @@ class _ReturnTypeCM:
...
@@ -16,7 +16,7 @@ class _ReturnTypeCM:
def
set_return_type
(
return_type
:
str
):
def
set_return_type
(
return_type
:
str
):
"""
[BETA]
Set the return type of torch operations on :class:`~torchvision.tv_tensors.TVTensor`.
"""Set the return type of torch operations on :class:`~torchvision.tv_tensors.TVTensor`.
This only affects the behaviour of torch operations. It has no effect on
This only affects the behaviour of torch operations. It has no effect on
``torchvision`` transforms or functionals, which will always return as
``torchvision`` transforms or functionals, which will always return as
...
...
torchvision/tv_tensors/_tv_tensor.py
View file @
7b4681a6
...
@@ -13,7 +13,7 @@ D = TypeVar("D", bound="TVTensor")
...
@@ -13,7 +13,7 @@ D = TypeVar("D", bound="TVTensor")
class
TVTensor
(
torch
.
Tensor
):
class
TVTensor
(
torch
.
Tensor
):
"""
[Beta]
Base class for all TVTensors.
"""Base class for all TVTensors.
You probably don't want to use this class unless you're defining your own
You probably don't want to use this class unless you're defining your own
custom TVTensors. See
custom TVTensors. See
...
...
torchvision/tv_tensors/_video.py
View file @
7b4681a6
...
@@ -8,7 +8,7 @@ from ._tv_tensor import TVTensor
...
@@ -8,7 +8,7 @@ from ._tv_tensor import TVTensor
class
Video
(
TVTensor
):
class
Video
(
TVTensor
):
"""
[BETA]
:class:`torch.Tensor` subclass for videos.
""":class:`torch.Tensor` subclass for videos.
Args:
Args:
data (tensor-like): Any data that can be turned into a tensor with :func:`torch.as_tensor`.
data (tensor-like): Any data that can be turned into a tensor with :func:`torch.as_tensor`.
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment