Skip to content

Commit 1eb72e0

Browse files
committed
Merge branch 'main' of https://github.com/pytorch/vision into filename4
2 parents f6b53a3 + a00a72b commit 1eb72e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+70
-72
lines changed

.github/workflows/build-wheels-aarch64-linux.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1414
workflow_dispatch:
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721
generate-matrix:
1822
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
@@ -48,6 +52,3 @@ jobs:
4852
trigger-event: ${{ github.event_name }}
4953
architecture: aarch64
5054
setup-miniconda: false
51-
secrets:
52-
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
53-
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

.github/workflows/build-wheels-linux.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1414
workflow_dispatch:
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721
generate-matrix:
1822
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
@@ -45,6 +49,3 @@ jobs:
4549
package-name: ${{ matrix.package-name }}
4650
smoke-test-script: ${{ matrix.smoke-test-script }}
4751
trigger-event: ${{ github.event_name }}
48-
secrets:
49-
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
50-
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

.github/workflows/build-wheels-m1.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1414
workflow_dispatch:
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721
generate-matrix:
1822
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
@@ -46,6 +50,3 @@ jobs:
4650
runner-type: macos-m1-12
4751
smoke-test-script: ${{ matrix.smoke-test-script }}
4852
trigger-event: ${{ github.event_name }}
49-
secrets:
50-
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
51-
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

.github/workflows/build-wheels-macos.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1414
workflow_dispatch:
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721
generate-matrix:
1822
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
@@ -46,6 +50,3 @@ jobs:
4650
runner-type: macos-12
4751
smoke-test-script: ${{ matrix.smoke-test-script }}
4852
trigger-event: ${{ github.event_name }}
49-
secrets:
50-
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
51-
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

.github/workflows/build-wheels-windows.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
1414
workflow_dispatch:
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721
generate-matrix:
1822
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
@@ -47,6 +51,3 @@ jobs:
4751
package-name: ${{ matrix.package-name }}
4852
smoke-test-script: ${{ matrix.smoke-test-script }}
4953
trigger-event: ${{ github.event_name }}
50-
secrets:
51-
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
52-
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}

docs/source/models/ssdlite.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SSDlite
66
The SSDLite model is based on the `SSD: Single Shot MultiBox Detector
77
<https://arxiv.org/abs/1512.02325>`__, `Searching for MobileNetV3
88
<https://arxiv.org/abs/1905.02244>`__ and `MobileNetV2: Inverted Residuals and Linear
9-
Bottlenecks <https://arxiv.org/abs/1801.04381>__` papers.
9+
Bottlenecks <https://arxiv.org/abs/1801.04381>`__ papers.
1010

1111
.. betastatus:: detection module
1212

torchvision/csrc/io/decoder/stream.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,8 @@ int Stream::openCodec(std::vector<DecoderMetadata>* metadata, int num_threads) {
6363
codecCtx_->thread_count = num_threads;
6464
} else {
6565
// otherwise set sensible defaults
66-
// with the special case for the different MPEG4 codecs
67-
// that don't have threading context functions
68-
if (codecCtx_->codec->capabilities & AV_CODEC_CAP_INTRA_ONLY) {
69-
codecCtx_->thread_type = FF_THREAD_FRAME;
70-
codecCtx_->thread_count = 2;
71-
} else {
72-
codecCtx_->thread_count = 8;
73-
codecCtx_->thread_type = FF_THREAD_SLICE;
74-
}
66+
codecCtx_->thread_count = 8;
67+
codecCtx_->thread_type = FF_THREAD_SLICE;
7568
}
7669

7770
int ret;

torchvision/datasets/caltech.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Caltech101(VisionDataset):
2323
target types. ``category`` represents the target class, and
2424
``annotation`` is a list of points from a hand-generated outline.
2525
Defaults to ``category``.
26-
transform (callable, optional): A function/transform that takes in an PIL image
26+
transform (callable, optional): A function/transform that takes in a PIL image
2727
and returns a transformed version. E.g, ``transforms.RandomCrop``
2828
target_transform (callable, optional): A function/transform that takes in the
2929
target and transforms it.
@@ -151,7 +151,7 @@ class Caltech256(VisionDataset):
151151
Args:
152152
root (string): Root directory of dataset where directory
153153
``caltech256`` exists or will be saved to if download is set to True.
154-
transform (callable, optional): A function/transform that takes in an PIL image
154+
transform (callable, optional): A function/transform that takes in a PIL image
155155
and returns a transformed version. E.g, ``transforms.RandomCrop``
156156
target_transform (callable, optional): A function/transform that takes in the
157157
target and transforms it.

torchvision/datasets/celeba.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CelebA(VisionDataset):
3131
3232
Defaults to ``attr``. If empty, ``None`` will be returned as target.
3333
34-
transform (callable, optional): A function/transform that takes in an PIL image
34+
transform (callable, optional): A function/transform that takes in a PIL image
3535
and returns a transformed version. E.g, ``transforms.PILToTensor``
3636
target_transform (callable, optional): A function/transform that takes in the
3737
target and transforms it.

