Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
replace backslash with os.sep, and remove underscore in proprocess_ims
Browse files Browse the repository at this point in the history
  • Loading branch information
danzelmo committed Oct 1, 2017
1 parent 73b0384 commit 47d2f2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/preprocess_ims.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def combine_masks(processed_folder):

base_name = os.path.basename(i)
ind = base_name.find('cam')
new_fname = base_name[:ind] + '_mask'+ base_name[ind+4:]
new_fname = base_name[:ind] + 'mask'+ base_name[ind+4:]

dir_base = str(os.sep).join(i.split('/')[:-1])
dir_base = str(os.sep).join(i.split(str(os.sep))[:-1])
misc.imsave(os.path.join(dir_base, new_fname), im)
os.remove(i)
os.remove(cam3[e])
Expand Down

0 comments on commit 47d2f2c

Please sign in to comment.