Skip to content

Commit a85db8e

Browse files
Merge branch 'main' into benchmarks
2 parents 73af38d + 1752fe6 commit a85db8e

35 files changed

+1074
-287
lines changed

.github/scripts/setup-env.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ case $(uname) in
2323
esac
2424

2525
echo '::group::Create build environment'
26-
# See https://github.com/pytorch/vision/issues/7296 for ffmpeg
2726
conda create \
2827
--name ci \
2928
--quiet --yes \
3029
python="${PYTHON_VERSION}" pip \
3130
ninja cmake \
3231
libpng \
33-
libwebp \
34-
'ffmpeg<4.3'
32+
libwebp
3533
conda activate ci
3634
conda install --quiet --yes libjpeg-turbo -c pytorch
3735
pip install --progress-bar=off --upgrade setuptools==72.1.0

.github/workflows/build-cmake.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
script: |
3434
set -euo pipefail
3535
36-
export PYTHON_VERSION=3.9
36+
export PYTHON_VERSION=3.10
3737
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
3838
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
3939
./.github/scripts/cmake.sh
@@ -52,36 +52,36 @@ jobs:
5252
script: |
5353
set -euo pipefail
5454
55-
export PYTHON_VERSION=3.9
55+
export PYTHON_VERSION=3.10
5656
export GPU_ARCH_TYPE=cpu
5757
export GPU_ARCH_VERSION=''
5858
5959
${CONDA_RUN} ./.github/scripts/cmake.sh
6060
61-
windows:
62-
strategy:
63-
matrix:
64-
include:
65-
- runner: windows.4xlarge
66-
gpu-arch-type: cpu
67-
- runner: windows.g5.4xlarge.nvidia.gpu
68-
gpu-arch-type: cuda
69-
gpu-arch-version: "12.6"
70-
fail-fast: false
71-
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
72-
with:
73-
repository: pytorch/vision
74-
runner: ${{ matrix.runner }}
75-
gpu-arch-type: ${{ matrix.gpu-arch-type }}
76-
gpu-arch-version: ${{ matrix.gpu-arch-version }}
77-
test-infra-ref: main
78-
script: |
79-
set -euo pipefail
61+
# windows:
62+
# strategy:
63+
# matrix:
64+
# include:
65+
# - runner: windows.4xlarge
66+
# gpu-arch-type: cpu
67+
# - runner: windows.g5.4xlarge.nvidia.gpu
68+
# gpu-arch-type: cuda
69+
# gpu-arch-version: "12.6"
70+
# fail-fast: false
71+
# uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
72+
# with:
73+
# repository: pytorch/vision
74+
# runner: ${{ matrix.runner }}
75+
# gpu-arch-type: ${{ matrix.gpu-arch-type }}
76+
# gpu-arch-version: ${{ matrix.gpu-arch-version }}
77+
# test-infra-ref: main
78+
# script: |
79+
# set -euo pipefail
8080

81-
export PYTHON_VERSION=3.9
82-
export VC_YEAR=2022
83-
export VSDEVCMD_ARGS=""
84-
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
85-
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
81+
# export PYTHON_VERSION=3.9
82+
# export VC_YEAR=2022
83+
# export VSDEVCMD_ARGS=""
84+
# export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
85+
# export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
8686

87-
./.github/scripts/cmake.sh
87+
# ./.github/scripts/cmake.sh

.github/workflows/prototype-tests-linux-gpu.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version:
14-
- "3.9"
1514
- "3.10"
1615
- "3.11"
1716
- "3.12"
1817
runner: ["linux.12xlarge"]
1918
gpu-arch-type: ["cpu"]
2019
include:
21-
- python-version: "3.9"
20+
- python-version: "3.10"
2221
runner: linux.g5.4xlarge.nvidia.gpu
2322
gpu-arch-type: cuda
2423
gpu-arch-version: "12.6"

.github/workflows/tests-schedule.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616

1717
steps:
1818
- name: Set up python
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
21-
python-version: 3.9
21+
python-version: "3.10"
2222

2323
- name: Upgrade system packages
2424
run: python -m pip install --upgrade pip setuptools wheel

.github/workflows/tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version:
17-
- "3.9"
1817
- "3.10"
1918
- "3.11"
2019
- "3.12"
2120
runner: ["linux.12xlarge"]
2221
gpu-arch-type: ["cpu"]
2322
include:
24-
- python-version: 3.9
23+
- python-version: "3.10"
2524
runner: linux.g5.4xlarge.nvidia.gpu
2625
gpu-arch-type: cuda
2726
gpu-arch-version: "12.6"
@@ -50,7 +49,6 @@ jobs:
5049
strategy:
5150
matrix:
5251
python-version:
53-
- "3.9"
5452
- "3.10"
5553
# TODO put back 3.11 (See blame)
5654
# - "3.11"
@@ -76,7 +74,6 @@ jobs:
7674
strategy:
7775
matrix:
7876
python-version:
79-
- "3.9"
8077
- "3.10"
8178
- "3.11"
8279
- "3.12"
@@ -157,7 +154,7 @@ jobs:
157154
script: |
158155
set -euo pipefail
159156
160-
export PYTHON_VERSION=3.9
157+
export PYTHON_VERSION="3.10"
161158
export GPU_ARCH_TYPE=cpu
162159
export GPU_ARCH_VERSION=''
163160

CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ option(WITH_JPEG "Enable features requiring LibJPEG." ON)
1111
# untested. Since building from cmake is very low pri anyway, this is OK. If
1212
# you're a user and you need this, please open an issue (and a PR!).
1313
option(WITH_WEBP "Enable features requiring LibWEBP." OFF)
14-
# Same here
15-
option(WITH_AVIF "Enable features requiring LibAVIF." OFF)
1614

