text_html_output_1.png
from time import time

import cv2

import numpy as np

import pandas as pd

def breaker():
    pass
def head(x, no_of_ele=5):
    pass
def getImages(file_path=None, file_names=None, size=None):
    images = []
    for name in file_names:
        try:
            image = cv2.imread(file_path + name + '.jpg', cv2.IMREAD_GRAYSCALE).astype('float64')
        except AttributeError:
        if size:
            image = cv2.resize(image, dsize=(size, size), interpolation=cv2.INTER_LANCZOS4)
        cv2.normalize(src=image, dst=image, alpha=0, beta=1, norm_type=cv2.NORM_MINMAX)
        images.append(image.reshape(1, size, size))
    return np.array(images)

start_time = time()
ss = pd.read_csv('../input/ranzcr-clip-catheter-line-classification/sample_submission.csv')
ts_img_names = ss['StudyInstanceUID'].values
ts_images = getImages('../input/ranzcr-clip-catheter-line-classification/test/', ts_img_names, size=144)
breaker()
print('Time Taken to read data : {:.2f} minutes'.format((time() - start_time) / 60))
breaker()