Giter Site home page Giter Site logo

frankkramer-lab / covid19.miscnn Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 31.0 2.45 MB

Robust Chest CT Image Segmentation of COVID-19 Lung Infection based on limited data

License: GNU General Public License v3.0

Python 85.25% R 14.75%
3d-unet computer-vision covid-19 covid-19-ct deep-learning healthcare-imaging infection lung-disease lung-lobes lung-segmentation medical-image-analysis medical-image-processing medical-imaging pneumonia segmentation tensorflow u-net

covid19.miscnn's Issues

"Iterations" param in run_fold

From what I understand, the "iterations" parameter is the steps per epoch. In your script, you fixed that as 150. During my training, I tried to leave that as default, hence None, hoping that it will run through all the created patches. However, it showed 10 as the steps per epoch during the training. Does this mean the network only trains on 10*batch_size(=2) = 20 patches per epoch? This is way too few.

Do I misunderstand something here? Thanks a lot for your help!

Citation

Dear @muellerdo

Thanks for using our dataset. It would be highly appreciated if you could add following citation in your paper.

@article{COVID-19-SegBenchmark,
  title={Towards Efficient COVID-19 CT Annotation: A Benchmark for Lung and Infection Segmentation},
  author={Ma Jun and Wang Yixin and An Xingle and Ge Cheng and Yu Ziqi and Chen Jianan and Zhu Qiongjie and Dong Guoqiang and He Jian and He Zhiqiang and Ni Ziwei and Yang Xiaoping},
  journal={arXiv preprint arXiv:2004.12537},
  year={2020}
}

Best regards,
Jun

Time

Hello, I would like to ask you, what kind of running program do you use? I ran on the server and trained 5 times for 3 days. The speed is too slow, and you trained 1000 times, so can you tell me what you used to run the program method.

Multi-GPU or how to choose a particular GPU

Hi,

I have a confusion in the use of the GPUs. the function Neural_Network use le variable gpu_number (version 0.34), but if the GPU=0 is busy and I get an error. The last version of miscnn use the variable multi_gpu=boolean.

Could you explain to me how to set the use of a particular gpu.

Thank

Patchwise Overlap

Hi,

I've noticed something that Patchwise Overlap is 80x80x40 in the paper but it is 80x80x30 in the code. If overlap shape is not half of patch shape , is that okey ?

Interesting Journals

IEEE Transactions on Medical Imaging:
Special Issue on "Imaging-based Diagnosis of COVID-19"

IEEE Journal of Biomedical and Health Informatics:
Special Issue on "AI-driven Informatics, Sensing, Imaging and Big Data Analytics for Fighting the COVID-19 Pandemic"

Medical Image Analysis:
Special Issue on "Intelligent Analysis of COVID-19 Imaging Data"

Dataset HU range

Hi @frankkramer

When I check the dataset, There are 2 part coranacases and radiopedia. For the radiopedia part the images set up 0-255. But for the coronacases part HU range -1250 to 250. I wonder how do you overcome this problem.

patch shape

Hi,

I have a question regarding the patch shape in the script run_miscnn.py. It is set as (160, 160, 80). Is the z-axis, 80 represents the number of slices in the patch? However, in your source code of Miscnn, you wrote:
patch_shape (integer tuple): Size and shape of a patch. The variable has to be defined as a tuple.
For Example: (64,128,128) for 64x128x128 patch cubes.
Be aware that the x-axis represents the number of slices in 3D volumes.

Can you clarify this for me?

Best wishes,
LHJ

Cannot import split module

Hey guys,
Great work. I am trying to reproduce the results from your paper.
Here is the error I am getting


2020-07-22 15:59:09.423261: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
Traceback (most recent call last):
  File "scripts/run_preprocessing.py", line 25, in <module>
    from miscnn.evaluation.cross_validation import split_folds
ImportError: cannot import name 'split_folds

Please have a look and suggest any fix

Thanks

Incompatible numpy & tensorflow & miscnn

The contradictory required version of numpy & miscnn, numpy & tensorflow made it impossible to run the code. Furthermore, NIFTI_interface is not defined. I managed to get into the source code but can't debug it due to lack of software coding knowledge.

Slicing Method

Sir, firstly it is great repository and I want to say thank you.
Could you give more information about how did you slice 3D images into patches (I believe patch means slices of 2D image which is extracted from 3D images, am I wrong)?

Add Mac M1 Apple Silicon Support

Issue:
arm64 architecture needs tensorflow-macos, which is currently not recognized by aucmedi
Solution:
aucmedi-macos that depends on tensorflow-macos

Getting Error in run_miscnn

File "scripts/run_miscnn.py", line 120, in
save_models=False)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/miscnn/evaluation/cross_validation.py", line 166, in run_fold
iterations=iterations, callbacks=cb_list)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/miscnn/neural_network/model.py", line 201, in evaluate
max_queue_size=self.batch_queue_size)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 108, in _method_wrapper
return method(self, *args, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 1098, in fit
tmp_logs = train_function(iterator)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 780, in call
result = self._call(*args, **kwds)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 840, in _call
return self._stateless_fn(*args, **kwds)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2829, in call
return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1848, in _filtered_call
cancellation_manager=cancellation_manager)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1924, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 550, in call
ctx=ctx)
File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[node functional_1/conv3d/Conv3D (defined at /home/ubuntu/anaconda3/lib/python3.7/site-packages/miscnn/neural_network/model.py:201) ]] [Op:__inference_train_function_9673]

Function call stack:
train_function

2020-12-07 06:04:13.638644: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Failed precondition: Python interpreter state is not initialized. The process may be terminated

Error while executing download data script

Executing scripts/download_data.py gives following error

$ python3 scripts/download_data.py

INFO: Downloading Volumes
COVID-19-CT-Seg_20cases.zip?download=1:   0%|                   | 1.20k/1.11G [00:00<225:54:25, 1.36kB/s]
INFO: Downloading Segmentations
Lung_and_Infection_Mask.zip?download=1:   0%|                     | 1.20k/11.7M [00:00<2:24:22, 1.35kB/s]
INFO: Obtain sample list from the volumes ZIP file
Traceback (most recent call last):
  File "scripts/download_data.py", line 85, in <module>
    with zipfile.ZipFile(path_vol_zip, "r") as zip_vol:
  File "/home/cinnamon/Repositories/miniconda3/envs/covid/lib/python3.6/zipfile.py", line 1131, in __init__
    self._RealGetContents()
  File "/home/cinnamon/Repositories/miniconda3/envs/covid/lib/python3.6/zipfile.py", line 1198, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

How to overcome this issue

About running errors

Hello, I'm sorry to disturb you, but I encountered some problems while running the program you wrote. I hope you can answer.
In the process of running run_miscnn.py, it always shows that there is no imaging.nii.gz file. I have copied it from other sources. If it exists, it still reports this error. So I want to ask, did you pass other files? We have processed the data and look forward to your reply. Greatful.

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.