BETA
This is a BETA experience. You may opt-out by clicking here

More From Forbes

Edit Story

Why Is This Canadian Hacker Better Than Facebook At Detecting Gun Photos?

This article is more than 8 years old.

CORRECTION: An earlier version of this story incorrectly identified Justin Seitz as a beet farmer. Seitz is not a beet farmer and never was one; he is a hacker.

As the selfies of gun-toting men streamed across his Twitter feed, Justin Seitz had a hunch.

After working as a hacker for most of the past decade, Seitz knows how to sleuth his way around the Internet. He also knows guns, having grown up hunting in rural Canada, “shooting before we were allowed to shoot.” Now, he wanted to know if he could automatically detect photos of guns on social media using image recognition software.

The answer, he discovered after just a few hours of work, is yes.

Seitz used open-source software to pull images people had posted to Twitter of themselves holding guns, running the photos against a basic image recognition tool that tagged photos with keywords indicating whether a gun was present. Here’s an example:

The same approach could be applied to Facebook , Seitz said, which recently banned all private party gun sales on its website. But the change in policy did little to slow the flow of guns being bought and sold through Facebook groups and private messages.

Earlier this month, FORBES identified dozens of gun enthusiast groups where sellers posted photos of guns for sale or trade, clearly violating Facebook's new policy. The challenge for Facebook is that it doesn't use any keyword filtering system or automated algorithm to flag items that appear to violate its policy. Instead, Facebook relies entirely on user reports to remove guns listed for sale, a task made more difficult when much of the buying and selling is taking place in private groups, where members have little or no incentive to report the violations.

“If a beet farmer from Saskatchewan, Canada can do it with a budget of zero dollars, I’m pretty sure Facebook, with all its resources, could probably put an end to this,” Seitz said.

Gun violence prevention groups had long urged Facebook to remove gun ads and praised the company when it announced in January that it would no longer allow the sale of guns or ammunition on the site. Shannon Watts, the founder of Moms Demand Action for Gun Sense in America, was one of the most vocal advocates. Members of the group, now a part of Everytown for Gun Safety, pushed Facebook to distance itself from unregulated online gun sales. Watts was dismayed when she learned about the spate of ongoing gun sales identified by FORBES, calling for more effective enforcement of Facebook's policy.

“We know the policy can be effective. I think it’s on Facebook to make sure it’s effective as it can possibly be,” Watts said, adding that if image recognition proved to be effective in reducing gun sales on the site, she would support its use. “Other platforms have figured it out. This is no different. It’s not about putting a chill on free speech. Ultimately, companies have a role to play in saving lives.”

It's unclear how many active gun enthusiast groups there are on Facebook. FORBES identified hundreds of them, many dedicated to specific types of guns or geographic regions, such as this one:

For Seitz, the sheer volume of guns changing hands without government oversight was alarming. After researching gang violence in Detroit, he was taken aback by how common guns had become on social media. “Canada is different when it comes to guns," he said. "Buy and sell up here is strollers and shit no one wants anymore. Not AR-15’s."

After spending a weekend identifying gun photos on Twitter, Steitz blogged about his findings on the citizen journalism site Bellingcat, providing detailed instructions for anyone who wanted to undertake a similar endeavor on their own. Hunting for guns wasn’t Seitz’s first foray into social media sleuthing. In 2013, he demonstrated how to find images of ISIS flags on Twitter as a way to identify potential supporters of the group.

After he left his job as an offensive hacker for the cyber security firm Immunity in 2015, Seitz was back on his computer, using his research on gangs as a reference point to track down guns. It was easy work for him.

To tag photos of guns, Seitz used an API published by Imagga, a Bulgarian company that sells fine-tuned image recognition software to businesses. With roughly 200 customers around the world, Imagga caters to European advertising agencies and Fortune 500 companies. Cofounder and CEO Georgi Kadrev said he hasn’t talked with Facebook or any other social media companies about training the software to find guns, but after reviewing Seitz's work said he wouldn't rule out the possibility.

Bulgarian image recognition startup Imagga can be used to detect guns on social media.

“This was the first time we figured out its good for this kind of thing,” Kadrev said, adding that Imagga was already working on the beta version of a ‘Not Safe For Work’ classifier to detect nudity and violence.

