Many US schools have installed "security cameras" with facial recognition. Perhaps most schools.
It's legitimate (and useful) to have cameras with computers that detect people with guns, or people without masks. Likewise to send the photos of those people to school staff, who could take appropriate action -- or sound an alarm. Those are legitimate precisely because they don't track anyone who hasn't done something that requires attention.
What is not legitimate is to identify students, or make pictures of them available to anyone else (at the same time or later), in the absence of a specific wrong that they are doing. They must be true security cameras, not >surveillance cameras.