Giter Site home page Giter Site logo

about the database about unet-zoo HOT 4 CLOSED

shreyaspadhy avatar shreyaspadhy commented on May 24, 2024
about the database

from unet-zoo.

Comments (4)

krmerchant avatar krmerchant commented on May 24, 2024 1

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.

shreyaspadhy avatar shreyaspadhy commented on May 24, 2024

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.

shreyaspadhy avatar shreyaspadhy commented on May 24, 2024

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.

PoonamZ avatar PoonamZ commented on May 24, 2024

Thank you.

from unet-zoo.

Related Issues (16)

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.