Comments (4)
The data.py module assumed that your data and ground truth segmentation maps are already sliced (in png format) into 2D images. '.nii' files are 3D volumes so yes, I believe you would need to convert them to .png
from unet-zoo.
Hi, for our particular implementation, we'd manually converted the .nii files into .png files where each .png corresponded to one z-slice of a patient. If you want to directly use .nii files, you could look into NiBabel (http://nipy.org/nibabel/gettingstarted.html), and modify the Dataset function in 'data.py' to suit your personal way of handling the dataset. Let me know if you need any more clarifications!
from unet-zoo.
As a follow up, to use the code here for any form of dataset, you simply have to modify the __init__()
, __getitem__()
and __len__()
functions within the BratsDatasetUNet() Class.
In general, to define a Dataset Class for Pytorch, you want __getitem__(index)
to return one (image, mask)
pair from your entire dataset as size x size FloatTensors/numpy arrays, and __len__()
should return the total number of images in the dataset. Beyond this, you can use the remaining training code unchanged.
from unet-zoo.
Thank you.
from unet-zoo.
Related Issues (16)
- Which BraTS set was used for training? HOT 2
- Questions about BraTS Masks HOT 1
- Loading BRATS dataset and # of training epochs HOT 2
- A question about the DICELossMultiClass HOT 4
- kU-NET implementation
- 3D Unet unable to locate
- Inference using UNET + BD-LSTM?
- Hi, just a quick thought: difference comparision to 3d-unet
- No module named dataParser HOT 3
- Missing 'losses' module
- How to realize BDC-LSTM in Keras?
- Question about BDC-LSTM input. HOT 2
- Question about prediction output HOT 1
- how to prepare data for bdclstm.py HOT 7
- Dice Score HOT 3
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 unet-zoo.