October 2018
Intermediate to advanced
472 pages
10h 57m
English
Now we will pre-process each image with the deep CNN encoder and dump the output to the disk:
encode_train = sorted(set(img_name_vector))#Load imagesimage_dataset = tf.data.Dataset.from_tensor_slices( encode_train).map(load_image).batch(16)# Extract featuresfor img, path in image_dataset: batch_features = image_features_extract_model(img) batch_features = tf.reshape(batch_features, (batch_features.shape[0], -1, batch_features.shape[3]))#Dump into disk for bf, p in zip(batch_features, path): path_of_feature = p.numpy().decode("utf-8") ...Read now
Unlock full access