Under US copyright law, this is probably fair use
...but beware of memorization. You may run into more trouble if the AI outputs things very similar to the original work.
Also, consult a lawyer to help you apply the law to your specific situation. This is just information on general legal principles, not any specific situation, and also I'm not a lawyer.
Disclaimer that every attorney will give unless formally engaged: This does not constitute formal legal advice.
This data was published with the expectation of public view
Viewing that data is a form of utilization—taking in information which may be used to make a decision, or just as divertment (here consumption of entertainment media by humans.)
If any ...
It's not that accessing a set of images wouldn't count as fair use, it's that automatically scraping them probably breaches the terms of service.
The most likely consequence, though, is ...