How does label detection work?