LOCKPORT, N.Y. — Jim Shultz tried everything he could think of to stop facial recognition technology from entering the public schools in Lockport, a small city 20 miles east of Niagara Falls. He posted about the issue in a Facebook group called Lockportians. He wrote an Op-Ed in The New York Times. He filed a petition with the superintendent of the district, where his daughter is in high school.

But a few weeks ago, he lost. The Lockport City School District turned on the technology to monitor who’s on the property at its eight schools, becoming the first known public school district in New York to adopt facial recognition, and one of the first in the nation.

The district, said Mr. Shultz, 62, “turned our kids into lab rats in a high-tech experiment in privacy invasion.”