The surveillance system that has kept watch on students entering Lockport schools for over a decade is getting a novel upgrade. Facial recognition technology soon will check each face against a database of expelled students, sex offenders and other possible troublemakers.

It could be the start of a trend as more schools fearful of shootings consider adopting the technology, which has been gaining ground on city streets and in some businesses and government agencies. Just last week, Seattle-based digital software company RealNetworks began offering a free version of its facial recognition system to schools nationwide.

Already, the Lockport City School District's plan has opened a debate in this western New York community and far beyond about the system's potential effectiveness, student privacy and civil rights.

"We shake our heads that we're having to deal with and talk about these kinds of security issues," said Robert LiPuma, technology director for the Lockport district, east of Niagara Falls, "but here we are."

The idea behind the Lockport system is to enable security officers to quickly respond to the appearance of expelled students, disgruntled employees, sex offenders or certain weapons the system is programmed to detect. Only students seen as threats will be loaded into the database. Officials say it is the first school district in the country to adopt the Canadian-made system it is installing.

Administrators say it could thwart shootings like February's attack in which expelled student Nikolas Cruz is charged with killing 17 at Marjory Stoneman Douglas High School in Parkland, Florida.

"This would have identified (Cruz) as not being able to be in that building," said Tony Olivo, a security consultant who recommended the system for Lockport. Cameras mounted throughout the building would have followed the banned student's every move until he left.

Critics say the technology has been absent from schools for good reason.

In light of Lockport's plans, the New York Civil Liberties Union asked the state Education Department to block the technology from any New York school, saying it would "have a chilling effect on school climate." Education officials say they are reviewing the request.

"Lockport is sending the message that it views students as potential criminals who must have their faces scanned wherever they go," NYCLU Executive Director Donna Lieberman said.

Jennifer Lynch, senior staff attorney with the Electronic Frontier Foundation, a digital rights group, said any school considering facial recognition must consider who will have access to data, how such a system would be managed and whether students can opt out.

Others question the technology's cost and effectiveness, given reports like one released in February by MIT and Stanford University that found some facial recognition programs don't work as well on racial minorities and women.

Lockport parent Belinda Cooper would have preferred metal detectors in her 15-year-old daughter's school.

"It would have been cheaper for the school district, and you can guarantee no guns or knives will be brought in," she said.

District officials say the Aegis system they are installing, made by SN Technologies of Ontario, will not build or store a database of student and faculty face prints that could be shared with the government or marketers. Nor will the $1.4 million cost, funded through a state technology bond, siphon funding from staffing or supplies.

District officials acknowledge it won't stop a determined attacker from coming through the door, nor will it warn against someone who is not a known threat.

But "there's no system that's going to solve every problem," LiPuma said. "It's another tool that we feel will give us an advantage to help make our buildings and our communities a little safer."

Individual schools and districts, as well as the governors of Wyoming and one other state, have already expressed interest in RealNetworks' customizable SAFR System, senior product director Michael Vance said.

At the University Child Development School in Seattle where it was piloted, rather than rely on office staff buzzing in late arrivals or visitors, the system gives parents who have registered their faces automatic access through a locked gate and tells the office who is coming. Schools can opt to register students' faces and customize how to respond to people who have been flagged for alert.

"All of that resides with the school," Vance said. "We don't see it. We don't have access to the pictures, the images, the video, anything like that. It's stored in the same way that school attendance databases, grades, records, everything is kept."

Nevertheless, citing a patchwork of regulations, Vance said the company would welcome the kind of government guidelines for facial recognition technology that Microsoft President Brad Smith called for in a blog post July 13.

In Lockport, as crews worked on wiring the system inside, 16-year-old student Teliyah Sumler expressed some reservations.

"I feel like it's too personal," she said. "Cameras all in my face. It's too much."

Khari Demos, 22, who has two siblings in Lockport High School, said he worries for their safety and views facial recognition as another piece of a security puzzle that includes locked doors and active shooter drills.

"It'll actually identify who should and shouldn't be in the school," said Demos, who graduated from the school in 2013. "The system will never be 100 percent perfect but it's a step in the right direction."