frankkramer-lab / MIScnn

A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
GNU General Public License v3.0
402 stars 116 forks source link

Problem with importing one of the methods #31

Closed amirmmi closed 4 years ago

amirmmi commented 4 years ago

Hi @muellerdo and thanks for sharing your knowledge, in run_misccn.py script, I can't import "load_csv2fold" method from "miscnn.evaluation.cross_validation", I read the document and also the cross-validation class but I didn't find such that method. in: https://github.com/frankkramer-lab/covid19.MIScnn/blob/4306f0db107591f8f2307e8364d3987b5f70b012/scripts/run_miscnn.py#L32

and when I import this: https://github.com/frankkramer-lab/covid19.MIScnn/blob/4306f0db107591f8f2307e8364d3987b5f70b012/scripts/run_miscnn.py#L126

I get the error:

from miscnn.evaluation.cross_validation import load_csv2fold ImportError: cannot import name 'load_csv2fold' from 'miscnn.evaluation.cross_validation'

please tell me how to fix this problem best regards Amir

muellerdo commented 4 years ago

Hi @amirmmi,

Issue

check out this issue, a week ago: https://github.com/frankkramer-lab/covid19.MIScnn/issues/10.

The problem occurred because of an outdated MIScnn dependency in the requirements.txt file. For upgrading MIScnn to version 0.34, you can either pull the latest commit from the covid19.MIScnn repository and rerun pip:

git pull
pip3 install -r requirements.txt

or directly just install version 0.34 via pip

pip3 install miscnn==0.34

Documentation

The split/run_folds as well as the fold2disk functionality is not yet documented due to it is still experimental. The aim is to allow multi-gpu support for cross-validations in order to drastically reduce training time. For easier reproducibility/transparency, the sampling of the training/validation sets will be written to disk.

In MIScnn version 0.34, this is done via CSV files with the functions write_fold2csv & load_csv2fold. Here the CV class at version 0.34: https://github.com/frankkramer-lab/MIScnn/blob/1a1915560bfb2db6e7442ef95a8704056c7f4a0d/miscnn/evaluation/cross_validation.py

In the current MIScnn version, I switched from CSV to JSON, because the CSV solution was quick and dirty whereas JSON is better suited for this situation: https://github.com/frankkramer-lab/MIScnn/blob/master/miscnn/evaluation/cross_validation.py

Summary

In order to reproduce the COVID-19 experiment, install the MIScnn version 0.34 (specified in the requirements.txt). Then everything should run fine!

Cheers, Dominik

amirmmi commented 4 years ago

@muellerdo thank you very much for your answer, you made me a great favor =)))

with the best wishes for you Amir

Rajeshkumarkesavan commented 3 years ago

hi muellerdo can you just give us as a docker image with all pretrained and dependancies, coz i don't have a high end hardware specification