This page is being translated by your browser

Translation can break parts of Roboflow. If something stops working, turn translation off and reload the page.

Detection · Security & Surveillance

Gun detection: Datasets & Models

Automated gun detection uses computer vision to identify firearms in live camera feeds and recorded footage, flagging weapons before they escalate into an incident.

Gun detection example
1M+
developers
16k
organizations
50B
inferences

Gun detection

This gun detection workflow processes images and video frames from security cameras or uploaded footage and runs an object detection model to locate firearms such as handguns and rifles. For each detection it returns bounding box coordinates, class labels, and confidence scores, which can trigger alerts or feed into downstream security systems.

Try it out

Powered by general detection model

Run on custom image

Drop an image here or click to upload

Detecting classes:

Why automate gun detection

Manual monitoring of security cameras is slow, error-prone, and does not scale: a single operator watching dozens of feeds will inevitably miss the split-second appearance of a weapon, especially during long shifts. Automating gun detection means every frame from every camera is screened continuously, so a visible firearm can trigger an alert to security staff or law enforcement within seconds. For schools, retail sites, transit hubs, and other facilities, that difference in response time is the concrete benefit that turns passive recording into active threat prevention.

Key benefits

Teams get consistent, round-the-clock screening across all camera feeds without adding headcount, and detections can be routed into existing alerting, access control, and incident-response systems. Because the workflow runs on standard surveillance hardware and IP cameras, deployment scales from a single entrance to a campus-wide network. Faster, automated alerts shorten the window between a weapon appearing and a response being initiated.

How to use it

  1. Upload an image: Drop any photo into the widget above to try gun detection for free, right on this page.
  2. Preview instant results: The model detects handgun, rifle, shotgun, pistol within seconds and returns an annotated image with structured predictions, so you can immediately see how well it works. Adjust the detection classes and re-run until the results fit your scenario.
  3. Like what you see?: With a free Roboflow account, you can deploy this workflow with the Serverless Cloud API, customize it in your workspace, or train RF-DETR on your own images for production accuracy.
  4. Get started for free: No code or training data required to begin: upload, review the results, and make it part of your stack in a single click.
Recommended model

Recommended model for gun detection

RF-DETR is state of the art for real-time object detection, instance segmentation, and keypoint detection, with higher accuracy and lower latency than comparable models, and it's Apache 2.0 licensed. When you're ready to build a production model for gun detection, fine-tune it on your own labeled images, then deploy to a Serverless Cloud API endpoint.

Train your own model
Roboflow Agent

Not sure where to start?

Describe your Gun Detection project to Roboflow Agent.

Agent