1715
if(WITH_CUDA)
1816
enable_language(CUDA)
@@ -40,12 +38,7 @@ endif()
4038

4139
if (WITH_WEBP)
4240
add_definitions(-DWEBP_FOUND)
43-
find_package(WEBP REQUIRED)
44-
endif()
45-
46-
if (WITH_AVIF)
47-
add_definitions(-DAVIF_FOUND)
48-
find_package(AVIF REQUIRED)
41+
find_package(WebP REQUIRED)
4942
endif()
5043

5144
function(CUDA_CONVERT_FLAGS EXISTING_TARGET)

README.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ versions.
2020

2121
| `torch` | `torchvision` | Python |
2222
| ------------------ | ------------------ | ------------------- |
23-
| `main` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.12` |
24-
| `2.5` | `0.20` | `>=3.9`, `<=3.12` |
25-
| `2.4` | `0.19` | `>=3.8`, `<=3.12` |
26-
| `2.3` | `0.18` | `>=3.8`, `<=3.12` |
27-
| `2.2` | `0.17` | `>=3.8`, `<=3.11` |
28-
| `2.1` | `0.16` | `>=3.8`, `<=3.11` |
29-
| `2.0` | `0.15` | `>=3.8`, `<=3.11` |
23+
| `main` / `nightly` | `main` / `nightly` | `>=3.10`, `<=3.14` |
24+
| `2.9` | `0.24` | `>=3.10`, `<=3.14` |
25+
| `2.8` | `0.23` | `>=3.9`, `<=3.13` |
26+
| `2.7` | `0.22` | `>=3.9`, `<=3.13` |
27+
| `2.6` | `0.21` | `>=3.9`, `<=3.12` |
3028

3129
<details>
3230
<summary>older versions</summary>
3331

3432
| `torch` | `torchvision` | Python |
3533
|---------|-------------------|---------------------------|
34+
| `2.5` | `0.20` | `>=3.9`, `<=3.12` |
35+
| `2.4` | `0.19` | `>=3.8`, `<=3.12` |
36+
| `2.3` | `0.18` | `>=3.8`, `<=3.12` |
37+
| `2.2` | `0.17` | `>=3.8`, `<=3.11` |
38+
| `2.1` | `0.16` | `>=3.8`, `<=3.11` |
39+
| `2.0` | `0.15` | `>=3.8`, `<=3.11` |
3640
| `1.13` | `0.14` | `>=3.7.2`, `<=3.10` |
3741
| `1.12` | `0.13` | `>=3.7`, `<=3.10` |
3842
| `1.11` | `0.12` | `>=3.7`, `<=3.10` |
@@ -61,30 +65,6 @@ Torchvision currently supports the following image backends:
6165

6266
Read more in in our [docs](https://pytorch.org/vision/stable/transforms.html).
6367

64-
## [UNSTABLE] Video Backend
65-
66-
Torchvision currently supports the following video backends:
67-
68-
- [pyav](https://github.com/PyAV-Org/PyAV) (default) - Pythonic binding for ffmpeg libraries.
69-
- video_reader - This needs ffmpeg to be installed and torchvision to be built from source. There shouldn't be any
70-
conflicting version of ffmpeg installed. Currently, this is only supported on Linux.
71-
72-
```
73-
conda install -c conda-forge 'ffmpeg<4.3'
74-
pip install . -v --no-build-isolation
75-
```
76-
77-
# Using the models on C++
78-
79-
Refer to [example/cpp](https://github.com/pytorch/vision/tree/main/examples/cpp).
80-
81-
**DISCLAIMER**: the `libtorchvision` library includes the torchvision
82-
custom ops as well as most of the C++ torchvision APIs. Those APIs do not come
83-
with any backward-compatibility guarantees and may change from one version to
84-
the next. Only the Python APIs are stable and with backward-compatibility
85-
guarantees. So, if you need stability within a C++ environment, your best bet is
86-
to export the Python APIs via torchscript.
87-
8868
## Documentation
8969

9070
You can find the API documentation on the pytorch website: <https://pytorch.org/vision/stable/index.html>

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def __init__(self, src_dir):
8888
"plot_transforms_e2e.py",
8989
"plot_cutmix_mixup.py",
9090
"plot_rotated_box_transforms.py",
91+
"plot_keypoints_transforms.py",
9192
"plot_custom_transforms.py",
9293
"plot_tv_tensors.py",
9394
"plot_custom_tv_tensors.py",

docs/source/transforms.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ Miscellaneous
413413
v2.RandomErasing
414414
v2.Lambda
415415
v2.SanitizeBoundingBoxes
416+
v2.SanitizeKeyPoints
416417
v2.ClampBoundingBoxes
417418
v2.ClampKeyPoints
418419
v2.UniformTemporalSubsample
@@ -427,6 +428,7 @@ Functionals
427428
v2.functional.normalize
428429
v2.functional.erase
429430
v2.functional.sanitize_bounding_boxes
431+
v2.functional.sanitize_keypoints
430432
v2.functional.clamp_bounding_boxes
431433
v2.functional.clamp_keypoints
432434
v2.functional.uniform_temporal_subsample
@@ -530,6 +532,7 @@ Developer tools
530532
v2.query_size
531533
v2.query_chw
532534
v2.get_bounding_boxes
535+
v2.get_keypoints
533536

534537

535538
V1 API Reference

gallery/assets/pottery.jpg

89.8 KB
Loading

0 commit comments

Comments
 (0)