1. 23 Feb, 2022 6 commits
    • Nicolas Patry's avatar
      Enable `image-segmentation` on `AutoModelForSemanticSegmentation` (#15647) · 9e71d464
      Nicolas Patry authored
      * Enabling Beit SegFormer to `image-segmentation`.
      
      * Fixing the score.
      
      * Fix import ?
      
      * Missing in type hint.
      
      * Multiple test fixes:
      
      - Add `raw_image` support. It should be the default IMHO since in Python
        world it doesn't make any sense to base64 encode the image (Sorry
        @mishig, didn't catch that in my review). I really think we should
        consider breaking BC here.
      - Add support for Segformer tiny test (needed
        `SegformerModelTester.get_config` to enable TinyConfig
        @NielsRogge)
      - Add the check that `batch_size` works correctly on that pipeline.
        Uncovered that it doesn't for Detr, which IMO is OK since images
        after `feature_extractor` don't have the same size. Comment should
        explain.
      
      * Type hint as a string.
      
      * Make fixup + update black.
      
      * torch+vision protections.
      
      * Don't use torchvision, use F.interpolate instead (no new dep).
      
      * Last fixes for Segformer.
      
      * Update test to reflect new image (which was broken)
      
      * Update tests.
      
      * Major BC modification:
      
      - Removed the string compressed PNG string, that's a job for users
      `transformers` stays in python land.
      - Removed the `score` for semantic segmentation. It has hardly a meaning
        on its own in this context.
      - Don't include the grayscale with logits for now (which could enable
        users to get a sense of confidence). Might be done later.
      - Don't include the surface of the mask (could be used for sorting by
        users, to filter out small masks). It's already calculable, and
        it's easier to add later, than to add now and break later if we need.
      
      * `make fixup`.
      
      * Small changes.
      
      * Rebase + doc fixup.
      9e71d464
    • Suraj Patil's avatar
      [ViLT] Fix checkpoint url in config (#15790) · 1b239797
      Suraj Patil authored
      
      
      * [ViLT] Fix checkpoint url in config
      
      * Apply suggestions from code review
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      1b239797
    • Suraj Patil's avatar
      [CLIP] fix grad ckpt (#15789) · de737866
      Suraj Patil authored
      de737866
    • Nicolas Patry's avatar
      Supporting Merges.txt files than contain an endline. (#15782) · a3e607d1
      Nicolas Patry authored
      (`hf-internal-testing/tiny-clip` for instance)
      a3e607d1
    • Suraj Patil's avatar
    • Nicolas Patry's avatar
      Adding ZeroShotImageClassificationPipeline (#12119) · f9582c20
      Nicolas Patry authored
      
      
      * [Proposal] Adding ZeroShotImageClassificationPipeline
      
      - Based on CLIP
      
      * WIP, Resurection in progress.
      
      * Resurrection... achieved.
      
      * Reword handling different `padding_value` for `feature_extractor` and
      `tokenizer`.
      
      * Thanks doc-builder !
      
      * Adding docs + global namespace `ZeroShotImageClassificationPipeline`.
      
      * Fixing templates.
      
      * Make the test pass and be robust to floating error.
      
      * Adressing suraj's comments on docs mostly.
      
      * Tf support start.
      
      * TF support.
      
      * Update src/transformers/pipelines/zero_shot_image_classification.py
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      Co-authored-by: default avatarSuraj Patil <surajp815@gmail.com>
      f9582c20
  2. 22 Feb, 2022 8 commits
  3. 21 Feb, 2022 6 commits
  4. 18 Feb, 2022 12 commits
  5. 17 Feb, 2022 5 commits
    • NielsRogge's avatar
      Add SimMIM (#15586) · 57882177
      NielsRogge authored
      
      
      * Add first draft
      
      * Make model importable
      
      * Make SwinForMaskedImageModeling importable
      
      * Fix imports
      
      * Add missing inits
      
      * Add support for Swin
      
      * Fix bug
      
      * Fix bug
      
      * Fix another bug
      
      * Fix Swin MIM implementation
      
      * Fix default encoder stride
      
      * Fix Swin
      
      * Add print statements for debugging
      
      * Add image_size data argument
      
      * Fix Swin
      
      * Fix image_size
      
      * Add print statements for debugging
      
      * Fix print statement
      
      * Remove print statements
      
      * Improve reshaping of bool_masked_pos
      
      * Add support for DeiT, fix tests
      
      * Improve docstrings
      
      * Apply new black version
      
      * Improve script
      
      * Fix bug
      
      * Improve README
      
      * Apply suggestions from code review
      
      * Remove DS_Store and add to gitignore
      
      * Apply suggestions from code review + fix BEiT Flax
      
      * Revert BEiT changes
      
      * Improve README
      
      * Fix code quality
      
      * Improve README
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MBP.localdomain>
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
      57882177
    • Gunjan Chhablani's avatar
      Fix shapes in model docstrings (#15696) · 426b9623
      Gunjan Chhablani authored
      426b9623
    • Yih-Dar's avatar
      Minor fix on README.md (#15688) · 92a537d9
      Yih-Dar authored
      
      
      * fix README
      
      * fix more arxiv links
      
      * make fix-copies
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      92a537d9
    • Tanay Mehta's avatar
      Add PoolFormer (#15531) · f84e0dbd
      Tanay Mehta authored
      
      
      * Added all files, PoolFormerFeatureExtractor still failing tests
      
      * Fixed PoolFormerFeatureExtractor not being able to import
      
      * Completed Poolformer doc
      
      * Applied Suggested fixes
      
      * Fixed errors in modeling_auto.py
      
      * Fix feature extractor, convert docs to Markdown, styling of code
      
      * Remove PoolFormer from check_repo and fix integration test
      
      * Remove Poolformer from check_repo
      
      * Fixed configuration_poolformer.py docs and removed inference.py from poolformer
      
      * Ran with black v22
      
      * Added PoolFormer to _toctree.yml
      
      * Updated poolformer doc
      
      * Applied suggested fixes and added on README.md
      
      * Did make fixup and make fix-copies, tests should pass now
      
      * Changed PoolFormer weights conversion script name and fixed README
      
      * Applied fixes in test_modeling_poolformer.py and modeling_poolformer.py
      
      * Added PoolFormerFeatureExtractor to AutoFeatureExtractor API
      Co-authored-by: default avatarNiels Rogge <nielsrogge@Nielss-MBP.localdomain>
      f84e0dbd
    • NielsRogge's avatar
      0e91f885
  6. 16 Feb, 2022 3 commits