Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2885 commits
Select commit Hold shift + click to select a range
444b318
[fbsync] Remove broken MPS build (#8472)
NicolasHug Jun 7, 2024
c4d1728
[fbsync] Skip MPS tests (#8474)
NicolasHug Jun 7, 2024
0b43746
[fbsync] Update usages of torch.library APIs (#8384)
NicolasHug Jun 7, 2024
ab4cced
[fbsync] SBDataset: Only download noval file when image_set='train_no…
NicolasHug Jun 7, 2024
936d49b
[fbsync] Load _C ops before registering meta implementations (#8470)
NicolasHug Jun 7, 2024
4d15e24
[fbsync] Add compatibility with FFMPEG 7.0 (#8408)
NicolasHug Jun 7, 2024
61bca8f
Back out "add a way to specify max_packet_size"
guoweis-work Jun 11, 2024
d9c2494
[Codemod][Add `@manual = <dep>` hints to imports] pytorch/vision/test…
Jun 11, 2024
b47bd31
[Codemod][Add `@manual = <dep>` hints to imports] pytorch/vision:torc…
Jun 11, 2024
658d993
[mmai_live] add fix to crash caused by ffmpeg not allocating enough m…
guoweis-work Jun 18, 2024
7e4c2bd
Prevent log spam in torchvision c++ decoder.
huachenheli Jul 26, 2024
e6f61dd
[fbsync] Remove unused dynamo import (#8451)
NicolasHug Aug 2, 2024
99e1064
[fbsync] Skip flaky earth gif test on OSS CI (#8480)
NicolasHug Aug 2, 2024
ee92cda
[fbsync] Re-enable vision MPS builds (#8485)
NicolasHug Aug 2, 2024
2aee0ab
[fbsync] Adding GPU acceleration to encode_jpeg (#8391)
NicolasHug Aug 2, 2024
e1db9db
[fbsync] Update version on main branch (#8494)
NicolasHug Aug 2, 2024
7b38473
[fbsync] Update plot_repurposing_annotations.py (#8506)
NicolasHug Aug 2, 2024
1e71200
[fbsync] Update plot_transforms_getting_started.py: fix typos (#8507)
NicolasHug Aug 2, 2024
525a0a8
[fbsync] Typo fix: collab -> Colab (#8512)
NicolasHug Aug 2, 2024
e749346
[fbsync] Correcting a link bracket in Classification README.md (#8513)
NicolasHug Aug 2, 2024
a35a43a
[fbsync] Ignore some mypy issues (#8516)
NicolasHug Aug 2, 2024
bf04da0
[fbsync] Ignore pickle warning for some v2 tests (#8518)
NicolasHug Aug 2, 2024
9f8380b
[fbsync] Remove warning filter in transforms test (#8523)
NicolasHug Aug 2, 2024
c07f627
[fbsync] Add Path type annotation for ImageFolder (#8526)
NicolasHug Aug 2, 2024
ac99fda
[fbsync] Add support for decoding 16bits png (#8524)
NicolasHug Aug 2, 2024
79ddd40
[fbsync] Pin numpy dep to `numpy<2` for windows (#8530)
NicolasHug Aug 2, 2024
b69ff1c
[fbsync] Revamp setup.py and C++ extension build (#8528)
NicolasHug Aug 2, 2024
f6e0bdc
[fbsync] Avoid modifying TORCHVISION_INCLUDE global variable in setup…
NicolasHug Aug 2, 2024
5f01d77
[fbsync] Remove useless stuff from pre_build_script (#8532)
NicolasHug Aug 2, 2024
82831f4
[fbsync] More debugging info to setup.py (#8535)
NicolasHug Aug 2, 2024
1ace499
[fbsync] Remove redundant line in example (#8539)
NicolasHug Aug 2, 2024
5c85def
[fbsync] [Release 2.4] Update compatibility matrix (#8545)
NicolasHug Aug 2, 2024
c65a82a
[fbsync] Automatically send video to CPU in io.write_video (#8537)
NicolasHug Aug 2, 2024
26f5436
[fbsync] Add xpu linux wheel build into torchvision build matrix (#8542)
NicolasHug Aug 2, 2024
ca94e0e
[fbsync] Update URL of SBDataset train_noval (#8551)
NicolasHug Aug 2, 2024
ad16af6
[fbsync] Support v2.functional.gaussian_blur backprop (#8486)
NicolasHug Aug 2, 2024
6f3e0ef
[fbsync] Check average_rate availability in video reader (#8548)
NicolasHug Aug 2, 2024
a8fa77e
[fbsync] Fix test_write_video_with_audio (#8553)
NicolasHug Aug 2, 2024
4065dac
[fbsync] Fix Mypy (#8555)
NicolasHug Aug 2, 2024
16413b1
[fbsync] Better progress bar for file downloading (#8556)
NicolasHug Aug 2, 2024
04ce704
[fbsync] Fix test_write_video_with_audio.. again (#8558)
NicolasHug Aug 2, 2024
850f45d
[fbsync] Restrict ffmpeg to 4.2+.X versions to resolve linux conda bu…
NicolasHug Aug 2, 2024
4076494
[fbsync] Register nms and roi_align Autocast policy for PyTorch Intel…
NicolasHug Aug 7, 2024
fcc971c
[fbsync] EuroSAT: fix SSL certificate issues (#8563)
NicolasHug Aug 7, 2024
0ae22de
[fbsync] GPU jpeg decoder: add batch support and hardware decoding (#…
NicolasHug Aug 7, 2024
4199772
[fbsync] Only run 'extended' test if `run-extended` label is set (#8579)
NicolasHug Aug 15, 2024
ee39d63
[fbsync] Skip flaky test_autocast_cpu test (#8580)
NicolasHug Aug 15, 2024
e1fd80b
[fbsync] Remove vs2019 folder (#8581)
NicolasHug Aug 15, 2024
f47d71d
[fbsync] Revert "Remove vs2019 folder (#8581)" (#8582)
NicolasHug Aug 15, 2024
de83b25
[fbsync] Fix doc build for Python 3.11+ (#8583)
NicolasHug Aug 15, 2024
bee6287
[fbsync] Remove 3.8 support (#8552)
NicolasHug Aug 15, 2024
0e32041
[fbsync] Remove pre_build_script from windows conda build (#8590)
NicolasHug Aug 15, 2024
6b5ac41
[fbsync] Pin setuptools to 72.1.0 (#8592)
NicolasHug Aug 15, 2024
b1927a2
[fbsync] Remove numpy<2.0 windows pin (#8594)
NicolasHug Aug 15, 2024
6d790c7
[fbsync] Add webp decoder (#8527)
NicolasHug Aug 19, 2024
5471aa3
Further reduce torchvision decoder log spam.
huachenheli Aug 29, 2024
d9bdad0
[codemod][lowrisk] Remove unused exception parameter from pytorch/tex…
Sep 1, 2024
e2f88da
[fbsync] Cleanup video decoder build stuff (#8602)
NicolasHug Sep 2, 2024
d58b3e5
[fbsync] Add AVIF decoder (Part 1- this is not public or available ye…
NicolasHug Sep 2, 2024
140c1f9
[fbsync] Fix parameter name in docstring (#8605)
NicolasHug Sep 2, 2024
ffeb763
[fbsync] Add transparency support to webp decoder (#8610)
NicolasHug Sep 2, 2024
5d457b6
[fbsync] Fix link to v2.RGB in docs (#8611)
NicolasHug Sep 2, 2024
f39cb3b
[fbsync] Minor cleanup of webp decoding mode logic (#8612)
NicolasHug Sep 2, 2024
7176a8b
[fbsync] Add transparency and >8bits images support to AVIF decoder (…
NicolasHug Sep 2, 2024
7cf2ba5
[fbsync] Add HEIC decoder (#8597)
NicolasHug Sep 2, 2024
106fc31
[fbsync] Use Sequence for parameters type checking in transforms.Rand…
NicolasHug Sep 2, 2024
f15d1d3
[fbsync] Cleanup/refactor of decoders and related tests (#8617)
NicolasHug Sep 2, 2024
c141190
[fbsync] Remove unwanted printf in avif decoder (#8621)
NicolasHug Sep 2, 2024
71bafd6
[fbsync] Allow decode_image to support paths (#8624)
NicolasHug Sep 13, 2024
0dcd180
[fbsync] Allow decoding functions to accept the mode parameter as a s…
NicolasHug Sep 13, 2024
fe6948c
[fbsync] Fix f-string in color error message (#8639)
NicolasHug Sep 13, 2024
d8abd5f
[fbsync] Fix compile with nvjpeg on Windows CUDA 12 (#8641)
NicolasHug Sep 13, 2024
aacb3e4
[fbsync] Use @release/2.5 instead of @main for CI jobs (#8643)
NicolasHug Sep 13, 2024
9e5fd10
[fbsync] Revert "Use @release/2.5 instead of @main for CI jobs" (#8645)
NicolasHug Sep 13, 2024
bc7c11f
[fbsync] [Release 2.5] Update compatibility matrix (#8644)
NicolasHug Sep 13, 2024
0854585
[fbsync] Expose libavif and heic internally (#8647)
NicolasHug Sep 13, 2024
111971b
[CODEMOD][pytorch] replace uses of np.ndarray with npt.NDArray
igorsugak Oct 19, 2024
78052c8
[lint][codemod][fbcode/pytorch/vision] Applying CLANGFORMAT formatting
Oct 29, 2024
faf19ff
Backout D64619891 for torchvision
NicolasHug Jan 13, 2025
e116fa0
[fbsync] Enable xpu windows CD (#8656)
NicolasHug Jan 13, 2025
bb090da
[fbsync] Revamp decoding docs (#8633)
NicolasHug Jan 13, 2025
0f48706
[fbsync] Allow custom package name for CI builds of torchvision (#8659)
NicolasHug Jan 13, 2025
e7711ce
[fbsync] Expose `transforms.v2` utils for writing custom transforms. …
NicolasHug Jan 13, 2025
80d13df
[fbsync] Remove viable strict workflow (#8676)
NicolasHug Jan 13, 2025
57f6adb
[fbsync] Draft for better `write_video` documentation (#8576)
NicolasHug Jan 13, 2025
61e0390
[fbsync] Update stanford-cars docs with more elaborate instructions f…
NicolasHug Jan 13, 2025
c33e9af
[fbsync] Fix adjust_hue on ARM
NicolasHug Jan 13, 2025
f955c2d
[fbsync] Don't print when dataset is already downloaded (#8681)
NicolasHug Jan 13, 2025
62fa5ee
[fbsync] remove printing info in datasets (#8683)
NicolasHug Jan 13, 2025
edb427a
[fbsync] fix CUDA build with NVCC_FLAGS in env (#8692)
NicolasHug Jan 13, 2025
669b800
[fbsync] Add MovingMNIST to __all__ list in datasets (#8705)
NicolasHug Jan 13, 2025
42a027a
[fbsync] Fix memory leak in decode_webp (#8712)
NicolasHug Jan 13, 2025
cb4decc
[fbsync] Don't error when dataset is already downloaded (#8691)
NicolasHug Jan 13, 2025
dbe49d1
[fbsync] Warning for dataset download & extract race condition (#8709)
NicolasHug Jan 13, 2025
00d48ce
[fbsync] [MPS] Lift MSL version to 3.0+ and use relevant helpers (#8719)
NicolasHug Jan 13, 2025
cb7219b
[fbsync] Revert "Fix memory leak in decode_webp (#8712)" (#8723)
NicolasHug Jan 13, 2025
be227c6
[fbsync] Migrate towards linux_job_v2.yml (#8725)
NicolasHug Jan 13, 2025
030cc6c
[fbsync] Pin (and fix?) mypy (#8755)
NicolasHug Jan 13, 2025
d1a25e1
[fbsync] Update .gitignore (#8757)
NicolasHug Jan 13, 2025
9e326fd
[fbsync] Fix lsun link (#8758)
NicolasHug Jan 13, 2025
ddaa2dd
[fbsync] Fixed a bug in googlenet.py (#8743)
NicolasHug Jan 13, 2025
f665eb9
[fbsync] Fix warning raised by torch.meshgrid on missing indexing (#8…
NicolasHug Jan 13, 2025
4eb10cf
[fbsync] Fix error when loading the cached dataset (#8727)
NicolasHug Jan 13, 2025
db53dd1
[fbsync] Add `label_colors` argument to `draw_bounding_boxes` (#8578)
NicolasHug Jan 13, 2025
1a1185b
[fbsync] Update smoke_test.py - temporary disable torch.compile tests…
NicolasHug Jan 13, 2025
dd40041
[fbsync] __deepcopy__ for DualGraphModule (#8708)
NicolasHug Jan 13, 2025
7f4e6c2
[fbsync] Revert "Update smoke_test.py - temporary disable torch.compi…
NicolasHug Jan 13, 2025
fe2bfb3
[fbsync] Switch unit test back to Manylinux2014 (#8761)
NicolasHug Jan 13, 2025
faf4d10
[fbsync] Fix mypy (#8772)
NicolasHug Jan 13, 2025
749c72d
[fbsync] Reapply "Fix memory leak in decode_webp (#8712)" (#8723) (#8…
NicolasHug Jan 13, 2025
d5506ab
[fbsync] mypy again (#8774)
NicolasHug Jan 13, 2025
725409e
[fbsync] Fix pyav 14 error (#8776)
NicolasHug Jan 13, 2025
d5ad91d
[fbsync] Ignore mypy for maxvit (#8791)
NicolasHug Jan 13, 2025
8bfda1c
Revert D68022237: Multisect successfully blamed "D68022237: Backout D…
Jan 14, 2025
e8898bb
[fbsync] Make v2 transforms authoring public (#8787)
NicolasHug Jan 15, 2025
847c0ee
[fbsync] Bump version number in main (#8796)
NicolasHug Jan 15, 2025
1f2a98d
[fbsync] Migrate avif and heic decoders to torchvision-extra-decoders…
NicolasHug Jan 15, 2025
2bf8563
[fbsync] Fix doc of masks_to_boxes (#8798)
NicolasHug Jan 15, 2025
c107384
[fbsync] Revert "Switch unit test back to Manylinux2014" (#8821)
NicolasHug Jan 15, 2025
ad47246
[fbsync] fix: fix code block rendering problem in `Using models from …
NicolasHug Jan 15, 2025
8235835
[codemod] Fix signed shift error in caffe2/torch/fb/retrieval/fused_k…
r-barnes Apr 7, 2025
4904b9d
[Codemod][CppQualityCommon] Fix CQS signal performance-unnecessary-va…
May 20, 2025
333d0ef
[Codemod][CppQualityCommon] Fix CQS signal performance-unnecessary-va…
May 20, 2025
a83f4fa
[Codemod][CppQualityCommon] Fix CQS signal facebook-unused-include-ch…
May 23, 2025
2282bb3
[Codemod][CppQualityCommon] Fix CQS signal facebook-unused-include-ch…
Jun 2, 2025
0d39d72
[fbsync] Fix linux_job_v2 after https://github.com/pytorch/test-infra…
NicolasHug Jul 9, 2025
e349408
[fbsync] Fix linux_job_v2 after https://github.com/pytorch/test-infra…
NicolasHug Jul 9, 2025
686c9fd
[fbsync] Fix torch.compile smoke test include it for py 3.12, 3.13 (#…
NicolasHug Jul 9, 2025
e22f5d0
[fbsync] Update Requires-Python: >=3.9 (#8885)
NicolasHug Jul 9, 2025
e129109
[fbsync] Remove conda workflows and packaging scripts (#8890)
NicolasHug Jul 9, 2025
d9e4b4e
[fbsync] Add 3.13t wheel builds (#8898)
NicolasHug Jul 9, 2025
1e05c93
[fbsync] Revert "Add 3.13t wheel builds " (#8900)
NicolasHug Jul 9, 2025
d85450b
[fbsync] Clean up reference to VS2019 (#8901)
NicolasHug Jul 9, 2025
a27b6b9
[fbsync] Add `classes` to the `Flowers102` dataset (#8838)
NicolasHug Jul 9, 2025
5f1d1dd
[fbsync] Port vision to AIX (#8914)
NicolasHug Jul 9, 2025
d1fb549
[fbsync] fix saving versions on windows (#8792)
NicolasHug Jul 9, 2025
66615c0
[fbsync] feat: Raise ValueError for alpha > 1 in sigmoid_focal_loss (…
NicolasHug Jul 9, 2025
9322db8
[fbsync] Update mnist.py - change the order of mirror links (#8865)
NicolasHug Jul 9, 2025
8cd2ffc
[fbsync] Docs: fix docstring argument ordering in dataset module. (#8…
NicolasHug Jul 9, 2025
aa1f650
[racer] Remove unused import check_type in torchvision transforms v2 …
Jul 9, 2025
61a9047
[fbsync] Fix: fix wrong error message in `CelebA` datasets when inval…
NicolasHug Jul 11, 2025
f3baeff
[fbsync] Cleanup in `get_enum_from_fn` (#8852)
NicolasHug Jul 11, 2025
1409c00
[fbsync] Fix focal loss tests (#8920)
NicolasHug Jul 11, 2025
f5fce85
[fbsync] Add rotated bounding box formats (#8841)
NicolasHug Jul 11, 2025
66a6b7f
[Codemod][CppQualityCommon] Fix CQS signal readability-braces-around-…
Jul 24, 2025
f4ef379
[Codemod][CppQualityCommon] Fix CQS signal facebook-unused-include-ch…
Jul 24, 2025
960d94a
[fbsync] [ROCm][Windows] Fix compile torchvision image for ROCm (#8897)
NicolasHug Jul 28, 2025
c1a0ca2
[fbsync] Speed-up NMS by keeping index gathering on cuda device (#8766)
NicolasHug Jul 28, 2025
e4661ca
[fbsync] Fix: pin_memory() preserves TVTensor class and metadata (#8921)
NicolasHug Jul 28, 2025
f8f26dd
[fbsync] Fix non-rotated format to rotated format conversion logic (#…
NicolasHug Jul 28, 2025
ee7e66b
[fbsync] Encode jpeg cuda sync (#8929)
NicolasHug Jul 28, 2025
e1a4e0f
[fbsync] Docs: update `pycocotools` url in `CocoDetection` and `CocoC…
NicolasHug Jul 28, 2025
e3091ab
[fbsync] split NVCC_FLAGS but not quoted string (#8933)
NicolasHug Jul 28, 2025
e87042e
[fbsync] Fix lint (#8935)
NicolasHug Jul 28, 2025
a7b51c3
[fbsync] feat: expose loader argument in Country211 and EuroSAT. (#8922)
NicolasHug Jul 28, 2025
5a29a15
[fbsync] Added 'test' split support for Places365 dataset (#8928)
NicolasHug Jul 28, 2025
155b4ea
[fbsync] Add `roi_align` nondeterministic support for XPU (#8931)
NicolasHug Jul 28, 2025
d264b2c
[fbsync] Support specifying a torch range (#8936)
NicolasHug Jul 28, 2025
6856ee3
temporarily remove @manual to avoid conflict. Will put it back.
NicolasHug Jul 28, 2025
b27c87a
[fbsync] feats: add loader in classification task datasets. (#8939)
NicolasHug Jul 28, 2025
37dc114
[fbsync] Fix `RandomResizedCrop` `scale` & `ratio` argument. (#8944)
NicolasHug Jul 28, 2025
692c72f
[fbsync] Remove quiet option from pre_build_script. Install libjpeg-t…
NicolasHug Jul 28, 2025
8e5bfe4
[fbsync] Add an OS-independent script for updating the workflow files…
NicolasHug Jul 28, 2025
a524841
[fbsync] Disable Feature Extraction tests (#8964)
NicolasHug Jul 28, 2025
f6b375a
[fbsync] Ignore onnx tests (#8973)
NicolasHug Jul 28, 2025
16c7b61
[fbsync] Skip onnx AGAIN (#8974)
NicolasHug Jul 28, 2025
f8cba66
[fbsync] Disable onnx test job again (#8975)
NicolasHug Jul 28, 2025
cdd84da
[fbsync] Install torchvision-extra-decoders from nightly channel (#8963)
NicolasHug Jul 28, 2025
7778af8
[fbsync] Deactivate Windows GPU unittest job (#8978)
NicolasHug Jul 28, 2025
4d0b837
[fbsync] Disable M1 3.11 unittests (#8977)
NicolasHug Jul 28, 2025
d54a1e9
[fbsync] Skip libavif/libheic tests (#8976)
NicolasHug Jul 28, 2025
f4cdd87
[fbsync] Fix post-build-script (#8982)
NicolasHug Jul 28, 2025
252d810
[fbsync] Use brackets instead of parenthesis for interval (#8843)
NicolasHug Jul 28, 2025
18d3962
[fbsync] Clarify error message in ColorJitter (#8844)
NicolasHug Jul 28, 2025
a8d43da
[fbsync] Fix RAFT input dimension check (#8851)
NicolasHug Jul 28, 2025
a7077e0
[fbsync] Update threshold for batched NMS (#8925)
NicolasHug Jul 28, 2025
24c54fe
[fbsync] [SmokeTest] Test antialias on MPS device (#8996)
NicolasHug Jul 28, 2025
5cd0cd2
[fbsync] Ensure fps is integer before passing to av backend (#8991)
NicolasHug Jul 28, 2025
8ee148c
[fbsync] Deactivate clang format (#8998)
NicolasHug Jul 28, 2025
adba86b
[fbsync] Deprecate video decoding and encoding (#8997)
NicolasHug Jul 28, 2025
20b7a7a
[fbsync] Deactivate bc linter (#8999)
NicolasHug Jul 28, 2025
fecad52
[fbsync] fix: Add type checking in `posterize_image`. (#8993)
NicolasHug Jul 28, 2025
3fe26f8
[fbsync] fix: Raise error when receive non-positive value in `RandAug…
NicolasHug Jul 28, 2025
7798b29
[fbsync] fix: forbid bool value from `JPEG`'s quality argument type. …
NicolasHug Jul 28, 2025
83f5a3b
[fbsync] fix: add appropriate error message when validating padding a…
NicolasHug Jul 28, 2025
8bea304
TorchVision sync: datasets
NicolasHug Jul 29, 2025
58fe298
TorchVision sync: prototype
NicolasHug Jul 29, 2025
fd7142c
TorchVision sync: models
NicolasHug Jul 29, 2025
1d3523f
TorchVision sync: transforms
NicolasHug Jul 29, 2025
c107971
TorchVision sync: extension.py
NicolasHug Jul 29, 2025
9340884
TorchVision sync: __init__.py
NicolasHug Jul 29, 2025
62af02b
TorchVision sync: io
NicolasHug Jul 29, 2025
8c76f9c
TorchVision sync: tests
NicolasHug Jul 29, 2025
5bd1f55
[pytorch] Fix compiling using fbgemm
Nicoshev Jul 29, 2025
74b5c07
Fix torchscript issue in torchvision video decoder
NicolasHug Jul 30, 2025
025e923
[fbsync] feat: expose `loader` parameter in `FlowDataset` type, excep…
NicolasHug Jul 30, 2025
cd48fae
[fbsync] feat: add loader to `Omniglot` and `INaturalist`'s argument.…
NicolasHug Jul 30, 2025
b79a1fb
[fbsync] A temporary fix to windows unittests failing in `INaturalist…
NicolasHug Jul 30, 2025
c066fe9
[fbsync] Remove stanford cars download instructions (#9012)
NicolasHug Jul 30, 2025
ad43376
[fbsync] [docs] correct docs of `decode_heic` (#9014)
NicolasHug Jul 30, 2025
7073106
[fbsync] Put back docs of decode_png (#9015)
NicolasHug Jul 30, 2025
20f59c7
[fbsync] Fix rotated box format conversion from XYXYXYXY to XYWHR (#9…
NicolasHug Jul 30, 2025
528e890
[fbsync] Add label background (#9018)
NicolasHug Jul 30, 2025
d683507
[fbsync] [Manylinux_2_28] Modify relocate script for linux builds: fi…
NicolasHug Jul 30, 2025
a1885b7
[fbsync] [Build] Add `homebrew` as library search location (#9027)
NicolasHug Jul 30, 2025
1179e6a
[fbsync] Revert "[Manylinux_2_28] Modify relocate script for linux bu…
NicolasHug Jul 30, 2025
0c70082
[fbsync] Upgrade type hint and others to Python 3.9 (#8814)
NicolasHug Jul 30, 2025
b6ed5f7
[fbsync] Update .git-blame-ignore-revs (#9035)
NicolasHug Jul 30, 2025
0703c9b
[fbsync] Fix Linux aarch64 nightly builds. Set with-cuda: enabled (#9…
NicolasHug Jul 30, 2025
a544d60
[fbsync] Add dependency installation script for windows arm64 builds …
NicolasHug Jul 30, 2025
9b2d2f0
[fbsync] fix anti-pattern for cudagraph (#9081)
NicolasHug Jul 30, 2025
7646c79
[fbsync] Display libpng version in setup (#9087)
NicolasHug Jul 30, 2025
90e3ea6
[fbsync] Revert "fix anti-pattern for cudagraph (#9081)" (#9088)
NicolasHug Jul 30, 2025
ec0cf3e
[fbsync] Removing Conda references. (#9063)
NicolasHug Jul 30, 2025
b1d4771
[fbsync] Update docstrings of MaskRCNN (#9083)
NicolasHug Jul 30, 2025
d773ed9
[fbsync] Raise error when download=True for LFW dataset #8888 (#9040)
NicolasHug Jul 30, 2025
c8b0bdb
[fbsync] Update version to 0.23.0 in nightly (#9089)
NicolasHug Jul 30, 2025
c005dd2
[fbsync] Fix mypy (#9093)
NicolasHug Jul 30, 2025
edb2e0d
[fbsync] Rotated bboxes transforms (#9084)
NicolasHug Jul 30, 2025
e813d46
[fbsync] More rotated bboxes transforms (#9095)
NicolasHug Jul 30, 2025
90d0ff0
[fbsync] Warn when webp is asked to decode into grayscale (#9101)
NicolasHug Jul 30, 2025
652d1c5
[fbsync] Added the KeyPoints TVTensor (#8817)
NicolasHug Jul 30, 2025
6507ea7
[fbsync] Update transforms.rst (#9105)
NicolasHug Jul 30, 2025
bd848d8
[fbsync] [docs] Clarify pad/crop order in RandomCrop (#9106)
NicolasHug Jul 30, 2025
a061504
[fbsync] Rotated bboxes transforms (#9104)
NicolasHug Jul 30, 2025
29a22bf
[fbsync] [MPS] deformable conv2d kernel (#9017)
NicolasHug Jul 30, 2025
5277885
[fbsync] Add default info dictionary to dataset (#9107)
NicolasHug Jul 30, 2025
d21001e
[fbsync] Undo part of #9017 (#9115)
NicolasHug Jul 30, 2025
db386ac
[fbsync] Use 12.6 instead of deprecated 11.8 (#9117)
NicolasHug Jul 30, 2025
622dd23
[fbsync] Add error message when setting 1D tensor `ToImage()` (#9114)
NicolasHug Jul 30, 2025
bf4ad2e
[fbsync] Add libwebp to contributing doc (#9119)
NicolasHug Jul 30, 2025
30c19f7
[fbsync] [CI] Restore MacOS test sanity (#9120)
NicolasHug Jul 30, 2025
d413043
[fbsync] Arm64 workflow enablement (#8947)
NicolasHug Jul 30, 2025
e7f123d
[fbsync] Allow users to choose the bbox clamping mode (#9128)
NicolasHug Jul 30, 2025
889df44
[fbsync] fix: typo in fakedata.py (#9131)
NicolasHug Jul 30, 2025
6b9d876
[fbsync] Adjust clamping for rotated bboxes (#9112)
NicolasHug Jul 31, 2025
c10a223
[fbsync] clamping_mode: Rename 'none' to None and None to 'auto' (#9132)
NicolasHug Jul 31, 2025
5eb6c3b
[fbsync] Enforce PIL < 11.3 (#9134)
NicolasHug Jul 31, 2025
e79879b
[fbsync] Disable integer dtype for rotated bounding boxes (#9133)
NicolasHug Jul 31, 2025
6ee7687
[fbsync] Validate clamping_mode values (#9136)
NicolasHug Jul 31, 2025
c951470
[fbsync] Fix `_ImageDrawTV` (#9137)
NicolasHug Jul 31, 2025
eae63a0
[fbsync] Update version to 0.24.0a0 (#9139)
NicolasHug Jul 31, 2025
fba9648
[fbsync] Document semantics of bounding box formats (#9141)
NicolasHug Jul 31, 2025
f7d068e
[fbsync] Skeleton for rotated bounding box tutorial (#9140)
NicolasHug Jul 31, 2025
8f027df
[fbsync] Update docs to mention rotated boxes and keypoints (#9113)
NicolasHug Jul 31, 2025
2380d2d
[fbsync] Add more rotated boxes docs (#9144)
NicolasHug Jul 31, 2025
1b05f31
[fbsync] Mitigate PIL Image.fromarray() mode deprecation (#9150)
NicolasHug Jul 31, 2025
1f47f47
Merge remote-tracking branch 'origin/fbsync' into syncccc
NicolasHug Jul 31, 2025
86c6c15
restore .clang-format
NicolasHug Jul 31, 2025
045ed65
fix flake8
NicolasHug Jul 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/cpp/run_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main(int argc, const char* argv[]) {
// Deserialize the ScriptModule from a file using torch::jit::load().
model = torch::jit::load(argv[1]);
std::cout << "Model loaded\n";
} catch (const torch::Error& e) {
} catch (const torch::Error&) {
std::cout << "error loading the model.\n";
return -1;
} catch (const std::exception& e) {
Expand Down
4 changes: 2 additions & 2 deletions ios/VisionTestApp/VisionTestApp/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@interface AppDelegate : UIResponder<UIApplicationDelegate>

@property(strong, nonatomic) UIWindow *window;
@property(strong, nonatomic) UIWindow* window;

@end
2 changes: 1 addition & 1 deletion ios/VisionTestApp/VisionTestApp/ModelRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NS_ASSUME_NONNULL_BEGIN

@interface ModelRunner : NSObject

+ (NSString* )run;
+ (NSString*)run;
+ (BOOL)setUp;

@end
Expand Down
1 change: 0 additions & 1 deletion ios/VisionTestApp/VisionTestApp/ViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@

@interface ViewController : UIViewController


@end
4 changes: 2 additions & 2 deletions references/depth/stereo/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from typing import List, Union

import numpy as np
import numpy.typing as npt
import torch
import torch.distributed as dist
import torchvision.models.optical_flow
Expand Down Expand Up @@ -33,7 +33,7 @@ def make_stereo_flow(flow: Union[torch.Tensor, List[torch.Tensor]], model_out_ch
return flow


def make_lr_schedule(args: argparse.Namespace, optimizer: torch.optim.Optimizer) -> np.ndarray:
def make_lr_schedule(args: argparse.Namespace, optimizer: torch.optim.Optimizer) -> npt.NDArray:
"""Helper function to return a learning rate scheduler for CRE-stereo"""
if args.decay_after_steps < args.warmup_steps:
raise ValueError(f"decay_after_steps: {args.function} must be greater than warmup_steps: {args.warmup_steps}")
Expand Down
5 changes: 3 additions & 2 deletions references/depth/stereo/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import List

import numpy as np
import numpy.typing as npt
import torch
from torch import Tensor
from torchvision.utils import make_grid
Expand Down Expand Up @@ -64,7 +65,7 @@ def make_training_sample_grid(
disparities: Tensor,
masks: Tensor,
predictions: List[Tensor],
) -> np.ndarray:
) -> npt.NDArray:
# detach images and renormalize to [0, 1]
images_left = left_images.detach().cpu() * 0.5 + 0.5
images_right = right_images.detach().cpu() * 0.5 + 0.5
Expand All @@ -84,7 +85,7 @@ def make_training_sample_grid(


@torch.no_grad()
def make_disparity_sequence_grid(predictions: List[Tensor], disparities: Tensor) -> np.ndarray:
def make_disparity_sequence_grid(predictions: List[Tensor], disparities: Tensor) -> npt.NDArray:
# right most we will be adding the ground truth
seq_len = len(predictions) + 1
predictions = list(map(lambda x: x[:, :1, :, :].detach().cpu(), predictions + [disparities]))
Expand Down
29 changes: 18 additions & 11 deletions test/cpp/test_custom_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

TEST(test_custom_operators, nms) {
// make sure that the torchvision ops are visible to the jit interpreter
auto& ops = torch::jit::getAllOperatorsFor(torch::jit::Symbol::fromQualString("torchvision::nms"));
auto& ops = torch::jit::getAllOperatorsFor(
torch::jit::Symbol::fromQualString("torchvision::nms"));
ASSERT_EQ(ops.size(), 1);

auto& op = ops.front();
Expand All @@ -24,29 +25,35 @@ TEST(test_custom_operators, nms) {

at::Tensor output = vision::ops::nms(boxes, scores, thresh);
ASSERT_TRUE(output_jit.allclose(output));

}

TEST(test_custom_operators, roi_align_visible) {
// make sure that the torchvision ops are visible to the jit interpreter even if
// not explicitly included
auto& ops = torch::jit::getAllOperatorsFor(torch::jit::Symbol::fromQualString("torchvision::roi_align"));
// make sure that the torchvision ops are visible to the jit interpreter even
// if not explicitly included
auto& ops = torch::jit::getAllOperatorsFor(
torch::jit::Symbol::fromQualString("torchvision::roi_align"));
ASSERT_EQ(ops.size(), 1);

auto& op = ops.front();
ASSERT_EQ(op->schema().name(), "torchvision::roi_align");

torch::jit::Stack stack;
float roi_data[] = {
0., 0., 0., 5., 5.,
0., 5., 5., 10., 10.
};
at::Tensor input = at::rand({1, 2, 10, 10}), rois = at::from_blob(roi_data, {2, 5});
float roi_data[] = {0., 0., 0., 5., 5., 0., 5., 5., 10., 10.};
at::Tensor input = at::rand({1, 2, 10, 10}),
rois = at::from_blob(roi_data, {2, 5});
double spatial_scale = 1.0;
int64_t pooled_height = 3, pooled_width = 3, sampling_ratio = -1;
bool aligned = true;

torch::jit::push(stack, input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned);
torch::jit::push(
stack,
input,
rois,
spatial_scale,
pooled_height,
pooled_width,
sampling_ratio,
aligned);
op->getOperation()(stack);
at::Tensor output_jit;
torch::jit::pop(stack, output_jit);
Expand Down
1 change: 0 additions & 1 deletion torchvision/csrc/io/decoder/audio_stream.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "audio_stream.h"
#include <c10/util/Logging.h>
#include <limits>
#include "util.h"

namespace ffmpeg {
Expand Down
78 changes: 71 additions & 7 deletions torchvision/csrc/io/decoder/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ bool Decoder::init(
return false;
}

avioCtx_->max_packet_size = params.maxEncodedBufferSize;

inputCtx_->pb = avioCtx_;
inputCtx_->flags |= AVFMT_FLAG_CUSTOM_IO;
}
Expand Down Expand Up @@ -382,7 +384,30 @@ bool Decoder::init(
av_seek_frame(inputCtx_, -1, offset, AVSEEK_FLAG_BACKWARD);
}

for (unsigned int i = 0; i < inputCtx_->nb_streams; i++) {
if (
#if LIBAVUTIL_VERSION_MAJOR < 56 // Before FFMPEG 4.0
inputCtx_->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO
#else // FFMPEG 4.0+
inputCtx_->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO
#endif
&& inputCtx_->streams[i]->duration > 0) {
// There is at least two 1/r_frame_rates from the frame before the last
// one until the video duration, let's prefer to set duration after the
// frame before the last one, but as early as possible
double correction = 2 * inputCtx_->streams[i]->r_frame_rate.den /
(double)inputCtx_->streams[i]->r_frame_rate.num -
1 / (double)AV_TIME_BASE;
videoDurationMs_ = 1000 * inputCtx_->streams[i]->duration *
inputCtx_->streams[i]->time_base.num /
(double)inputCtx_->streams[i]->time_base.den -
1000 * correction;
break;
}
}

VLOG(1) << "Decoder initialized, log level: " << params_.logLevel;
VLOG(1) << "Video duration: " << videoDurationMs_;
return true;
}

Expand Down Expand Up @@ -590,13 +615,30 @@ int Decoder::getFrame(size_t workingTimeInMs) {
result = 0;

av_packet_unref(avPacket);

if (params_.uniformSampling > 1) {
if (doSeek_) {
double duration =
videoDurationMs_ > 0 ? videoDurationMs_ : params_.expectedDuration;
double step =
(duration * AV_TIME_BASE) / (1000 * (params_.uniformSampling - 1));
avformat_seek_file(
inputCtx_,
-1,
static_cast<int64_t>(step * kFramesDecoded_) + 1,
static_cast<int64_t>(step * (kFramesDecoded_ + 1)),
static_cast<int64_t>(step * (kFramesDecoded_ + 1)),
0);
++kFramesDecoded_;
doSeek_ = false;
}
}
}

av_packet_free(&avPacket);
VLOG(2) << "Interrupted loop"
<< ", interrupted_ " << interrupted_ << ", inRange_.any() "
<< inRange_.any() << ", decodedFrame " << decodedFrame << ", result "
<< result;
VLOG(2) << "Interrupted loop" << ", interrupted_ " << interrupted_
<< ", inRange_.any() " << inRange_.any() << ", decodedFrame "
<< decodedFrame << ", result " << result;

// loop can be terminated, either by:
// 1. explicitly interrupted
Expand Down Expand Up @@ -660,13 +702,35 @@ int Decoder::processPacket(
startCondition = msg.header.pts >= params_.startOffset;
}
if (endInRange && startCondition) {
*hasMsg = true;
push(std::move(msg));
*hasMsg = pushMsg(std::move(msg));
}
}
return result;
}

bool Decoder::pushMsg(DecoderOutputMessage&& msg) {
pastDecodedPTS_ = currentDecodedPTS_;
currentDecodedPTS_ = msg.header.pts;

if (params_.uniformSampling <= 1) {
push(std::move(msg));
return true;
}

double duration =
videoDurationMs_ > 0 ? videoDurationMs_ : params_.expectedDuration;
double step =
(duration * AV_TIME_BASE) / (1000 * (params_.uniformSampling - 1));
if (pastDecodedPTS_ < step * kFramesDecoded_ &&
step * kFramesDecoded_ <= currentDecodedPTS_) {
push(std::move(msg));
doSeek_ = true;
return true;
}

return false;
}

void Decoder::flushStreams() {
VLOG(1) << "Flushing streams...";
for (auto& stream : streams_) {
Expand All @@ -678,7 +742,7 @@ void Decoder::flushStreams() {
params_.endOffset <= 0 || msg.header.pts <= params_.endOffset;
inRange_.set(stream.second->getIndex(), endInRange);
if (endInRange && msg.header.pts >= params_.startOffset) {
push(std::move(msg));
pushMsg(std::move(msg));
} else {
msg.payload.reset();
}
Expand Down
7 changes: 7 additions & 0 deletions torchvision/csrc/io/decoder/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Decoder : public MediaDecoder {
int* getPrintPrefix() {
return &printPrefix;
}
double videoDurationMs_ = -1;

private:
// mark below function for a proper invocation
Expand All @@ -76,6 +77,8 @@ class Decoder : public MediaDecoder {
bool fastSeek = false);
void flushStreams();
void cleanUp();
bool pushMsg(DecoderOutputMessage&&
msg); // returns whether frame is passed to downstream

protected:
DecoderParameters params_;
Expand All @@ -89,5 +92,9 @@ class Decoder : public MediaDecoder {
AVIOContext* avioCtx_{nullptr};
std::unordered_map<ssize_t, std::unique_ptr<Stream>> streams_;
std::bitset<64> inRange_;
int kFramesDecoded_{0};
int64_t pastDecodedPTS_{-1};
int64_t currentDecodedPTS_{-1};
bool doSeek_{false};
};
} // namespace ffmpeg
11 changes: 11 additions & 0 deletions torchvision/csrc/io/decoder/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,17 @@ struct DecoderParameters {
// it is dispersed into the stream, but will increase latency. Must be an
// integer not lesser than 32. It is 5000000 by default.
int64_t probeSize{5000000};

// Expected duration of the video to be decoded, mainly used with uniform
// sampling
float expectedDuration{0.0f};

// Sample N key-frames from the video roughly uniformly across the timeline
int uniformSampling{0};

// with 0, ffmpeg allocates buffers of size 32768 bytes for encoded frames.
// Override this with bigger buffer size if needed.
int64_t maxEncodedBufferSize{0};
};

struct DecoderHeader {
Expand Down
4 changes: 2 additions & 2 deletions torchvision/csrc/io/decoder/gpu/gpu_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ void GPUDecoder::seek(double timestamp, bool keyframes_only) {
demuxer.seek(timestamp, flag);
}

c10::Dict<std::string, c10::Dict<std::string, double>> GPUDecoder::
get_metadata() const {
c10::Dict<std::string, c10::Dict<std::string, double>>
GPUDecoder::get_metadata() const {
c10::Dict<std::string, c10::Dict<std::string, double>> metadata;
c10::Dict<std::string, double> video_metadata;
video_metadata.insert("duration", demuxer.get_duration());
Expand Down
2 changes: 1 addition & 1 deletion torchvision/csrc/io/decoder/memory_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DecoderInCallback MemoryBuffer::getCallback(
MemoryBuffer object(buffer, size);
return
[object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable
-> int {
-> int {
if (out) { // see defs.h file
// read mode
return object.read(out, size);
Expand Down
1 change: 0 additions & 1 deletion torchvision/csrc/io/decoder/stream.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "stream.h"
#include <c10/util/Logging.h>
#include <stdio.h>
#include <string.h>
#include "util.h"

Expand Down
1 change: 0 additions & 1 deletion torchvision/csrc/io/decoder/subtitle_stream.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "subtitle_stream.h"
#include <c10/util/Logging.h>
#include <limits>
#include "util.h"

namespace ffmpeg {
Expand Down
13 changes: 6 additions & 7 deletions torchvision/csrc/io/decoder/sync_decoder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ void runDecoder(SyncDecoder& decoder) {
AVSubtitle sub;
memset(&sub, 0, sizeof(sub));
EXPECT_TRUE(Util::deserialize(*out.payload, &sub));
LOG(INFO) << "Found subtitles"
<< ", num rects: " << sub.num_rects;
LOG(INFO) << "Found subtitles" << ", num rects: " << sub.num_rects;
for (int i = 0; i < sub.num_rects; ++i) {
std::string text = "picture";
if (sub.rects[i]->type == SUBTITLE_TEXT) {
Expand Down Expand Up @@ -210,9 +209,9 @@ TEST(SyncDecoder, TestSyncDecoderPerformance) {
auto new8x8 = measurePerformanceUs(stats, kRounds, 8, 8);
auto new16x8 = measurePerformanceUs(stats, kRounds, 16, 8);
auto new32x4 = measurePerformanceUs(stats, kRounds, 32, 4);
LOG(INFO) << "Clip decoding (us)"
<< ", new(4x2): " << new4x2 << ", new(8x8): " << new8x8
<< ", new(16x8): " << new16x8 << ", new(32x4): " << new32x4;
LOG(INFO) << "Clip decoding (us)" << ", new(4x2): " << new4x2
<< ", new(8x8): " << new8x8 << ", new(16x8): " << new16x8
<< ", new(32x4): " << new32x4;
}

TEST(SyncDecoder, Test) {
Expand Down Expand Up @@ -361,7 +360,7 @@ TEST(SyncDecoder, TestMemoryBufferNoSeekableWithFullRead) {
CHECK(decoder.init(
params,
[object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable
-> int {
-> int {
if (out) { // see defs.h file
// read mode
return object.read(out, size);
Expand Down Expand Up @@ -401,7 +400,7 @@ TEST(SyncDecoder, TestMemoryBufferNoSeekableWithPartialRead) {
CHECK(!decoder.init(
params,
[object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable
-> int {
-> int {
if (out) { // see defs.h file
// read mode
return object.read(out, size);
Expand Down
Loading
Loading