labelling/get_all_images_from_large_images.py
def main(src, dst):
    '''
        This function will just go through all of the images in all of the folders and create a new dataset folder
    :return: None
    '''
    if os.path.exists(dst):
        shutil.rmtree(dst)
    os.mkdir(dst)
    for class_folder in os.listdir(src):
        count = 0
        dst_class_folder = os.path.join(dst, class_folder)
        os.mkdir(dst_class_folder)
        class_folder_path = os.path.join(src,class_folder)
        for image in os.listdir(class_folder_path):
            count += 1
            print('log: On class {}, image {}'.format(class_folder, image))
            image_name, ext = os.path.splitext(image)
            src_image_path = os.path.join(class_folder_path,image)
            # dst_image_path = os.path.join(dst_class_folder, os.path.join(image_name+'-{}.tif'.format(count)))
            get_all_images(image_path=src_image_path, dest=dst_class_folder,
                           name=image_name, dimension=10, stride=5, count_seed=0)
    pass

        This function will just go through all of the images in all of the folders and create a new dataset folder
    :return: None
    
This function will just go through all of the images in all of the folders and create a new dataset folder
This function will just go through all of the images in all of the folders and create a new dataset folder
def main(src, dst):
    if os.path.exists(dst):
        shutil.rmtree(dst)
    os.mkdir(dst)
    for class_folder in os.listdir(src):
        count = 0
        dst_class_folder = os.path.join(dst, class_folder)
        os.mkdir(dst_class_folder)
        class_folder_path = os.path.join(src,class_folder)
        for image in os.listdir(class_folder_path):
            count += 1
            print('log: On class {}, image {}'.format(class_folder, image))
            image_name, ext = os.path.splitext(image)
            src_image_path = os.path.join(class_folder_path,image)
            get_all_images(image_path=src_image_path, dest=dst_class_folder,
                           name=image_name, dimension=10, stride=5, count_seed=0)
    pass
def main ( src , dst ) : if os . path . exists ( dst ) : shutil . rmtree ( dst ) os . mkdir ( dst ) for class_folder in os . listdir ( src ) : count = 0 dst_class_folder = os . path . join ( dst , class_folder ) os . mkdir ( dst_class_folder ) class_folder_path = os . path . join ( src , class_folder ) for image in os . listdir ( class_folder_path ) : count += 1 print ( 'log: On class {}, image {}' . format ( class_folder , image ) ) image_name , ext = os . path . splitext ( image ) src_image_path = os . path . join ( class_folder_path , image ) get_all_images ( image_path = src_image_path , dest = dst_class_folder , name = image_name , dimension = 10 , stride = 5 , count_seed = 0 ) pass
This function will just go through all of the images in all of the folders and create a new dataset folder
This function will just go through all of the images in all of the folders and create a new dataset folder
'''
        This function will just go through all of the images in all of the folders and create a new dataset folder
    :return: None
    ''' # dst_image_path = os.path.join(dst_class_folder, os.path.join(image_name+'-{}.tif'.format(count)))
None
src
dst