Skip to content

Commit 2b4562f

Browse files
author
pytorchbot
committed
2025-09-10 nightly release (a8dc530)
1 parent f4216a8 commit 2b4562f

File tree

5 files changed

+21
-23
lines changed

5 files changed

+21
-23
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

packaging/pre_build_script.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
1717
# Installing webp also installs a non-turbo jpeg, so we uninstall jpeg stuff
1818
# before re-installing them
1919
conda uninstall libjpeg-turbo libjpeg -y
20-
conda install -y ffmpeg=4.2 -c pytorch
2120
conda install -y libjpeg-turbo -c pytorch
2221

2322
# Copy binaries to be included in the wheel distribution
@@ -30,7 +29,7 @@ else
3029

3130
if [[ "$ARCH" == "aarch64" ]]; then
3231
conda install libpng -y
33-
conda install -y ffmpeg=4.2 libjpeg-turbo -c pytorch-nightly
32+
conda install -y libjpeg-turbo -c pytorch-nightly
3433
fi
3534

3635
conda install libwebp -y

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
# video decoding backends in torchvision. I'm renaming this to "gpu video
2929
# decoder" where possible, keeping user facing names (like the env var below) to
3030
# the old scheme for BC.
31-
USE_GPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_VIDEO_CODEC", "1") == "1"
31+
USE_GPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_VIDEO_CODEC", "0") == "1"
3232
# Same here: "use ffmpeg" was used to denote "use cpu video decoder".
33-
USE_CPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_FFMPEG", "1") == "1"
33+
USE_CPU_VIDEO_DECODER = os.getenv("TORCHVISION_USE_FFMPEG", "0") == "1"
3434

3535
TORCHVISION_INCLUDE = os.environ.get("TORCHVISION_INCLUDE", "")
3636
TORCHVISION_LIBRARY = os.environ.get("TORCHVISION_LIBRARY", "")

torchvision/csrc/ops/cuda/nms_kernel.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ __global__ void nms_kernel_impl(
3434
double iou_threshold,
3535
const T* dev_boxes,
3636
unsigned long long* dev_mask) {
37-
const int row_start = blockIdx.y;
38-
const int col_start = blockIdx.x;
37+
const auto row_start = blockIdx.y;
38+
const auto col_start = blockIdx.x;
3939

4040
if (row_start > col_start)
4141
return;
@@ -59,7 +59,7 @@ __global__ void nms_kernel_impl(
5959
__syncthreads();
6060

6161
if (threadIdx.x < row_size) {
62-
const int cur_box_idx = threadsPerBlock * row_start + threadIdx.x;
62+
const auto cur_box_idx = threadsPerBlock * row_start + threadIdx.x;
6363
const T* cur_box = dev_boxes + cur_box_idx * 4;
6464
int i = 0;
6565
unsigned long long t = 0;
@@ -84,7 +84,7 @@ __global__ static void gather_keep_from_mask(
8484
// Taken and adapted from mmcv
8585
// https://github.com/open-mmlab/mmcv/blob/03ce9208d18c0a63d7ffa087ea1c2f5661f2441a/mmcv/ops/csrc/common/cuda/nms_cuda_kernel.cuh#L76
8686
const int col_blocks = ceil_div(n_boxes, threadsPerBlock);
87-
const int thread_id = threadIdx.x;
87+
const auto thread_id = threadIdx.x;
8888

8989
// Mark the bboxes which have been removed.
9090
extern __shared__ unsigned long long removed[];

torchvision/datasets/caltech.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import os
22
import os.path
3+
import shutil
34
from pathlib import Path
45
from typing import Any, Callable, Optional, Union
56

67
from PIL import Image
78

8-
from .utils import download_and_extract_archive, verify_str_arg
9+
from .utils import download_and_extract_archive, extract_archive, verify_str_arg
910
from .vision import VisionDataset
1011

1112

@@ -133,17 +134,17 @@ def download(self) -> None:
133134
return
134135

135136
download_and_extract_archive(
136-
"https://drive.google.com/file/d/137RyRjvTBkBiIfeYBNZBtViDHQ6_Ewsp",
137-
self.root,
138-
filename="101_ObjectCategories.tar.gz",
139-
md5="b224c7392d521a49829488ab0f1120d9",
140-
)
141-
download_and_extract_archive(
142-
"https://drive.google.com/file/d/175kQy3UsZ0wUEHZjqkUDdNVssr7bgh_m",
143-
self.root,
144-
filename="Annotations.tar",
145-
md5="6f83eeb1f24d99cab4eb377263132c91",
137+
"https://data.caltech.edu/records/mzrjq-6wc02/files/caltech-101.zip",
138+
download_root=self.root,
139+
filename="caltech-101.zip",
140+
md5="3138e1922a9193bfa496528edbbc45d0",
146141
)
142+
gzip_folder = os.path.join(self.root, "caltech-101")
143+
for gzip_file in os.listdir(gzip_folder):
144+
if gzip_file.endswith(".gz"):
145+
extract_archive(os.path.join(gzip_folder, gzip_file), self.root)
146+
shutil.rmtree(gzip_folder)
147+
os.remove(os.path.join(self.root, "caltech-101.zip"))
147148

148149
def extra_repr(self) -> str:
149150
return "Target type: {target_type}".format(**self.__dict__)
@@ -233,7 +234,7 @@ def download(self) -> None:
233234
return
234235

235236
download_and_extract_archive(
236-
"https://drive.google.com/file/d/1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK",
237+
"https://data.caltech.edu/records/nyy15-4j048/files/256_ObjectCategories.tar",
237238
self.root,
238239
filename="256_ObjectCategories.tar",
239240
md5="67b4f42ca05d46448c6bb8ecd2220f6d",

0 commit comments

Comments
 (0)