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

Allow non-square images for terratorch VIT models. #188

Open
zaheedgaff opened this issue Oct 14, 2024 · 2 comments
Open

Allow non-square images for terratorch VIT models. #188

zaheedgaff opened this issue Oct 14, 2024 · 2 comments

Comments

@zaheedgaff
Copy link

Describe the issue
Currently, the terratorch framework for VIT models, does not allow non-square images to be input into the training of models. However, as discussed with the developers, this restriction can be relaxed.

To Reproduce (optional, but appreciated)
Steps to reproduce the behavior:

  1. Generate images of non-square dimensions (for example: 208x258)
  2. Configure a PyTorch lightning task using the config.yaml file. Use the above data, and use the pre-trained Prithvi 100 model as the backbone.
  3. Submit fine-tuning job to cluster/machine
  4. See error

Screenshots or log output (optional)
If applicable, add screenshots or log output to help explain your problem.

Log Output
Error while processing rearrange-reduction pattern "batch (t h w) e -> batch (t e) h w".
 Input tensor shape: torch. Size([8, 208, 768]). Additional info: {'e': 768, 't': 1, 'h': 14}.
 Shape mismatch, can't divide axis of length 208 in chunks of 14

Expected behavior (optional)
The expected behavior is that the fine-tuning process takes place, learning from non-square images.

Deployment information (optional)
Describe what you've deployed and how:

  • TerraTorch version: 0.99.3
  • Installation source: pip
@singam96
Copy link
Contributor

singam96 commented Nov 2, 2024

Please check this PR #218

@Joao-L-S-Almeida
Copy link
Member

Has #218 solved the issue @zaheedgaff ?

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

No branches or pull requests

3 participants