October 2018
Intermediate to advanced
472 pages
10h 57m
English
We will now define a function called model_data() that accepts a list of images and a list of labels. This function will apply the make_normalize() function on each image for the purpose of normalizing, and it will apply the make_encode() function on each label/segmentation array to obtain the encoded array.
The return of this function is two lists, one containing the normalized images and the other containing the corresponding target arrays:
def model_data(images, labels): """Function to perform normalize and encode operation on each image.""" # empty label and image list array_lst = [] label_lst=[] # apply normalize function on each image and encoding function on each label for x,y in tqdm(zip(images, labels)): array_lst.append(np.rollaxis(normalized(x), ...
Read now
Unlock full access