Comments (4)
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.
Example fixed in cca1830.
from torchio.
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.
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)
- Different transforms applied to CT and label HOT 11
- The Affine matrix does not change after applying the augmentations HOT 3
- Custom loader not used when loading data lazily HOT 2
- Seed is not working HOT 2
- Silenced exception makes it harder to debug custom Transforms HOT 5
- Resample
- tio.Resample does not work with custom image class HOT 2
- Setting NUM_SAMPLES when using sampler with Queue HOT 3
- RescaleIntensity - multiple calls HOT 9
- Return sampled parameters upon request HOT 3
- Halve queue length when using DDP HOT 2
- bug in rotation part of tio.transforms.RandomAffine HOT 4
- get_subjects_from_batch has a hick-up with int metadata HOT 5
- masking_method in Mask class is not saved as argument (preventing applying the inverse transform)
- RandomAffine raises an error when isotropic=True and 3 elements are given for scales HOT 10
- Queue is not respecting the batch size HOT 1
- Resample an image by providing only the target affine HOT 1
- Supporting PyTorch 2.3 HOT 17
- Cannot copy subclass of Subject with keyword arguments HOT 2
- Image intensity augmentations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchio.