AI · Computer Vision · Python
Real-time knife detection with a custom YOLOv11 model
A five-month computer-vision project covering dataset creation, training, false-positive analysis and deployment across different devices.
Completed functional prototype
- Duration
- 5 months
- Model
- YOLOv11 · Ultralytics
- Language
- Python
- Deployment
- Desktop · Laptop · NVIDIA Jetson
Objective
The project explored whether a custom object-detection model could recognize knives in real time across different environments and hardware platforms. The focus was not only on model training, but on the complete workflow from data collection to deployment.
Dataset and training
I created and manually labeled a dedicated dataset, configured the YOLOv11 training pipeline and trained the model on a desktop workstation. The dataset and training configuration were iteratively adjusted based on the model’s behavior in real scenes.
- Collection and manual labeling of a custom dataset
- Training with YOLOv11 and Ultralytics
- Desktop workstation used for model training
- Real-time inference on different target devices
False positives as a data problem
The first training iteration did not contain enough negative examples. As a result, the model produced false positives in scenes that did not contain a knife. Instead of treating this only as a model issue, I traced the behavior back to the composition of the dataset and revised the training data accordingly.
- Systematic review of false-positive detections
- Addition of relevant negative examples
- Repeated labeling, training and validation
Deployment
The completed prototype can run on a laptop, a desktop PC or an NVIDIA Jetson. Inference speed depends on the selected device, model configuration and input resolution, so performance values will be published only after a consistent benchmark has been completed.
Result and limitations
The project resulted in a functional real-time prototype and a recorded video demonstration. It is an experimental computer-vision system, not a certified safety product. Precision, recall, mAP and device-specific FPS will be added after the existing results have been reviewed and measured under comparable conditions.