baumgach / acdc_segmenter

Public code for our submission to the 2017 ACDC Cardiac Segmentation challenge
Apache License 2.0
100 stars 38 forks source link

Evaluation of model during training fails. #9

Closed asciidiego closed 5 years ago

asciidiego commented 5 years ago

In your README.md file you say the following:

At any point during the training, or after, you can evaluate your model by typing the following:

python evaluate acdc_logdir/unet3D_bn_modified_wxent

So, when I try to evaluate my model during training, I get the following:

(acdc) diego@localhost:~/repos/acdc_segmenter$ python evaluate acdc_logdir/unet2D_bn_wxent_bs5
python: can't open file 'evaluate': [Errno 2] No such file or directory

So, then I saw that you have your .py file called evaluate_patients in the root folder, so instead I tried:

(acdc) diego@localhost:~/repos/acdc_segmenter$ python evaluate_patients.py acdc_logdir/unet2D_bn_wxent_bs5

But then I get a segmentation fault. > Segmentation fault (core dumped)

How can I evaluate my model during training?

asciidiego commented 5 years ago

I managed to fix it. I will explain the solution in case anybody experiences the same error.

I was using a Conda Virtual Environment to manage the Python Virtual Environments and I think that had something to do with it.

It was necessary to reinstall matplotlib since the file that was failing was the importing of the acdc_metrics.py file.

Now everything works, I managed to train from scratch the models.

If you want @baumgach, before closing this issue I can make a pull request with the Conda Environment for Ubuntu so that anybody that wants to use this only has to use Anaconda and use the command:

conda create -f environment.yml

baumgach commented 5 years ago

Yes please make a pull request, that would be great. Thanks for your contributions!

I have removed the buggy dependency to pkg-resources-0.0.0

asciidiego commented 5 years ago

I issued a pull request with some of the changes I have been working with at #10 .