How to extract pictures randomly

Hello All,

One of my stimulus set contains 96 object categories which consist of 4 images.
Now, I am wondering how to randomly select one of the images of the object category while randomly selecting the object category. This “double randomization” situation is too complicated for me to deal with. If this needs to be implemented in code, please teach me in details. Any help or suggestions would be greatly appreciated. :star_struck:

Best wishes Cheer