Skip to content

Commit d03964b

Browse files
committed
Rolling back changes (probably will not work exactly)
1 parent 4fc15cf commit d03964b

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

Image_based/HandleFileNames.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,6 @@ def read_filenames(fname, path=None):
376376

377377
return handle_files
378378

379-
@staticmethod
380-
def get_name_base_no_number(fname):
381-
"""Take out everything after ., and take out numbers
382-
@param fname - the file name
383-
@return the file name, stripped"""
384-
name_pieces1 = fname.split(".")[0]
385-
name_pieces2 = name_pieces1.split("_")[0]
386-
name = "rbg"
387-
for s in name_pieces2:
388-
if
389-
name_pieces_prev = fnames_images[im_prev]
390379

391380
def make_blueberry_dataset(path_src, path_dest, img_type="jpg", n_each_folder=2, pair_spacing=0):
392381
"""Assumes there's a folder with multiple folders with multiple images in each folder
@@ -432,7 +421,7 @@ def make_blueberry_dataset(path_src, path_dest, img_type="jpg", n_each_folder=2,
432421

433422
if fnames_images is None:
434423
print("Subdir {n} has no images of type {img_type}")
435-
continue;
424+
continue
436425

437426
if not exists(path_dest_subdir):
438427
if b_use_sub_folder_names:
@@ -458,16 +447,10 @@ def make_blueberry_dataset(path_src, path_dest, img_type="jpg", n_each_folder=2,
458447
sys_cmd_str = f"cp {search_dir_path}/{fnames_images[im_next]} {path_dest_subdir}{fnames_images[im_next]}"
459448
system(sys_cmd_str)
460449

461-
if b_use_sub_folder_names:
462-
all_files.add
463-
464-
465450

466451
all_files = HandleFileNames(path_dest, img_type=img_type)
467452

468453

469-
470-
471454
if __name__ == '__main__':
472455
# Example bb
473456
path_bpd = "./data/blueberries/"

0 commit comments

Comments
 (0)