Giter Site home page Giter Site logo

Comments (4)

fepegar avatar fepegar commented on July 24, 2024

It's true that the function of the type value in the image dict is not clear from the examples. And yes, the type in the example should be LABEL.

For now, I mostly use the type to decide whether to apply or not a transform or to choose an interpolation mode. For example, RandomAffine is applied to all images, but if the type is LABEL, the interpolation is set to nearest neighbor. For some transforms like RandomMotion, the operation is only applied to INTENSITY images.

This value still needs some thinking. I also think that maybe I should define Subject and Image classes that can be used to populate the paths_list. Then the necessary keys can be checked more easily. What do you think?

from torchio.

fepegar avatar fepegar commented on July 24, 2024

Example fixed in cca1830.

from torchio.

romainVala avatar romainVala commented on July 24, 2024

Ok I see the point, and it makes more sense than the previous solution which was relying on the keywork name

About a Subject class, I am not sure if it is necessary. The ImgeDataset is taking as input a subject_list (which is self explicit)

So now it is the users duty to construct correctly this subject_list. Since it is so much dependent on how you organize your files, I will let it like that

By the way currently the RandomMotion is also applied to label and sampling map, (with different motions)

from torchio.

fepegar avatar fepegar commented on July 24, 2024

Thanks for reporting that.

Maybe a Subject class is not necessary, but an Image one might be useful to validate that the path and type are correct. This format would be dropped when reading the file in ImagesDataset, so that only dicts are passed between transforms.

from torchio.

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.