A registered sex offender was found with a six-year-old girl after he was detected by facial recognition technology.