1. 11 Jun, 2024 1 commit
    • amyeroberts's avatar
      Fast image processor (#28847) · f53fe35b
      amyeroberts authored
      
      
      * Draft fast image processors
      
      * Draft working fast version
      
      * py3.8 compatible cache
      
      * Enable loading fast image processors through auto
      
      * Tidy up; rescale behaviour based on input type
      
      * Enable tests for fast image processors
      
      * Smarter rescaling
      
      * Don't default to Fast
      
      * Safer imports
      
      * Add necessary Pillow requirement
      
      * Woops
      
      * Add AutoImageProcessor test
      
      * Fix up
      
      * Fix test for imagegpt
      
      * Fix test
      
      * Review comments
      
      * Add warning for TF and JAX input types
      
      * Rearrange
      
      * Return transforms
      
      * NumpyToTensor transformation
      
      * Rebase - include changes from upstream in ImageProcessingMixin
      
      * Safe typing
      
      * Fix up
      
      * convert mean/std to tesnor to rescale
      
      * Don't store transforms in state
      
      * Fix up
      
      * Update src/transformers/image_processing_utils_fast.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/auto/image_processing_auto.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/auto/image_processing_auto.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/auto/image_processing_auto.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Warn if fast image processor available
      
      * Update src/transformers/models/vit/image_processing_vit_fast.py
      
      * Transpose incoming numpy images to be in CHW format
      
      * Update mapping names based on packages, auto set fast to None
      
      * Fix up
      
      * Fix
      
      * Add AutoImageProcessor.from_pretrained(checkpoint, use_fast=True) test
      
      * Update src/transformers/models/vit/image_processing_vit_fast.py
      Co-authored-by: default avatarPavel Iakubovskii <qubvel@gmail.com>
      
      * Add equivalence and speed tests
      
      * Fix up
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avatarPavel Iakubovskii <qubvel@gmail.com>
      f53fe35b
  2. 03 Jun, 2024 1 commit
  3. 17 May, 2024 1 commit
  4. 01 Mar, 2024 1 commit
  5. 13 Feb, 2024 1 commit
  6. 11 Dec, 2023 1 commit
    • rjenc29's avatar
      Fix a couple of typos and add an illustrative test (#26941) · 7e35f370
      rjenc29 authored
      * fix a typo and add an illustrative test
      
      * appease black
      
      * reduce code duplication and add Annotion type back with a pending deprecation warning
      
      * remove unused code
      
      * change warning type
      
      * black formatting fix
      
      * change enum deprecation approach to support 3.8 and earlier
      
      * add stacklevel
      
      * fix black issue
      
      * fix ruff issues
      
      * fix ruff issues
      
      * move tests to own mixin
      
      * include yolos
      
      * fix black formatting issue
      
      * fix black formatting issue
      
      * use logger instead of warnings and include target version for deprecation
      7e35f370
  7. 11 Aug, 2023 1 commit
    • amyeroberts's avatar
      Refactor image processor testers (#25450) · 41d56ea6
      amyeroberts authored
      * Refactor image processor test mixin
      
      - Move test_call_numpy, test_call_pytorch, test_call_pil to mixin
      - Rename mixin to reflect handling of logic more than saving
      - Add prepare_image_inputs, expected_image_outputs for tests
      
      * Fix for oneformer
      41d56ea6
  8. 29 Jun, 2023 1 commit
  9. 06 Feb, 2023 1 commit
    • Sylvain Gugger's avatar
      Update quality tooling for formatting (#21480) · 6f79d264
      Sylvain Gugger authored
      * Result of black 23.1
      
      * Update target to Python 3.7
      
      * Switch flake8 to ruff
      
      * Configure isort
      
      * Configure isort
      
      * Apply isort with line limit
      
      * Put the right black version
      
      * adapt black in check copies
      
      * Fix copies
      6f79d264
  10. 23 Jan, 2023 2 commits
    • amyeroberts's avatar
      Update tests: replace feature extractor tests with image processor (#20768) · e2bd7f80
      amyeroberts authored
      
      
      * Update imports and test fetcher
      
      * Revert but keep test fetcher update
      
      * Fix imports
      
      * Fix all imports
      
      * Replace fe with ip names
      
      * Add generate kwargs to `AutomaticSpeechRecognitionPipeline` (#20952)
      
      * Add generate kwargs to AutomaticSpeechRecognitionPipeline
      
      * Add test for generation kwargs
      
      * Update image processor parameters if creating with kwargs (#20866)
      
      * Update parameters if creating with kwargs
      
      * Shallow copy to prevent mutating input
      
      * Pass all args in constructor dict - warnings in init
      
      * Fix typo
      
      * Rename tester class
      
      * Rebase and tidy up
      
      * Fixup
      
      * Use ImageProcessingSavingTestMixin
      
      * Update property ref in tests
      
      * Update property ref in tests
      
      * Update recently merged in models
      
      * Small fix
      Co-authored-by: default avatarbofeng huang <bofenghuang7@gmail.com>
      e2bd7f80
    • amyeroberts's avatar
      Add test_image_processing_common.py (#20785) · 66459ce3
      amyeroberts authored
      * Add test_image_processing_common.py
      
      * Fix typo
      
      * Update imports and test fetcher
      
      * Revert but keep test fetcher update
      
      * Fix imports
      
      * Fix all imports
      
      * Formatting fix
      
      * Update tests/test_image_processing_common.py
      66459ce3
  11. 17 Jan, 2023 1 commit
  12. 04 Jan, 2023 1 commit
  13. 30 Nov, 2022 1 commit
    • amyeroberts's avatar
      Add segmentation + object detection image processors (#20160) · de6d19ea
      amyeroberts authored
      * Add transforms for object detection
      
      * DETR models + Yolos
      
      * Scrappy additions
      
      * Maskformer image processor
      
      * Fix up; MaskFormer tests
      
      * Update owlvit processor
      
      * Add to docs
      
      * OwlViT tests
      
      * Update pad logic
      
      * Remove changes to transforms
      
      * Import fn directly
      
      * Update to include pad transformation
      
      * Remove uninstended changes
      
      * Add new owlvit post processing function
      
      * Tidy up
      
      * Fix copies
      
      * Fix some copies
      
      * Include device fix
      
      * Fix scipy imports
      
      * Update _pad_image
      
      * Update padding functionality
      
      * Fix bug
      
      * Properly handle ignore index
      
      * Fix up
      
      * Remove defaults to None in docstrings
      
      * Fix docstrings & docs
      
      * Fix sizes bug
      
      * Resolve conflicts in init
      
      * Cast to float after resizing
      
      * Tidy & add size if missing
      
      * Allow kwards when processing for owlvit
      
      * Update test values
      de6d19ea
  14. 22 Sep, 2022 1 commit
  15. 03 May, 2022 1 commit
    • Yih-Dar's avatar
      Move test model folders (#17034) · 19420fd9
      Yih-Dar authored
      
      
      * move test model folders (TODO: fix imports and others)
      
      * fix (potentially partially) imports (in model test modules)
      
      * fix (potentially partially) imports (in tokenization test modules)
      
      * fix (potentially partially) imports (in feature extraction test modules)
      
      * fix import utils.test_modeling_tf_core
      
      * fix path ../fixtures/
      
      * fix imports about generation.test_generation_flax_utils
      
      * fix more imports
      
      * fix fixture path
      
      * fix get_test_dir
      
      * update module_to_test_file
      
      * fix get_tests_dir from wrong transformers.utils
      
      * update config.yml (CircleCI)
      
      * fix style
      
      * remove missing imports
      
      * update new model script
      
      * update check_repo
      
      * update SPECIAL_MODULE_TO_TEST_MAP
      
      * fix style
      
      * add __init__
      
      * update self-scheduled
      
      * fix add_new_model scripts
      
      * check one way to get location back
      
      * python setup.py build install
      
      * fix import in test auto
      
      * update self-scheduled.yml
      
      * update slack notification script
      
      * Add comments about artifact names
      
      * fix for yolos
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      19420fd9
  16. 23 Mar, 2022 1 commit
    • Sylvain Gugger's avatar
      Reorganize file utils (#16264) · 4975002d
      Sylvain Gugger authored
      * Split file_utils in several submodules
      
      * Fixes
      
      * Add back more objects
      
      * More fixes
      
      * Who exactly decided to import that from there?
      
      * Second suggestion to code with code review
      
      * Revert wront move
      
      * Fix imports
      
      * Adapt all imports
      
      * Adapt all imports everywhere
      
      * Revert this import, will fix in a separate commit
      4975002d
  17. 23 Feb, 2022 1 commit
  18. 29 Jun, 2021 1 commit
    • NielsRogge's avatar
      Rename detr targets to labels (#12280) · 1fc6817a
      NielsRogge authored
      * Rename target to labels in DetrFeatureExtractor
      
      * Update DetrFeatureExtractor tests accordingly
      
      * Improve docs of DetrFeatureExtractor
      
      * Improve docs
      
      * Make style
      1fc6817a
  19. 09 Jun, 2021 1 commit
    • NielsRogge's avatar
      Add DETR (#11653) · d3eacbb8
      NielsRogge authored
      
      
      * Squash all commits of modeling_detr_v7 branch into one
      
      * Improve docs
      
      * Fix tests
      
      * Style
      
      * Improve docs some more and fix most tests
      
      * Fix slow tests of ViT, DeiT and DETR
      
      * Improve replacement of batch norm
      
      * Restructure timm backbone forward
      
      * Make DetrForSegmentation support any timm backbone
      
      * Fix name of output
      
      * Address most comments by @LysandreJik
      
      * Give better names for variables
      
      * Conditional imports + timm in setup.py
      
      * Address additional comments by @sgugger
      
      * Make style, add require_timm and require_vision to tests茅
      
      * Remove train_backbone attribute of DetrConfig, add methods to freeze/unfreeze backbone
      
      * Add png files to fixtures
      
      * Fix type hint
      
      * Add timm to workflows
      
      * Add `BatchNorm2d` to the weight initialization
      
      * Fix retain_grad test
      
      * Replace model checkpoints by Facebook namespace
      
      * Fix name of checkpoint in test
      
      * Add user-friendly message when scipy is not available
      
      * Address most comments by @patrickvonplaten
      
      * Remove return_intermediate_layers attribute of DetrConfig and simplify Joiner
      
      * Better initialization
      
      * Scipy is necessary to get sklearn metrics
      
      * Rename TimmBackbone to DetrTimmConvEncoder and rename DetrJoiner to DetrConvModel
      
      * Make style
      
      * Improve docs and add 2 community notebooks
      Co-authored-by: default avatarLysandre <lysandre.debut@reseau.eseo.fr>
      d3eacbb8