Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DETR] Add num_channels attribute #18714

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

NielsRogge
Copy link
Contributor

What does this PR do?

This PR adds a num_channels attribute to DetrConfig, making it possible to use the model on greyscale images (i.e. num_channels = 1).

Fixes #14875

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 22, 2022

The documentation is not available anymore as the PR was closed or merged.

@NielsRogge NielsRogge requested a review from sgugger August 22, 2022 13:10
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

@NielsRogge NielsRogge merged commit 3b6943e into huggingface:main Aug 31, 2022
@Zhylkaaa
Copy link
Contributor

Zhylkaaa commented Sep 9, 2022

In my previous experience with DETR I also have faced the issues with Feature extractor, does it support 1 chanel input now? (I had to do something like that: https://github.com/huggingface/transformers/pull/14933/files#diff-826e0e0303aa4a12e527884e4dc548fe8debb137905260e42ec8b4331c9c2c63R594) @NielsRogge

oneraghavan pushed a commit to oneraghavan/transformers that referenced this pull request Sep 26, 2022
* Add num_channels attribute

* Fix code quality

Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add in_chans to DetrModel
4 participants