Comments (8)
HI @Kyuuki93 The classification application has been implemented recently but the documentation is still work in progress, it'll be available in the next release (v0.3).
from niftynet.
Great work, which format should label data saved in?
from niftynet.
Currently, you can load labels by making them 1x1x1 images, but set interp_order to -1 in the config file. We are still working out what formats to support for labels, so if you have preferences, please let us know.
from niftynet.
@wyli @eligibson
I finished the training according to your suggestion,the dataset include some MR images download from OASIS.
There are two flaws in INFERENCE stage:
- the prediction result will be saved in a .nii file, it's not so convenient to evaluate the accuracy, like this
INFO:niftynet: Inference iter 2, (0.045657s) ...... (1, 1) Saved /home/*/NiftyNet/models/tstnet/output/tstnet/S007_niftynet_out.nii.gz INFO:niftynet: Inference iter 3, (0.040947s) ...... (1, 1) Saved /home/*/NiftyNet/models/tstnet/output/tstnet/S020_niftynet_out.nii.gz
- the
output_prob
parameter in [CLASSIFICATION] section must beFalse
, otherwise will throwValueError: cannot reshape array of size 2 into shape (1,1,1,1,1)
, (num_class=2 in my task) the error should come from the label format
from niftynet.
- I agree that output as nii files is not ideal. We are working on that in two ways. First, we are adding built in tools for evaluation. Second, we are planning to revamp the IO to allow other ways to specify labels and get the outputs. Some of this will be ready for the next release.
Until then, it is fairly straightforward to write a short python script to go through the nii files and add the output to a csv file:
import nibabel, glob
with open('output.csv','w') as f:
for fn in glob.glob('*_niftynet_out.nii.gz'):
f.write('%s,%i\n'%(fn.replace('_niftynet_out.nii.gz',''), nibabel.load(fn).get_data()[0,0,0,0,0]))
- This looks like a bug. I'll add an issue and get it fixed.
from niftynet.
These should both be resolved by commit 0f4ac84
Classification now outputs a csv file in addition to the nii files.
from niftynet.
So... I wonder now we still need to use 1x1x1 images as label's format ?
Is there a method to use pandas to read the labels for Classification & Regression task ?
from niftynet.
@Kyuuki93 can you share your config file?
from niftynet.
Related Issues (20)
- Expected size of adding custom dataset for classification task on MR dataset?
- Provided indices are out-of-bounds w.r.t. dense side with broadcasted shape. Histogram error? HOT 1
- Using GANs without conditioning
- upgrade to support tensorflow 1.15
- If Niftynet supports Xavier initialization?
- Remove unconnected islands
- Default values for the bias field layer might be too large
- Float comparison in histogram normalisation layer
- Handle SimpleITK's lack of thread safety
- Sections containing `csv_data_file` are not loaded
- AdamW optimizer
- TensorRT frozen graphs - integration with NiftyNet
- Feature: Rewrite NiftyNet to use TensorFlow 2.0 HOT 1
- Using NiftyNet to do segmentation of MRI scans(in .nii extension) to grey matter,white matter and csf
- NiftiNet Roadmap HOT 2
- Niftynet window aggregator function for inferens - explaination needed
- using other DL framework
- How to train a model with one input and multi-output?
- dense-vnet to Monai HOT 1
- Segmentation classes description not available
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 niftynet.