2025 USA-NA-AIO Round 2, Problem 3, Part 3

Part 3 (5 points, coding task)

In this part, we create our image and text datasets.

  • All sample indices are selected from indices generated 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 are list`.

  • In image_list, each element is an PIL object.

  • In text_list, each element is a string object.

### WRITE YOUR SOLUTION HERE ###

image_list = [dataset_train[idx]['image'] for idx in indices]
text_list = [dataset_train[idx]['alt_text'][0] for idx in indices]

""" END OF THIS PART """