Merged
Conversation
NielsRogge
commented
Nov 4, 2022
|
The documentation is not available anymore as the PR was closed or merged. |
sgugger
reviewed
Nov 4, 2022
Collaborator
sgugger
left a comment
There was a problem hiding this comment.
Looking good, thanks for adding this model! Make sure you update the paper link in the doc file, and the config should take into account the latest modifications done on the CLIP config.
alaradirik
reviewed
Nov 7, 2022
Comment on lines
81
to
87
Contributor
There was a problem hiding this comment.
Suggested change
| """This function prepares a list of PIL images, or a list of numpy arrays if one specifies numpify=True, | |
| or a list of PyTorch tensors if one specifies torchify=True. | |
| """ | |
| image_inputs = [np.random.randint(255, size=(3, 30, 400), dtype=np.uint8)] | |
| image_inputs = [Image.fromarray(np.moveaxis(x, 0, -1)) for x in image_inputs] | |
| """ | |
| This function prepares a list of PIL images, or a list of numpy arrays if one specifies numpify=True, | |
| or a list of PyTorch tensors if one specifies torchify=True. | |
| """ | |
| image_inputs = [np.random.randint(255, size=(3, 30, 400), dtype=np.uint8)] | |
| image_inputs = [Image.fromarray(np.moveaxis(x, 0, -1)) for x in image_inputs] | |
alaradirik
reviewed
Nov 7, 2022
alaradirik
reviewed
Nov 7, 2022
alaradirik
reviewed
Nov 7, 2022
alaradirik
approved these changes
Nov 7, 2022
Contributor
alaradirik
left a comment
There was a problem hiding this comment.
Thanks for the addition! Looks ready to merge once the docstrings are complete and all tests are passing.
added 19 commits
November 7, 2022 15:17
added 19 commits
November 7, 2022 15:17
|
Is the CLIPSeg yet to be released in the latest version? |
mpierrau
pushed a commit
to mpierrau/transformers
that referenced
this pull request
Dec 15, 2022
* Add first draft * Update conversion script * Improve conversion script * Improve conversion script some more * Add conditional embeddings * Add initial decoder * Fix activation function of decoder * Make decoder outputs match original implementation * Make decoder outputs match original implementation * Add more copied from statements * Improve model outputs * Fix auto tokenizer file * Fix more tests * Add test * Improve README and docs, improve conditional embeddings * Fix more tests * Remove print statements * Remove initial embeddings * Improve conversion script * Add interpolation of position embeddings * Finish addition of interpolation of position embeddings * Add support for refined checkpoint * Fix refined checkpoint * Remove unused parameter * Improve conversion script * Add support for training * Fix conversion script * Add CLIPSegFeatureExtractor * Fix processor * Fix CLIPSegProcessor * Fix conversion script * Fix most tests * Fix equivalence test * Fix README * Add model to doc tests * Use better variable name * Convert other checkpoint as well * Update config, add link to paper * Add docs * Update organization * Replace base_model_prefix with clip * Fix base_model_prefix * Fix checkpoint of config * Fix config checkpoint * Remove file * Use logits for output * Fix tests Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds CLIPSeg, a nice extension of CLIP for zero-shot and one-shot (image-guided) image segmentation.
To do: