I think Processing can do that, but of course, due to the size of the dataset you will need to be very careful in the loading step, or everything will collapse.
The best thing would be to organize the directory of images in such a way that you can randomize the names of the files and load only the selected ones.