Skip to content

This project is about weapon detection in video that take from camera. Using yolov7-tiny achitecture

Notifications You must be signed in to change notification settings

sonhm3029/EDABK_YOLOV7_TINY_WEAPON_DETECTION

Repository files navigation

EDABK_YOLOV7_TINY_WEAPON_DETECTION

Project using yolov7 tiny achitecture to detect weapon that appear in video, which taken from university camera

I. Config

Sử dụng yolov7 với các tham số config:

  • batch size: 64
  • pretrain weights: yolov7-tiny
  • epochs: 100
  • images size: 640

II. Dataset

1. Dataset size lớn

Tập dataset từ nguồn OD-WeaponDetection

Gồm data về pistol, knife và smartphone, trong đó:

Tập train:

type number of images
Pistol 1425
Smart phone 575
Knife 1825

Tập test:

type number of images
Pistol 78
Smart phone 104
Knife 644

2. Dataset ghép vào video size nhỏ

Bộ dataset có 952 ảnh được lấy ra từ frame của video, mỗi ảnh được ghép random từ 1-4 vũ khí từ thư mục weapon vào các vị trí random định sẵn trên các frame

Bộ dataset này được chia ra làm tập train chiếm 80% và test chiếm 20% dataset

III Thực thi

Source code thực thi tại file yolov7_tiny_weapon_detection

Source code colab tại đây

III. Evaluating

Model training đạt ~92% mPA-0.5.

File runs tại đây

Ảnh Precision curve

Ảnh Recall curve

Ảnh Recall và Precision curve

Ảnh F1 curve

Ảnh confusion matrix

IV Các kết quả thu được trên ảnh ngẫu nhiên trên mạng:

V Các kết quả thu được trên video

Các file .avi trong assets

Video 1

Video 2

Video 3

VI. Nhận xét

  • Kêt quả thu được thực tế trên các ảnh có vũ khí không rõ nét kém
  • Kết quả nhận diện về dao tốt hơn súng vì trong tập train có chứa phần lớn là các ảnh về dao và bao gồm các ảnh không rõ nét, dao bé...

About

This project is about weapon detection in video that take from camera. Using yolov7-tiny achitecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published