Detect weapons Computer Vision Model
How to use the Detect weapons Detection API
Try This Model
Drop an image here or click to upload
Or try a test image
Model type: Roboflow 3.0 Object Detection (Fast)
Dataset: detect-weapons/6 (7504 images)
Checkpoint: COCO
Jun 19, 2024
Code Snippets
from inference_sdk import InferenceHTTPClient
CLIENT = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key="API_KEY"
)
result = CLIENT.infer("YOUR_IMAGE.jpg", model_id="detect-weapons/6")Give your agent everything it needs
Or, Use Free Pistol, Gun and Knife Detection API
Powered by general detection model
Code
pip install inference-sdk# 1. Import the library
from inference_sdk import InferenceHTTPClient
# 2. Connect to your workspace
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key="API_KEY"
)
# 3. Run your workflow on an image
result = client.run_workflow(
workspace_name="<YOUR_WORKSPACE>",
workflow_id="<YOUR_WORKFLOW_ID>",
images={
"image": "YOUR_IMAGE.jpg" # Path to your image file
},
parameters={
"classes": "pistol, Gun, knife, dead-man-or-injured"
},
use_cache=True # cache workflow definition for 15 minutes
)
# 4. Get your results
print(result)Run on custom image
Drop an image here or click to upload
Detecting classes:
Or try a test image
About Detect weapons Model
A description for this project has not been published yet.
Roboflow Agent
Tell the agent what you want to build.
Cite This Project
LicenseCC BY 4.0If you use this dataset in a research paper, please cite it using the following BibTeX:
@misc{ detect-weapons_dataset,
title = { Detect weapons Dataset },
type = { Open Source Dataset },
author = { My WorkPlace },
howpublished = { \url{ https://universe.roboflow.com/my-workplace-4nr97/detect-weapons } },
url = { https://universe.roboflow.com/my-workplace-4nr97/detect-weapons },
journal = { Roboflow Universe },
publisher = { Roboflow },
year = { 2024 },
month = { jun },
note = { visited on 2026-07-29 },
}










