GithubHelp home page GithubHelp logo

maxpietsch / dstripe Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 2.15 MB

This repository contains code and model weights for the method described in the paper "dStripe: slice artefact correction in diffusion MRI via constrained neural network" https://doi.org/10.1016/j.media.2021.102255

Python 99.09% C 0.03% Dockerfile 0.65% Shell 0.23%

dstripe's People

Contributors

cookpa avatar maxpietsch avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cookpa jdtournier

dstripe's Issues

Error code when running

Hi there, I am trying to use this software for removal of a consistent stripe artefact in all b0 and DWI's .

The code I ran was: docker run --rm --volume /data/bmol239/Analysis/trouble-shooting:/data/bmol239/Analysis/trouble-shooting maxpietsch/dstripe:1.1 dwidestripe /data/bmol239/Analysis/trouble-shooting/dwi.mif /data/bmol239/Analysis/trouble-shooting/mask.mif /data/bmol239/Analysis/trouble-shooting/dstripe_field.mif -device cpu -corrected dwi_ds.mif -debug

The error message :

MRLoader load_np_funs: {'source': <function get_all at 0x7f722fa40d40>, 'target': <function get_all at 0x7f722fa40d40>}
MRLoader load_sample_funs: <function split_by_vol at 0x7f722fa3c200>
loading data, cropped to mask: False
{'mask_source': 'nn/mask.mif', 'source': 'nn/amp.mif'}
Traceback (most recent call last):
File "/opt/dStripe/dstripe/eval_stripes3.py", line 495, in
transforms_val=SampleToTensor4D(), nsamples=0, poverride_dict=poverride_dict)
File "/opt/dStripe/dstripe/trainer.py", line 525, in predict_val
self.__load_validation_data(transforms=transforms_val)
File "/opt/dStripe/dstripe/trainer.py", line 197, in __load_validation_data
self.__load_data('val', transforms)
File "/opt/dStripe/dstripe/trainer.py", line 180, in __load_data
memmap=self.p.dict.get('memmap', False))
File "/opt/dStripe/dstripe/dataloader2.py", line 143, in init
for _im, _md in self.__postproc(imdata, md):
File "/opt/dStripe/dstripe/dataloader2.py", line 184, in __postproc
for imdat, mdat in gen:
File "/opt/dStripe/dstripe/dwitools.py", line 135, in gen
im, md = normalise_fun(im, md)
File "/opt/dStripe/dstripe/dwitools.py", line 94, in normalise_fun
im['source'] *= v
numpy.core._exceptions.UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int16') with casting rule 'same_kind'
dwidestripe: /opt/env/bin/python3 /opt/dStripe/dstripe/eval_stripes3.py /opt/dStripe/models/dstripe_2019_07_03-31_v2.pth.tar.json nn/amp.mif nn/mask.mif --butterworth_samples_cutoff=0.65625 --outdir=/dwidestripe-tmp-K0VX2U/ --verbose=0 --batch_size=1 --write_field=true --write_corrected=false --slice_native=false --attention --device=cpu

dwidestripe: [ERROR] failed with return code 1

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.