@@ -376,17 +376,6 @@ def read_filenames(fname, path=None):
376
376
377
377
return handle_files
378
378
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 ]
390
379
391
380
def make_blueberry_dataset (path_src , path_dest , img_type = "jpg" , n_each_folder = 2 , pair_spacing = 0 ):
392
381
"""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,
432
421
433
422
if fnames_images is None :
434
423
print ("Subdir {n} has no images of type {img_type}" )
435
- continue ;
424
+ continue
436
425
437
426
if not exists (path_dest_subdir ):
438
427
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,
458
447
sys_cmd_str = f"cp { search_dir_path } /{ fnames_images [im_next ]} { path_dest_subdir } { fnames_images [im_next ]} "
459
448
system (sys_cmd_str )
460
449
461
- if b_use_sub_folder_names :
462
- all_files .add
463
-
464
-
465
450
466
451
all_files = HandleFileNames (path_dest , img_type = img_type )
467
452
468
453
469
-
470
-
471
454
if __name__ == '__main__' :
472
455
# Example bb
473
456
path_bpd = "./data/blueberries/"
0 commit comments