promise12_segmentation
promise12_segmentation copied to clipboard
about py2.7 topy3.5
Sorry to bother you,but I notice that you use python2.7,now I want to transform it to python3.5,.But in py3.5,filter produce a generator format, not like py2.7(list format),I do not know how to transform it so I delete the line48 and 95(fileList.sort() can not work).
but problem still happened:
Traceback (most recent call last):
File "C:/Users/lz666/PycharmProjects/promise12_segmentation/codes/train.py", line 233, in
Hi @lz666win. Don't delete that line. fileList needs to be sorted. Instead I would suggest doing something like:
fileList = list(os.listdir('../data/train/'))
fileList = list(filter(lambda x: '.mhd' in x, fileList))
fileList.sort()
Sorry to bother you again.I finished train.py and began test.py, problem happened:
127/127 [==============================] - 30s 236ms/step
Results on validation set
Accuracy: 0.8315926206157773
Traceback (most recent call last):
File "F:/promise2012/promise12_segmentation-master/codes/test.py", line 255, in - operator, is deprecated, use the bitwise_xor, the ^ operator, or the logical_xor function instead.
I check your metiric.py ,the function is surface_dist(input1, input2, sampling=1, connectivity=1),I do not know what it is for,but as I thought, both input_1 and conn are boolean type,they can not minnus,so can you fix it?
@lz666win
hi If you still not resolved the mentioned error, i suggest you to change - by ^
So I trying to run this repository but i meet an error also in test file in the following line:
imgs = [ X_test[n_imgs[row[0]-1]+row[1]] for row in case_slices ]
So from where you obtaained the testsamples folder?, for me, I recupared some png images from promise12.
please if you meeto this error and you found solution, please let me.
Thank you in advance