* custom_models: tiny doc addition
* mention security feature earlier in the section
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* 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.
* [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: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Suraj Patil <surajp815@gmail.com>
* begin script
* update script
* fix features and data args
* main
* add requirements
* add column name args
* fix captions
* don't jit transforms
* fix caption
* fix labels, handle attention mask
* convert pixel values to numpy
* labels => input_ids
* transform images on the fly
* use AutoModel class, create the hybird model outside of the script
* fix version message
* add readme
* Apply suggestions from code review
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* adderss review comments
* add more comments
* allow freezing vision and text models
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* fix bug in PT speech-encoder-decoder
* add pt test for `inputs is not None`
* fix test
* new pt test
* Update tests/test_modeling_speech_encoder_decoder.py
* make fixup
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Very big changes concerning the tokenizer fast of CLIP which did not correspond to the tokenizer slow of CLIP
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* doc for adding a model to the hub
* run make style
* resolved conversation
* removed a line
* removed )
* Update docs/source/add_new_model.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/add_new_model.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* make style
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* 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: Niels Rogge <nielsrogge@Nielss-MBP.localdomain>