Giter Club home page Giter Club logo

Comments (4)

adamjstewart avatar adamjstewart commented on May 26, 2024 1

There are two questions here:

Why do some data modules pass batch size to the data loader while some pass batch size to NRandomCrop?

This is by design. Many datasets such as GID-15 contain very large image scenes (7k x 7k px). These are too large to pass directly to a model and must first be cropped. If the user desires a batch size of 64 and a patch size of 64, instead of loading 64 of these images (may exceed memory) and cropping each to a small image (64 x 64 px), we load a single image and crop it to 64 random subsets. This was done during The Great Data Module Refactor of 2023 (#992). I don't particularly love this solution, but the alternative was for us to add more parameters/complexity.

Why do OSCD and LEVIR-CD+ specifically do this?

This I'm not sure about. These images aren't honestly that big. We could probably use the normal scheme. I would be open to reviewing which datasets use RandomNCrop and trying to phase it out or replace it with something better. This is also something we plan to upstream to Kornia eventually.

from torchgeo.

adamjstewart avatar adamjstewart commented on May 26, 2024

Can we close this issue, or do we want to take action on these data modules for small-ish images?

from torchgeo.

robmarkcole avatar robmarkcole commented on May 26, 2024

Thanks for taking the time to explain the reasoning - this will be useful for anyone else digging into these two datasets.

I think we can close this, and as you suggest creating an issue to review the use of RandomNCrop - I half remember that there is now a more systematic approach possible?

from torchgeo.

adamjstewart avatar adamjstewart commented on May 26, 2024

I'm unaware of a more systematic approach.

from torchgeo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.