analysiscenter / radio

RadIO is a library for data science research of computed tomography imaging
https://analysiscenter.github.io/radio/
Apache License 2.0
222 stars 52 forks source link

Batch size > 1 images with different dimensions #38

Closed jaysnanavati closed 5 years ago

jaysnanavati commented 5 years ago

Currently this is not possible, any pointers on how to work around this?

roman-kh commented 5 years ago

You need to create a custom batch class which stores an array of arrays with images.

jaysnanavati commented 5 years ago

hmm how would that work with the other functions that work on just a single array of images?

roman-kh commented 5 years ago

That would require some heavy refactoring. But overall in the long run this will simplify the code and the data structure.

jaysnanavati commented 5 years ago

Indeed, though what if we add the ability to pass in the same parameters as unifysampling to load? that way as soon as the image is loaded we can call unify to make sure all of them are the same dims?


From: Roman Kh notifications@github.com Sent: Wednesday, April 24, 2019 11:53:34 PM To: analysiscenter/radio Cc: Jay Nanavati; Author Subject: Re: [analysiscenter/radio] Batch size > 1 images with different dimensions (#38)

That would require some heavy refactoring. But overall in the long run this will simplify the code and the data structure.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/analysiscenter/radio/issues/38#issuecomment-486457195, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAURCSKJFYSNSU5S7JT6VMLPSDQG5ANCNFSM4HH3POSQ.

roman-kh commented 5 years ago

If you want just load images with different dimensions all you may need is a custom load action, which load images as is and then reshapes them to a common shape.

jaysnanavati commented 5 years ago

Yes, but I'd like to reuse existing implemented functions to do this :) what are your thoughts on having these parameters in the load function ?


From: Roman Kh notifications@github.com Sent: Thursday, April 25, 2019 12:33:19 PM To: analysiscenter/radio Cc: Jay Nanavati; Author Subject: Re: [analysiscenter/radio] Batch size > 1 images with different dimensions (#38)

If you want just load images with different dimensions all you may need is a custom load action, which load images as is and then reshapes them to a common shape.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/analysiscenter/radio/issues/38#issuecomment-486635422, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAURCSL7ERTBJ5MBVTFHWCDPSGJH7ANCNFSM4HH3POSQ.

jaysnanavati commented 5 years ago

Ping??

roman-kh commented 5 years ago

Make a PR, please, and we will discuss your implementation.

jaysnanavati commented 5 years ago

Awesome! thanks for your help on this, appreciate it :)