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

Add iTPN Supports for Non-three channel image #1735

Merged
merged 3 commits into from
Sep 4, 2023
Merged

Add iTPN Supports for Non-three channel image #1735

merged 3 commits into from
Sep 4, 2023

Conversation

MGAMZ
Copy link
Contributor

@MGAMZ MGAMZ commented Jul 31, 2023

Motivation

The iTPN implementation does not support for Non-three channel image, while its neck is ready for it.
But I'm not sure if this change is in line with the original design.

Modification

Class iTPNHiViT: Pass other argments including channel arg to its superclass(HiViT).
Class MAEPretrainHead: Modify channels from 3 to self.in_channels, which allows users to specify specific channels number.

Use cases (Optional)

backbone=dict(type='iTPNHiViT', in_chans=1,),
neck=dict(type='iTPNPretrainDecoder', in_chans=1,),
head=dict(type='MAEPretrainHead', in_channels=1,),

When trying iTPN pretrain, it only supports images with 3 channels. One of the restrictions is from MAEHead.
The HiViT supports specifying channels, but the iTPNHiViT class can't pass channel argments to it. This is one of the reasons that iTPNHiViT implementation only support images with 3 channels.
@codecov
Copy link

codecov bot commented Jul 31, 2023

@fangyixiao18
Copy link
Collaborator

please run pre-commit to fix lint problem

Fix hint problem
@fangyixiao18 fangyixiao18 merged commit da1da48 into open-mmlab:dev Sep 4, 2023
5 of 6 checks passed
@MGAMZ MGAMZ deleted the dev branch September 4, 2023 06:13
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.

2 participants