Part 3 (5 points, coding task)
In this part, we create our image and text datasets.
-
All sample indices are selected from
indicesgenerated in Part 2. -
All images (resp. texts) are extracted from the key
image(resp.alt_text). -
The image (resp. text) dataset is called
image_list(resp.text_list). The data type of both datasets arelist`. -
In
image_list, each element is an PIL object. -
In
text_list, each element is a string object.