by something like this https://github.com/WillBrennan/BlurDetection2
With some threshold value to sort in sub folders . I imagine it wouldn't be perfect but combining with some metadata based categories like shatter speed, in camera motion compensation, drone made, lens used etc it could do the job imo.
So not necessary AI based.
We could use it to sort out of focus pictures automatically in photogrammetry series for example.
I would think it is better to do this as part of the initial weeding process, using whatever suitable app is available.