1. 02 Jul, 2020 1 commit
    • Edgar Andrés Margffoy Tuay's avatar
      PR: Enable libPNG support (#2379) · c1a99b7b
      Edgar Andrés Margffoy Tuay authored
      
      
      * Add libpng requirement into conda recipe
      
      * Try to install libjpeg-turbo
      
      * Add PNG reading capabilities
      
      * Remove newline
      
      * Add image extension to compilation instructions
      
      * Include png functions as part of the main library
      
      * Update CMakeLists
      
      * Detect if building on conda-build
      
      * Debug
      
      * More debug messages
      
      * Print globbed libreries
      
      * Print globbed libreries
      
      * Point to correct PNG path
      
      * Remove libJPEG preventively
      
      * Debug extension loading
      
      * Link libpng explicitly
      
      * Link with PNG
      
      * Add PNG reading capabilities
      
      * Add libpng requirement into conda recipe
      
      * Try to install libjpeg-turbo
      
      * Remove newline
      
      * Add image extension to compilation instructions
      
      * Include png functions as part of the main library
      
      * Update CMakeLists
      
      * Detect if building on conda-build
      
      * Debug
      
      * More debug messages
      
      * Print globbed libreries
      
      * Print globbed libreries
      
      * Point to correct PNG path
      
      * Remove libJPEG preventively
      
      * Debug extension loading
      
      * Link libpng explicitly
      
      * Link with PNG
      
      * Install libpng on conda-based wheel distributions
      
      * Add -y flag
      
      * Add -y flag to yum
      
      * Locate LibPNG on windows conda
      
      * Remove empty else
      
      * Copy libpng16.so
      
      * Copy dylib on Mac
      
      * Improve check on Windows
      
      * Try to install ninja using conda on windows
      
      * Use libpng on Windows
      
      * Package lib on windows wheel
      
      * Point library to the correct place
      
      * Include binaries as part of wheel
      
      * Copy libpng.so on linux
      
      * Look for png.h on Windows when using conda-build
      
      * Do not skip png tests on Mac/Win
      
      * Restore libjpeg-turbo
      
      * Install jpeg-turbo on wheel distributions
      
      * Install libjpeg-turbo from conda-forge on wheel distributions
      
      * Do not pull av on conda-build
      
      * Add pillow disclaimer
      
      * Vendors libjpeg-turbo 2.0.4
      
      * Merge JPEG work
      
      * Remove submodules
      
      * Regenerate circle config
      
      * Fix style issues
      
      * Fix C++ style issues
      
      * More style corrections
      
      * Add JPEG-turbo to linking libraries
      
      * More style corrections
      
      * More style corrections
      
      * More style corrections
      
      * Install libjpeg-turbo-devel
      
      * Install libturbo-jpeg on typing pipeline
      
      * Update Circle template
      
      * Windows and Unix turbojpeg have the same linking name
      
      * Install turbojpeg-devel instead of libjpeg-turbo
      
      * Copy TurboJPEG binaries to wheel
      
      * Move test image
      
      * Move back test image
      
      * Update JPEG test path
      
      * Remove dot from extension
      
      * Move image functions to extension
      
      * Use stdout arg in subprocess
      
      * Disable image extension if libpng or turbojpeg are not found
      
      * Append libpng stdout
      
      * Prevent list appending on lists
      
      * Minor path correction
      
      * Minor error correction
      
      * Add linking flags
      
      * Style issues correction
      
      * Address minor review corrections
      
      * Refactor library search
      
      * Restore access index
      
      * Fix JPEG tests
      
      * Update libpng version in Travis
      
      * Add -y flag
      
      * Remove dot
      
      * Update libpng using apt
      
      * Check libpng version
      
      * Change libturbojpeg binary
      
      * Update import
      
      * Change call
      
      * Restore av in conda recipe
      
      * Minor error correction
      
      * Remove unused comment in travis.yml
      
      * Update README
      
      * Fix missing links
      
      * Remove fixes for 16.04
      
      * Remove JPEG-related code
      
      * Remove installation references to turbojpeg
      
      * Remove further references to turbojpeg
      
      * Fix c++ style issues
      
      * Fix c++ style issues
      
      * Fix libpng-config include flag parsing
      
      * Remove conda-forge
      
      * Remove include dirs from main extension
      
      * Do not pass extra include and library paths to main torchvision extension
      
      * Add libpng to environment.yml
      
      * Remove inexistent imports
      
      * Add instructions regarding environment variables to README
      Co-authored-by: default avatarRyad ZENINE <r.zenine@gmail.com>
      c1a99b7b
  2. 01 Jul, 2020 1 commit
  3. 30 Jun, 2020 1 commit
    • Edgar Andrés Margffoy Tuay's avatar
      PR: Add libpng and libjpeg-turbo requirement into conda recipe (#2301) · 766721b1
      Edgar Andrés Margffoy Tuay authored
      
      
      * Add libpng requirement into conda recipe
      
      * Try to install libjpeg-turbo
      
      * Add PNG reading capabilities
      
      * Remove newline
      
      * Add image extension to compilation instructions
      
      * Include png functions as part of the main library
      
      * Update CMakeLists
      
      * Detect if building on conda-build
      
      * Debug
      
      * More debug messages
      
      * Print globbed libreries
      
      * Print globbed libreries
      
      * Point to correct PNG path
      
      * Remove libJPEG preventively
      
      * Debug extension loading
      
      * Link libpng explicitly
      
      * Link with PNG
      
      * Add PNG reading capabilities
      
      * Add libpng requirement into conda recipe
      
      * Try to install libjpeg-turbo
      
      * Remove newline
      
      * Add image extension to compilation instructions
      
      * Include png functions as part of the main library
      
      * Update CMakeLists
      
      * Detect if building on conda-build
      
      * Debug
      
      * More debug messages
      
      * Print globbed libreries
      
      * Print globbed libreries
      
      * Point to correct PNG path
      
      * Remove libJPEG preventively
      
      * Debug extension loading
      
      * Link libpng explicitly
      
      * Link with PNG
      
      * Install libpng on conda-based wheel distributions
      
      * Add -y flag
      
      * Add -y flag to yum
      
      * Locate LibPNG on windows conda
      
      * Remove empty else
      
      * Copy libpng16.so
      
      * Copy dylib on Mac
      
      * Improve check on Windows
      
      * Try to install ninja using conda on windows
      
      * Use libpng on Windows
      
      * Package lib on windows wheel
      
      * Point library to the correct place
      
      * Include binaries as part of wheel
      
      * Copy libpng.so on linux
      
      * Look for png.h on Windows when using conda-build
      
      * Do not skip png tests on Mac/Win
      
      * Restore libjpeg-turbo
      
      * Install jpeg-turbo on wheel distributions
      
      * Install libjpeg-turbo from conda-forge on wheel distributions
      
      * Do not pull av on conda-build
      
      * Add pillow disclaimer
      
      * Vendors libjpeg-turbo 2.0.4
      
      * Merge JPEG work
      
      * Remove submodules
      
      * Regenerate circle config
      
      * Fix style issues
      
      * Fix C++ style issues
      
      * More style corrections
      
      * Add JPEG-turbo to linking libraries
      
      * More style corrections
      
      * More style corrections
      
      * More style corrections
      
      * Install libjpeg-turbo-devel
      
      * Install libturbo-jpeg on typing pipeline
      
      * Update Circle template
      
      * Windows and Unix turbojpeg have the same linking name
      
      * Install turbojpeg-devel instead of libjpeg-turbo
      
      * Copy TurboJPEG binaries to wheel
      
      * Move test image
      
      * Move back test image
      
      * Update JPEG test path
      
      * Remove dot from extension
      
      * Move image functions to extension
      
      * Use stdout arg in subprocess
      
      * Disable image extension if libpng or turbojpeg are not found
      
      * Append libpng stdout
      
      * Prevent list appending on lists
      
      * Minor path correction
      
      * Minor error correction
      
      * Add linking flags
      
      * Style issues correction
      
      * Address minor review corrections
      
      * Refactor library search
      
      * Restore access index
      
      * Fix JPEG tests
      
      * Update libpng version in Travis
      
      * Add -y flag
      
      * Remove dot
      
      * Update libpng using apt
      
      * Check libpng version
      
      * Change libturbojpeg binary
      
      * Update import
      
      * Change call
      
      * Restore av in conda recipe
      
      * Minor error correction
      
      * Remove unused comment in travis.yml
      
      * Update README
      
      * Fix missing links
      
      * Remove fixes for 16.04
      Co-authored-by: default avatarRyad ZENINE <r.zenine@gmail.com>
      766721b1
  4. 22 Jun, 2020 2 commits
  5. 29 May, 2020 1 commit
  6. 19 May, 2020 1 commit
  7. 18 May, 2020 1 commit
  8. 14 May, 2020 1 commit
  9. 11 May, 2020 1 commit
    • Philip Meier's avatar
      Add static type check with mypy (#2195) · a81d99b7
      Philip Meier authored
      * add mypy config
      
      * fix syntax error
      
      * fix annotations in torchvision/utils.py
      
      * add mypy type check to CircleCI
      
      * add mypy cache to ignore files
      
      * try fix CI
      
      * ignore flake8 F821 since it interferes with mypy
      
      * add mypy type check to config generator
      
      * explicitly set config files
      a81d99b7
  10. 09 Apr, 2020 1 commit
  11. 17 Mar, 2020 2 commits
    • NVS Abhilash's avatar
      7a36388c
    • Francisco Massa's avatar
      Update video reader to use new decoder (#1978) · 32e16805
      Francisco Massa authored
      * Base decoder for video. (#1747)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1747
      
      Pull Request resolved: https://github.com/pytorch/vision/pull/1746
      
      Added the implementation of ffmpeg based decoder with functionality that can be used in VUE and TorchVision.
      
      Reviewed By: fmassa
      
      Differential Revision: D19358914
      
      fbshipit-source-id: abb672f89bfaca6351dda2354f0d35cf8e47fa0f
      
      * Integrated base decoder into VideoReader class and video_utils.py (#1766)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1766
      
      Replaced FfmpegDecoder (incompativle with VUE) by base decoder (compatible with VUE).
      Modified python utilities video_utils.py for internal simplification. Public interface got preserved.
      
      Reviewed By: fmassa
      
      Differential Revision: D19415903
      
      fbshipit-source-id: 4d7a0158bd77bac0a18732fe4183fdd9a57f6402
      
      * Optimizating base decoder performance. (#1852)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1852
      
      Changed base decoder internals for a faster clip processing.
      
      Reviewed By: stephenyan1231
      
      Differential Revision: D19748379
      
      fbshipit-source-id: 58a435f0a0b25545e7bd1a3edb0b1d558176a806
      
      * Minor fix and decoder class members access.
      
      Summary:
      Found and fix a bug in cropping algorithm (simple mistyping).
      Also derived classes need access to some decoder class members, like initialization parameters - make it protected.
      
      Reviewed By: stephenyan1231, fmassa
      
      Differential Revision: D19895076
      
      fbshipit-source-id: 691336c8e18526b085ae5792ac3546bc387a6db9
      
      * Added missing header for less dependencies. (#1898)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1898
      
      Include streams/samplers shouldn't depend on decoder headers. Add dependencies directly to the place where they are required.
      
      Reviewed By: stephenyan1231
      
      Differential Revision: D19911404
      
      fbshipit-source-id: ef322a053708405c02cee4562b456b1602fb12fc
      
      * Implemented VUE Asynchronous Decoder
      
      Summary: For Mothership we have found that asynchronous decoder provides a better performance.
      
      Differential Revision: D20026194
      
      fbshipit-source-id: 627b91844b4e3f917002031dd32cb19c239f4ba8
      
      * fix a bug in API read_video_from_memory (#1942)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1942
      
      In D18720474, it introduces a bug in `read_video_from_memory` API. Thank weiyaowang for reporting it.
      
      Reviewed By: weiyaowang
      
      Differential Revision: D20270179
      
      fbshipit-source-id: 66348c99a5ad1f9129b90e934524ddfaad59de03
      
      * extend decoder to support new video_max_dimension argument (#1924)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1924
      
      Extend `video reader` decoder python API in Torchvision to support a new argument `video_max_dimension`. This enables the new video decoding use cases. When setting `video_width=0`, `video_height=0`, `video_min_dimension != 0`, and `video_max_dimension != 0`, we can rescale the video clips so that its spatial resolution (height, width) becomes
       - (video_min_dimension, video_max_dimension) if original height < original width
       - (video_max_dimension, video_min_dimension) if original height >= original width
      
      This is useful at video model testing stage, where we perform fully convolution evaluation and take entire video frames without cropping as input. Previously, for instance we can only set `video_width=0`, `video_height=0`, `video_min_dimension = 128`, which will preserve aspect ratio. In production dataset, there are a small number of videos where aspect ratio is either extremely large or small, and when the shorter edge is rescaled to 128, the longer edge is still large. This will easily cause GPU memory OOM when we sample multiple video clips, and put them in a single minibatch.
      
      Now, we can set (for instance) `video_width=0`, `video_height=0`, `video_min_dimension = 128` and `video_max_dimension = 171` so that the rescale resolution is either (128, 171) or (171, 128) depending on whether original height is larger than original width. Thus, we are less likely to have gpu OOM because the spatial size of video clips is determined.
      
      Reviewed By: putivsky
      
      Differential Revision: D20182529
      
      fbshipit-source-id: f9c40afb7590e7c45e6908946597141efa35f57c
      
      * Fixing samplers initialization (#1967)
      
      Summary:
      Pull Request resolved: https://github.com/pytorch/vision/pull/1967
      
      
      
      No-ops for torchvision diff, which fixes samplers.
      
      Differential Revision: D20397218
      
      fbshipit-source-id: 6dc4d04364f305fbda7ca4f67a25ceecd73d0f20
      
      * Exclude C++ test files
      Co-authored-by: default avatarYuri Putivsky <yuri@fb.com>
      Co-authored-by: default avatarZhicheng Yan <zyan3@fb.com>
      32e16805
  12. 28 Jan, 2020 1 commit
  13. 29 Oct, 2019 1 commit
  14. 23 Oct, 2019 1 commit
    • Francisco Massa's avatar
      Unify video backend (#1514) · 97b53f96
      Francisco Massa authored
      * Unify video backend interfaces
      
      * Remove reference cycle
      
      * Make functions private and enable tests on OSX
      
      * Disable test if video_reader backend not available
      
      * Lint
      
      * Fix import after refactoring
      
      * Fix lint
      97b53f96
  15. 21 Oct, 2019 1 commit
  16. 15 Oct, 2019 1 commit
  17. 12 Oct, 2019 1 commit
  18. 08 Oct, 2019 1 commit
  19. 03 Oct, 2019 1 commit
  20. 30 Sep, 2019 1 commit
    • Chandresh Kanani's avatar
      modified code of io.read_video and io.read_video_timestamps to intepret pts... · 17e355f7
      Chandresh Kanani authored
      modified code of io.read_video and io.read_video_timestamps to intepret pts values in seconds (#1331)
      
      * modified code of io.read_video and io.read_video_timestamps to interpret pts values in seconds
      
      * changed default value for pts_unit to pts, corrected formatting
      
      * hanndliing both fractions and floats for start_pts and end_pts, added test cases for pts_unit sec
      
      * moved unit conversion logic to _read_from_stream method
      17e355f7
  21. 24 Sep, 2019 1 commit
  22. 20 Sep, 2019 1 commit
    • Zhicheng Yan's avatar
      [video reader] inception commit (#1303) · 31fad34f
      Zhicheng Yan authored
      * [video reader] inception commit
      
      * add method save_metadata to class VideoClips in video_utils.py
      
      * add load_metadata() method to VideoClips class
      
      * add Exception to not catch unexpected events such as memory erros, interrupt
      
      * fix bugs in video_plus.py
      
      * [video reader]remove logging. update setup.py
      
      * remove time measurement in test_video_reader.py
      
      * Remove glog and try making ffmpeg finding more robust
      
      * Add ffmpeg to conda build
      
      * Add ffmpeg to conda build [again]
      
      * Make library path finding more robust
      
      * Missing import
      
      * One more missing fix for import
      
      * Py2 compatibility and change package to av to avoid version conflict with ffmpeg
      
      * Fix for python2
      
      * [video reader] support to decode one stream only (e.g. video/audio stream)
      
      * remove argument _precomputed_metadata_filepath
      
      * remove save_metadata method
      
      * add get_metadata method
      
      * expose _precomputed_metadata and frame_rate arguments in video dataset __init__ method
      
      * remove ssize_t
      
      * remove size_t to pass CI check on Windows
      
      * add PyInit__video_reader function to pass CI check on Windows
      
      * minor fix to define PyInit_video_reader symbol
      
      * Make c++ video reader optional
      
      * Temporarily revert changes to test_io
      
      * Revert changes to python files
      
      * Rename files to make it private
      
      * Fix python lint
      
      * Fix C++ lint
      
      * add a functor object EnumClassHash to make Enum class instances usable as key type of std::unordered_map
      
      * fix cpp format check
      31fad34f
  23. 07 Aug, 2019 1 commit
  24. 02 Aug, 2019 1 commit
    • Francisco Massa's avatar
      Expose docs for io and ops package (#1189) · 4ec38d49
      Francisco Massa authored
      * Expose docs for io and ops package
      
      Had do modify the docstrings to use Napoleon NumPy style, because Napoleon Google Style doesn't support multiple return arguments
      
      * Add video section
      4ec38d49
  25. 31 Jul, 2019 1 commit
    • Francisco Massa's avatar
      Video reference scripts (#1180) · 5c0b7f31
      Francisco Massa authored
      * Copy classification scripts for video classification
      
      * Initial version of video classification
      
      * add version
      
      * Training of r2plus1d_18 on kinetics work
      
      Gives even slightly better results than expected, with 57.336 top1 clip accuracy. But we count some clips twice in this evaluation
      
      * Cleanups on training script
      
      * Lint
      
      * Minor improvements
      
      * Remove some hacks
      
      * Lint
      5c0b7f31
  26. 26 Jul, 2019 2 commits
  27. 24 Jul, 2019 2 commits
  28. 23 Jul, 2019 1 commit
  29. 19 Jul, 2019 1 commit
    • Francisco Massa's avatar
      Add VideoClips and Kinetics dataset (#1077) · 5d1372c0
      Francisco Massa authored
      * Add VideoClips and Kinetics dataset
      
      * Lint + add back missing line
      
      * Adds ClipSampler following Bruno comment
      
      * Change name following Bruno's suggestion
      
      * Enable specifying a target framerate
      
      * Fix test_io for new interface
      
      * Add comment mentioning drop_last behavior
      
      * Make compute_clips more robust
      
      * Flake8
      
      * Fix for Python2
      5d1372c0
  30. 02 Jul, 2019 1 commit
    • Francisco Massa's avatar
      Adds video reading / saving functionalities (#1039) · d293c4c5
      Francisco Massa authored
      * WIP
      
      * WIP
      
      * Add some documentation
      
      * Improve tests and add GC collection
      
      * [WIP] add timestamp getter
      
      * Bugfixes
      
      * Improvements and travis
      
      * Add audio fine-grained alignment
      
      * More doc
      
      * Remove unecessary file
      
      * Remove comment
      
      * Lazy import av
      
      * Remove hard-coded constants for the test
      
      * Return info stats from read
      
      * Fix for Python-2
      d293c4c5