image_output_4.png image_output_3.png image_output_2.png image_output_1.png
import matplotlib.image as mpimg

import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd
caption_file = data_location + '/captions.txt'
df = pd.read_csv(caption_file)

import matplotlib.pyplot as plt
import matplotlib.image as mpimg
data_idx = 56
image_path = data_location + '/Images/' + df.iloc[data_idx, 0]
img = mpimg.imread(image_path)
plt.imshow(img)
plt.show()
for i in range(data_idx, data_idx + 5):
    print('Caption:', df.iloc[i, 1])