Yes. I suggest you actually read the GDPR rather than drawing caricatures of it based on not actually knowing the law. It is very readable.
https://www.privacy-regulation.eu/en/recital-32-GDPR.htm
Consent should be give per purpose. So, if you asked consent to access photos for performing an upload when the user requested it, you cannot use that to do an ML analysis of all the photos. But obviously, if the users gave consent to e.g. analyzing all photos for face recognition, you do not have to ask this for every photo, every scan, etc. It should just be easy to revoke the consent and remove any data stored.
(IANAL blah blah)
The GDPR is really a straightforward law. It only isn't if you want to collect private data without telling the user about it. Or if you want to use dark patterns to make the user accept data collection without them giving free, informed consent.