Skip to content

Commit

Permalink
Update prepare_hdf5_cutedge.py
Browse files Browse the repository at this point in the history
Change the script to make h5 data in the training set
  • Loading branch information
tbuikr committed Sep 14, 2019
1 parent 7274a7a commit 0fe2e4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prepare_hdf5_cutedge.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import h5py

#Path to your dataset (img, hdr files)
data_path = '/media/toanhoi/Study/databaseSeg/ISeg/iSeg-2017-Testing'
data_path = '/media/toanhoi/Study/databaseSeg/ISeg/iSeg-2017-Training'
#Saved path
target_path = './data_train_nocut'
#Reference https://github.com/zhengyang-wang/Unet_3D/tree/master/preprocessing
Expand Down Expand Up @@ -66,7 +66,7 @@ def build_h5_dataset(data_path, target_path):
'''
Build HDF5 Image Dataset.
'''
for i in range(11,23):
for i in range(0,10):
#Skip subject 9 for validation
if (i==8):
continue
Expand Down Expand Up @@ -117,4 +117,4 @@ def build_h5_dataset(data_path, target_path):
if __name__ == '__main__':
if not os.path.exists(target_path):
os.makedirs(target_path)
build_h5_dataset(data_path, target_path)
build_h5_dataset(data_path, target_path)

0 comments on commit 0fe2e4f

Please sign in to comment.