brats18 icon indicating copy to clipboard operation
brats18 copied to clipboard

How to train,test and evaluation this model?

Open chengjianhong opened this issue 6 years ago • 4 comments

Hi, can you tell me detailedly how to train,test and evaluation this model? I don't know how to run it since the description of code example is not match with the brats18.

chengjianhong avatar Dec 23 '18 06:12 chengjianhong

I have finished data preprocessing, and I change the flag contents insige the main_segmentation.py, but It doesn't work and stop when I run the python main_segmentatio.py. I'm confused wheather need I split all data into training data,Validation data and testing data?

the flag contents:

flags = tf.app.flags flags.DEFINE_integer("phase", 2, "0 - train cv, 1 - test cv, 2 - train validation, 3 - test validation, 4 - test final") flags.DEFINE_string("model", "UNet3D", "Model name [UNet3D]") flags.DEFINE_boolean("with_finetune", False, "With fine tune [False]") flags.DEFINE_string("config", "models/UNet3D.ini", "Model config file [models/UNet3D.ini]") flags.DEFINE_string("train_dir", "/root/userfolder/data/BRATS2018", "Training dir") flags.DEFINE_string("validation_dir", "/root/userfolder/data/BRATS2018", "Validation dir") flags.DEFINE_string("test_dir", "/root/userfolder/data/BRATS2018", "Testing dir")

the result of run the python main_segmentatio.py

root@xxxxxxxxxx:~/userfolder/workspace/brats18# python main_segmentation.py /root/anaconda3/envs/py35/lib/python3.5/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters /root/anaconda3/envs/py35/lib/python3.5/site-packages/dicom/init.py:53: UserWarning: This code is using an older version of pydicom, which is no longer maintained as of Jan 2017. You can access the new pydicom features and API by installing pydicom from PyPI. See 'Transitioning to pydicom 1.x' section at pydicom.readthedocs.org for more information.

warnings.warn(msg) 2018-12-23 17:21:44.119111: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2018-12-23 17:21:47.722730: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties: name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455 pciBusID: 0000:82:00.0 totalMemory: 11.75GiB freeMemory: 11.34GiB 2018-12-23 17:21:47.722863: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0 2018-12-23 17:21:48.218134: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix: 2018-12-23 17:21:48.218205: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0 2018-12-23 17:21:48.218217: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0: N 2018-12-23 17:21:48.218634: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10955 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:82:00.0, compute capability: 7.0)

chengjianhong avatar Dec 23 '18 09:12 chengjianhong

When I switch the python2.7,It also appears some errors as follows:

root@xxxxxxxxx:~/userfolder/workspace/brats18# python main_segmentation.py /root/anaconda3/envs/py27/lib/python2.7/site-packages/dicom/init.py:53: UserWarning: This code is using an older version of pydicom, which is no longer maintained as of Jan 2017. You can access the new pydicom features and API by installing pydicom from PyPI. See 'Transitioning to pydicom 1.x' section at pydicom.readthedocs.org for more information.

warnings.warn(msg) <open file '/root/userfolder/data/BRATS2018/files.log', mode 'r' at 0x7f194f5a0660> Traceback (most recent call last): File "main_segmentation.py", line 120, in tf.app.run() File "/root/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "main_segmentation.py", line 53, in main training_subjects, testing_subjects = pickle.load(f) File "/root/anaconda3/envs/py27/lib/python2.7/pickle.py", line 1384, in load return Unpickler(file).load() File "/root/anaconda3/envs/py27/lib/python2.7/pickle.py", line 864, in load dispatchkey File "/root/anaconda3/envs/py27/lib/python2.7/pickle.py", line 886, in load_eof raise EOFError EOFError

chengjianhong avatar Dec 24 '18 12:12 chengjianhong

Thank you very much. Can you tell me your QQ or Wechat ?

chengjianhong avatar Dec 24 '18 13:12 chengjianhong

I want to communicate with you directly through QQ or WeChat.

chengjianhong avatar Dec 24 '18 13:12 chengjianhong