Implementing an automated image detecting system wouldn’t be costly for a company like Facebook, Kadrev said. Instead, privacy concerns and not wanting to alienate users would likely be bigger factors. Given how many gun enthusiasts are unhappy with Facebook’s new rules, a more active enforcement approach may risk pushing users away, he said. “It’s not always in the best interest of the service to regulate things like this.”

After Facebook announced it was banning gun sales, numerous efforts were made to reinstate groups that were shut down, such as this change.org petition directed toward CEO Mark Zuckerberg. Were Facebook to deploy image recognition software, the company would need to have some level of human verification, Seitz said, just as it does now after prohibited material is forwarded to the company manually by users.

In Seitz’s test case, even without Imagga’s software being trained to detect images of guns, he found the tool to be accurate more than 90 percent of the time. That is, the vast majority of the time Imagga returned what it believed to be an image of a gun, it was in fact a gun. “If they (Imagga) actually tuned this to detect guns, they would be very, very good at it. They could build one that’s even more accurate.”

Facebook has a lot going for it that small image recognition companies like Imagga don’t, starting with a massive trove of photos that could be mined for data. On average, more than 350 million photos are uploaded to the site daily, according to Facebook, making it the de facto online photo album for millions of its users. The company has developed extensive in-house experience with image recognition thanks to its DeepFace project, which identifies faces in photos that Facebook can then suggest you tag when uploading images to the site. Facebook already uses an image recognition tool called "PhotoDNA," developed by Microsoft, to identify child pornography.

Rather than take a similar approach to guns, Facebook has applied the same general policing approach to guns as it has to other banned content, relying on user reports to identify violations. Dealing with prohibited content is nothing new for the site, which has been forced to address a host of content issues in recent years, ranging from hate speech to cyber bullying and, more recently, a lawsuit over what constitutes incitement after videos advocating violent attacks went viral in and around the West Bank last year.

Critics argue that image recognition is not the only tool at Facebook's disposal that it could use to detect gun sales. Facebook could also scan the captions that accompany posts, searching for common indicators of a sale such as “PM me” (private message), or “$,” among others. This would allow Facebook to more quickly identify photos of guns, which would get the company’s team of content specialists involved sooner to manually remove them.

“The question becomes, why aren’t they?” Seitz said.

A Facebook spokeswoman declined to answer specific questions for this story, citing a previous statement regarding the company’s enforcement policy: “We rely on reports from our community of 1.5 billion people to help us enforce our community standards which prohibit any attempts by unauthorized dealers to purchase, sell, or trade firearms on our site. Any piece of content on Facebook ­including posts, photos, videos, and messages ­can be reported. When something is reported to us, our team investigates and removes any content that violates our terms.”

Since FORBES identified numerous closed groups and specific posts that appear to violate Facebook’s policy earlier this month, not much has changed. Many of the groups are still active, with posts advertising guns for sale going up daily. Take this one, for example, from the Virginia Gun Enthusiasts group. Like many similar groups around the country, this one is set to private. But an administrator for the group made its intent clear in the public description for the page: "PICTURES ONLY, PM ONE ANOTHER."

Or this box of ammunition, posted to the Sacramento Gun Enthusiasts group by Tazeem Hussain, who told FORBES he was in the military and lists "Soldier at U.S. Army" on his profile page. After initially saying he would accept payment for the ammunition via Facebook's messenger app, Hussain backtracked, saying he prefers "cash and meeting the person, just like Craigslist or something."

Federal law doesn't prohibit gun owners from selling their weapons, so long as they aren't "engaged in the business of dealing in firearms." Essentially, unless you open a gun store, you aren't required to do a background check before selling your gun to someone else, often referred to as the "gun show" or "private sale" loophole. (Some states, such as California, require gun owners to go through a licensed dealer before completing the transaction.)

By instituting a policy that’s stricter than federal law, Facebook now finds itself in the middle of an intensely ideological debate over access to guns in America. Compounding the challenge is the company’s move to be more of an ecommerce platform. Facebook isn’t sure how many pictures of guns are posted to the site each today, but with more guns in the United States than there are people, any estimate figures to be large even by Facebook’s standards.

“Who wants to wade into the middle of the gun debate? Nobody, especially right now,” Seitz said. “I just wish Facebook would tell the truth. Don’t say you don’t have the capability, or the resources, because that’s bullshit. Just say you don’t want to be involved in the debate.”

Follow me on Twitter or LinkedInCheck out my websiteSend me a secure tip