STERLING, Va. — A group of veterans inspired by the need to keep schools and public spaces safer have created a new technology they say can detect guns and send out alerts before shots are ever fired.

Active shooter situations have played out across the country – a gunman opened fire inside a Florida high school, shots rang out at a Texas Walmart and multiple people were shot to death in an office building in Virginia Beach.

The nation's most recent school shooting happened Thursday morning – when a 16-year-old high school student in Santa Clarita, California, opened fire in the campus quad, shooting five classmates and killing two.

RELATED: Virginia Beach mass shooting survivor recalls finding one of the first victims

RELATED: 2 students killed, several hurt in Southern California high school shooting

What if the gun was detected early – so early, the shooter was never able to get inside to hurt anyone? The technology to do that exists, and only WUSA9 was there when it was tested in Northern Virginia.

During the drill, former Special Operations Naval Officer Kieran Carroll played the role of an active shooter while former Navy SEAL Mike Lahiff monitored the action and the technology.

Lahiff is the CEO of ZeroEyes, and also a father of four.

“Look at Sandy Hook, Parkland, it's terrible,” Lahiff said. “It's hard to talk about, gets me choked up, any normal human being it should, and that's where we want to make a difference.”

To do that, Lahiff's team, which includes seven Army and Navy veterans, thought about what they learned in the military and how it could be used in an active shooter situation.

“If we could get in sooner, right to the location as soon as possible, decrease that response time and mitigate the threat, then you could get first aid in there sooner and now you could start saving lives,” Lahiff explained.

ZeroEyes uses artificial intelligence to detect guns in real time. The system hooks into existing security cameras, and if it recognizes a gun, it will highlight the weapon and spit out an alert. The alert is similar to an app alert you get on your phone or computer. Depending on the setup, that alert goes to the police or to administrators on site to decide what to do next.

Below: ZeroEyes shows off how its technology works in a live-action demonstration.

The team has trained for a lot of scenarios with police departments. They’ve trained the A.I. with multiple shooters, different types of guns, and even in one scenario where the shooter changed clothes to blend in. They can track movements and send updates as the gunman passes different cameras.

“So now we can send a keyframe image of what that shooter looks like, what type of weapon they have – is it a pistol is it a rifle -- and their location,” Mike told us.

ZeroEyes alert
The alert is similar to an app alert you get on your phone or computer. Depending on the setup, that goes to the police to the administrators on site to decide what to do next.
WUSA9

Diversified, a systems and media technology integration company, hosted the demo. The company wanted to check out ZeroEyes for its clients and for use in its offices.

“In a setting like this, we have people working, we don’t have people at the entrances and exits always, or even at the front desk area, so this removes the human element from catching a perpetrator and it provides that automatic notification,” Bill Aheimer, director of Diversified's electronic security solutions division, said.

Aheimer took us through what would happen after an alert goes out.

“What we would do is, we would notify via public address system where the location of the shooter is and where the best entrances and exits are and so people would know then where to exit the building. Since we don’t have an active guard force, the call would go to 911,” he said.

In a school system, the alert would likely go to a school resource officer and school administrators through an app. That's the scenario officials from Manassas City Public Schools, who also came to see the technology demonstration, were most interested in.

“Everything we have now is, 'What do we do when the shooter is inside the school?’” Executive Director of Finance and Operations for Manassas City Public Schools Andy Hawkins said. “We're looking for some type of, for lack of a better term, sort of an electronic fence around our schools.”

But not everyone views this new technology in a positive light. The ACLU of Virginia has expressed concerns about ZeroEyes.

“We do not believe any such tech should be deployed by any government agency, and particularly in schools, without a very public process in which people in the community have a chance to weigh in and ensure that they are comfortable with the limits on privacy that they are accepting and understand and support the policies that will guide the acquisition, storage and use of personal information about them (where they go, what they do, etc),” Executive Director Claire Guthrie Gastañaga told us. “At a minimum, police agencies and other public agencies should not be able to buy or deploy this kind of technology without approval of the appropriate elected officials.”

We asked Hawkins about those issues.

“We want to be very transparent,” he said. “We want the public to know. But I think the overriding, the majority of the parents would want us to be able to identify bad guys as soon as possible to protect their children while they’re in school.”

Below: ZeroEyes takes questions during a Q&A about its gun recognition technology.

Hawkins hopes parents remember that, in an emergency, every second counts.

“I think if these shootings continue across America and we continue to see our children slaughtered like they have been throughout this country, that there will be more calls for ways to identify and to stop these guys as much as we possibly can,” he added.  “Just think about how many lives that we could save in the schools.”

Right now, a ZeroEyes system running on 25 cameras costs about $15,000 a year. There are competitors offering similar products as well. According to Lahiff, there are millions of cameras out there, so if they're all working to stop active shooters, that's fantastic.

RELATED: Schools shift focus to adding layers of defense against shootings

Download the brand new WUSA9 app here.

Sign up for the Get Up DC newsletter: Your forecast. Your commute. Your news.