medicaltorch
medicaltorch copied to clipboard
New features: Cropping around ROI & Multi-channel input
First of all, warm thanks to @perone et al. for developing medicaltorch. Really really useful tools.
Based on your implementation, we would like to implement 2 new features in our project, described hereafter. Just wondering if you would be interested in us contributing / integrating these features into your repo via PR...etc. or if you think these features are a bit too specific to our project, and you would like to keep the code generic on that aspect.
Crop around a ROI:
We are currently using your cropping tool which crops around the center of the image with a given crop size. We would like to crop around a ROI instead (to deal with issues of class imbalance, objects to detect located close to the edge of the image...etc.).
To do so, we would have to refactor the loader so that we could input: input image, target mask (ie gt
) and a ROI mask.
Not sure yet what is the best way to do this: eg add roi
in the dictionary along side with input
and gt
, or add a channel to the gt
, or...
Multi-channel input:
We would like to send a multi-contrast input to our network (ie slice of T1w, slice of T2w, both being previously co-registered).
Again, not sure yet of what is the best way to go: input a list of filenames for the input
instead of a single filename? or load each contrast independently, and further concat the contrasts to create the multi-channel input?
Cheers!
Hey @charleygros !! I'm on holiday now so I won't be able to look into it before December, but these are important features that I might help later, the issue for me now is only the timing =(
No worries @perone :-) We will keep you updated when you will be back, enjoy :+1:
Follow-up: We fork medicaltorch
(here) and implemented the above changes (but also some limitations / other ideas in mind). We would be happy to discuss them with you when time suits you, in order to be possibly merged into the official repo'.