torchvision/datasets/cifar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CIFAR10(VisionDataset):
1717
``cifar-10-batches-py`` exists or will be saved to if download is set to True.
1818
train (bool, optional): If True, creates dataset from training set, otherwise
1919
creates from test set.
20-
transform (callable, optional): A function/transform that takes in an PIL image
20+
transform (callable, optional): A function/transform that takes in a PIL image
2121
and returns a transformed version. E.g, ``transforms.RandomCrop``
2222
target_transform (callable, optional): A function/transform that takes in the
2323
target and transforms it.

torchvision/datasets/clevr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CLEVRClassification(VisionDataset):
1818
root (string): Root directory of dataset where directory ``root/clevr`` exists or will be saved to if download is
1919
set to True.
2020
split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``.
21-
transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed
21+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
2222
version. E.g, ``transforms.RandomCrop``
2323
target_transform (callable, optional): A function/transform that takes in them target and transforms it.
2424
download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If

torchvision/datasets/coco.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class CocoDetection(VisionDataset):
1414
Args:
1515
root (string): Root directory where images are downloaded to.
1616
annFile (string): Path to json annotation file.
17-
transform (callable, optional): A function/transform that takes in an PIL image
17+
transform (callable, optional): A function/transform that takes in a PIL image
1818
and returns a transformed version. E.g, ``transforms.PILToTensor``
1919
target_transform (callable, optional): A function/transform that takes in the
2020
target and transforms it.
@@ -65,7 +65,7 @@ class CocoCaptions(CocoDetection):
6565
Args:
6666
root (string): Root directory where images are downloaded to.
6767
annFile (string): Path to json annotation file.
68-
transform (callable, optional): A function/transform that takes in an PIL image
68+
transform (callable, optional): A function/transform that takes in a PIL image
6969
and returns a transformed version. E.g, ``transforms.PILToTensor``
7070
target_transform (callable, optional): A function/transform that takes in the
7171
target and transforms it.

torchvision/datasets/country211.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Country211(ImageFolder):
1616
Args:
1717
root (string): Root directory of the dataset.
1818
split (string, optional): The dataset split, supports ``"train"`` (default), ``"valid"`` and ``"test"``.
19-
transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed
19+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
2020
version. E.g, ``transforms.RandomCrop``.
2121
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
2222
download (bool, optional): If True, downloads the dataset from the internet and puts it into

torchvision/datasets/dtd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DTD(VisionDataset):
2121
The partition only changes which split each image belongs to. Thus, regardless of the selected
2222
partition, combining all splits will result in all images.
2323
24-
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
24+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
2525
version. E.g, ``transforms.RandomCrop``.
2626
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
2727
download (bool, optional): If True, downloads the dataset from the internet and

torchvision/datasets/eurosat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EuroSAT(ImageFolder):
1010
1111
Args:
1212
root (string): Root directory of dataset where ``root/eurosat`` exists.
13-
transform (callable, optional): A function/transform that takes in an PIL image
13+
transform (callable, optional): A function/transform that takes in a PIL image
1414
and returns a transformed version. E.g, ``transforms.RandomCrop``
1515
target_transform (callable, optional): A function/transform that takes in the
1616
target and transforms it.

torchvision/datasets/fakedata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FakeData(VisionDataset):
1313
size (int, optional): Size of the dataset. Default: 1000 images
1414
image_size(tuple, optional): Size if the returned images. Default: (3, 224, 224)
1515
num_classes(int, optional): Number of classes in the dataset. Default: 10
16-
transform (callable, optional): A function/transform that takes in an PIL image
16+
transform (callable, optional): A function/transform that takes in a PIL image
1717
and returns a transformed version. E.g, ``transforms.RandomCrop``
1818
target_transform (callable, optional): A function/transform that takes in the
1919
target and transforms it.

torchvision/datasets/fer2013.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class FER2013(VisionDataset):
1717
root (string): Root directory of dataset where directory
1818
``root/fer2013`` exists.
1919
split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``.
20-
transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed
20+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
2121
version. E.g, ``transforms.RandomCrop``
2222
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
2323
"""

torchvision/datasets/fgvc_aircraft.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class FGVCAircraft(VisionDataset):
2828
``trainval`` and ``test``.
2929
annotation_level (str, optional): The annotation level, supports ``variant``,
3030
``family`` and ``manufacturer``.
31-
transform (callable, optional): A function/transform that takes in an PIL image
31+
transform (callable, optional): A function/transform that takes in a PIL image
3232
and returns a transformed version. E.g, ``transforms.RandomCrop``
3333
target_transform (callable, optional): A function/transform that takes in the
3434
target and transforms it.

torchvision/datasets/flowers102.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Flowers102(VisionDataset):
2424
Args:
2525
root (string): Root directory of the dataset.
2626
split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``.
27-
transform (callable, optional): A function/transform that takes in an PIL image and returns a
27+
transform (callable, optional): A function/transform that takes in a PIL image and returns a
2828
transformed version. E.g, ``transforms.RandomCrop``.
2929
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
3030
download (bool, optional): If true, downloads the dataset from the internet and

torchvision/datasets/folder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class ImageFolder(DatasetFolder):
284284
285285
Args:
286286
root (string): Root directory path.
287-
transform (callable, optional): A function/transform that takes in an PIL image
287+
transform (callable, optional): A function/transform that takes in a PIL image
288288
and returns a transformed version. E.g, ``transforms.RandomCrop``
289289
target_transform (callable, optional): A function/transform that takes in the
290290
target and transforms it.

torchvision/datasets/food101.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Food101(VisionDataset):
2121
Args:
2222
root (string): Root directory of the dataset.
2323
split (string, optional): The dataset split, supports ``"train"`` (default) and ``"test"``.
24-
transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed
24+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
2525
version. E.g, ``transforms.RandomCrop``.
2626
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
2727
download (bool, optional): If True, downloads the dataset from the internet and

torchvision/datasets/gtsrb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class GTSRB(VisionDataset):
1515
Args:
1616
root (string): Root directory of the dataset.
1717
split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``.
18-
transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed
18+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
1919
version. E.g, ``transforms.RandomCrop``.
2020
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
2121
download (bool, optional): If True, downloads the dataset from the internet and

torchvision/datasets/imagenet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ImageNet(ImageFolder):
3030
Args:
3131
root (string): Root directory of the ImageNet Dataset.
3232
split (string, optional): The dataset split, supports ``train``, or ``val``.
33-
transform (callable, optional): A function/transform that takes in an PIL image
33+
transform (callable, optional): A function/transform that takes in a PIL image
3434
and returns a transformed version. E.g, ``transforms.RandomCrop``
3535
target_transform (callable, optional): A function/transform that takes in the
3636
target and transforms it.

torchvision/datasets/imagenette.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Imagenette(VisionDataset):
1717
size (string, optional): The image size. Supports ``"full"`` (default), ``"320px"``, and ``"160px"``.
1818
download (bool, optional): If ``True``, downloads the dataset components and places them in ``root``. Already
1919
downloaded archives are not downloaded again.
20-
transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed
20+
transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed
2121
version, e.g. ``transforms.RandomCrop``.
2222
target_transform (callable, optional): A function/transform that takes in the target and transforms it.
2323

torchvision/datasets/inaturalist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class INaturalist(VisionDataset):
5454
5555
Can also be a list to output a tuple with all specified target types.
5656
Defaults to ``full``.
57-
transform (callable, optional): A function/transform that takes in an PIL image
57+
transform (callable, optional): A function/transform that takes in a PIL image
5858
and returns a transformed version. E.g, ``transforms.RandomCrop``
5959
target_transform (callable, optional): A function/transform that takes in the
6060
target and transforms it.

torchvision/datasets/kinetics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Kinetics(VisionDataset):
5656
split (str): split of the dataset to consider; supports ``"train"`` (default) ``"val"`` ``"test"``
5757
frame_rate (float): If omitted, interpolate different frame rate for each clip.
5858
step_between_clips (int): number of frames between each clip
59-
transform (callable, optional): A function/transform that takes in a TxHxWxC video
59+
transform (callable, optional): A function/transform that takes in a TxHxWxC video
6060
and returns a transformed version.
6161
download (bool): Download the official version of the dataset to root folder.
6262
num_workers (int): Use multiple workers for VideoClips creation

torchvision/datasets/lfw.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class LFWPeople(_LFW):
101101
``10fold`` (default).
102102
image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or
103103
``deepfunneled``. Defaults to ``funneled``.
104-
transform (callable, optional): A function/transform that takes in an PIL image
104+
transform (callable, optional): A function/transform that takes in a PIL image
105105
and returns a transformed version. E.g, ``transforms.RandomRotation``
106106
target_transform (callable, optional): A function/transform that takes in the
107107
target and transforms it.
@@ -183,7 +183,7 @@ class LFWPairs(_LFW):
183183
``10fold``. Defaults to ``10fold``.
184184
image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or
185185
``deepfunneled``. Defaults to ``funneled``.
186-
transform (callable, optional): A function/transform that takes in an PIL image
186+
transform (callable, optional): A function/transform that takes in a PIL image
187187
and returns a transformed version. E.g, ``transforms.RandomRotation``
188188
target_transform (callable, optional): A function/transform that takes in the
189189
target and transforms it.

torchvision/datasets/lsun.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class LSUN(VisionDataset):
6363
root (string): Root directory for the database files.
6464
classes (string or list): One of {'train', 'val', 'test'} or a list of
6565
categories to load. e,g. ['bedroom_train', 'church_outdoor_train'].
66-
transform (callable, optional): A function/transform that takes in an PIL image
66+
transform (callable, optional): A function/transform that takes in a PIL image
6767
and returns a transformed version. E.g, ``transforms.RandomCrop``
6868
target_transform (callable, optional): A function/transform that takes in the
6969
target and transforms it.

0 commit comments

Comments
 (0)