You can't use the brute force method to find any "person" you have in the database. You can only find any "photograph" that you have in the database.
If you have a photograph of me, and I just let my hair and beard grow for a month, then you won't match the mosaic version of my hairy version with the old photograph.
Perhaps you can add some filters to adapt the contrast, luminosity, hue, illumination, rotation, pixel shifts and noise. It would be more difficult to fix the head orientation, open/close mouth/eyes.
Imagine a future where 3D depth-sensitive cameras are prevalent - this means that a 3D model of a person's head can be easily obtained.
Then futuristic analysis software that, from a picture, can determine all the light-sources in that image and 3D positions thereof.
So take a photo, analyze it for light-sources, then brute-force it by applying 3D models of every face in your database with the known light-sources and run it through the mosaic filter.
Futuristic technology could help here. Probably wouldn't work since I'm sure one person's mosaic would match too closely somebody with similar features and a similarly-shaped head.
If you have a photograph of me, and I just let my hair and beard grow for a month, then you won't match the mosaic version of my hairy version with the old photograph.
Perhaps you can add some filters to adapt the contrast, luminosity, hue, illumination, rotation, pixel shifts and noise. It would be more difficult to fix the head orientation, open/close mouth/eyes.