GithubHelp home page GithubHelp logo

Comments (5)

Nic-Ma avatar Nic-Ma commented on June 29, 2024

Hi @atbenmurray ,

I committed a PR #25 for this task, could you please help review it?
Glad to see your feedback.
If I misunderstand anything, please feel free to contact me.
Thanks in advance.

from monai.

ericspod avatar ericspod commented on June 29, 2024

Currently we have the functionality to rescale arrays to [0,1] range, this suffices for the segmentation example so we feel it's beyond the MVP scope.

from monai.

Nic-Ma avatar Nic-Ma commented on June 29, 2024

Hi @ericspod @atbenmurray @wyli @yanchengnv ,

Thanks for the discussion of the design principle on transforms.
I think we are on the same page to use basic PyTorch only. Then I have several questions about ShapeFormat, could you please help make them clear before we start to develop?

  1. torchvision supposes the 2D input images are PIL image which is "channel last", and converts to torch.Tensor which is "channel first" in "toTensor()" transform. Can we also suppose all 3D input images are "channel last"?
  2. If not all input images are "channel last", how does every transform know the input image is "channel last" or "channel first"? In previous design, we defined a MediaImage object to record ShapeFormat information with image data together, then we can support 12 kinds of ShapeFormats in transforms.
  3. Should the transform support to process both numpy data and torch.Tensor data? If only support numpy data, I think we need to define an implicit transform "toTensor()" at the end of chain.

Welcome your discussion and please feel free to correct me if I misunderstand anything.
Thanks in advance.

from monai.

wyli avatar wyli commented on June 29, 2024

@Nic-Ma as I understand it, for the current sprint we assume the input image is in NifTI format, which uses 'channel last'. Before feeding it to the network we add another 'ToTensor' transform to convert it into a 'channel first' torch tensor. Let's keep the implementation "minimal", for example, following torch vision's implementation.

from monai.

wyli avatar wyli commented on June 29, 2024

#25 #28 jointly resolve this issue.

from monai.

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.