eda/compress_eda.py
def compress(in_path, out_path, qf):
    '''Method to compress images by given path into given path and given qualitfactor.

    Args:
        in_path (string): Path to a folder that consists of images
        out_path (string): Path to folder where compressed images should be saved into
        qf (int): Quality factor of the compression
    '''
    jpeg = TurboJPEG(LIB_PATH)

    images = os.listdir(in_path)

    if not os.path.isdir(out_path):
        os.makedirs(out_path)
    
    for img in tqdm(images):
        img_name = img.split('.')[-2]
        compress_image(jpeg, f'{in_path}/{img}', f'{out_path}/{img_name}.JPG', qf)
Method to compress images by given path into given path and given qualitfactor.

    Args:
        in_path (string): Path to a folder that consists of images
        out_path (string): Path to folder where compressed images should be saved into
        qf (int): Quality factor of the compression
    
Method to compress images by given path into given path and given qualitfactor.
Method to compress images by given path into given path and given qualitfactor .
def compress(in_path, out_path, qf):
    jpeg = TurboJPEG(LIB_PATH)
    images = os.listdir(in_path)
    if not os.path.isdir(out_path):
        os.makedirs(out_path)
    for img in tqdm(images):
        img_name = img.split('.')[-2]
        compress_image(jpeg, f'{in_path}/{img}', f'{out_path}/{img_name}.JPG', qf)
def compress ( in_path , out_path , qf ) : jpeg = TurboJPEG ( LIB_PATH ) images = os . listdir ( in_path ) if not os . path . isdir ( out_path ) : os . makedirs ( out_path ) for img in tqdm ( images ) : img_name = img . split ( '.' ) [ - 2 ] compress_image ( jpeg , f'{in_path}/{img}' , f'{out_path}/{img_name}.JPG' , qf )
Method to compress images by given path into given path and given qualitfactor.
Method to compress images by given path into given path and given qualitfactor .
'''Method to compress images by given path into given path and given qualitfactor.

    Args:
        in_path (string): Path to a folder that consists of images
        out_path (string): Path to folder where compressed images should be saved into
        qf (int): Quality factor of the compression
    '''
in_path
Path to a folder that consists of images
Path to a folder that consists of images
out_path
Path to folder where compressed images should be saved into
Path to folder where compressed images should be saved into
qf
Quality factor of the compression
Quality factor of the compression