Skip to content

Radhika-Keni/Threat_Detection_YOLOV7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Threat_Detection_YOLOV7

Build a model capable of detecting and classifying weapons

Objective of this notebook

  • The purpose of this notebook is to build model capable of detecting and classifying weapons
  • The algorithm of choice here is YOLOV7 and we would be custom training YOLOV7 on a weapons datatset
  • Details of the Problem Statement , Data Set , Data Pre-processing & Splits, Architecture/Algorithm , Summary of the Code/Solution , Sample Output/Prediction from the program and Final Result of the project are listed in the sections to follow.

Problem Statement

Computer vision can be used to pro-actively detect threats

Data Description:

Domain:

Surveillance

Data Pre-processing & Splits:

  • Data exists in te original dataset in splits of train(1427 files) and Test(857 files), we will keep/use the same split
  • Label Data exists in the orignal datat set in the YOLOV7 specific label format( wherein there will be one label file for each image file and the format of the label file will be as follows class|xcenter|ycentre|width|height for each bounding box in that image and labels were generated in this format).We will re-use the data labels as is -There are 6 available classes namely
  • The Train and Validation splits are done/exist in a 80:20 split respectively and the details are as follows image

Architecture/Algorithm:

YOLOV7 by https://github.com/WongKinYiu/yolov7

Summary of the Solution/Code:

The code aims at custom training YOLOV7 on the xView dataset

  • In this notebook we first Explore/Sanity test on YOLOV7 API as is and run some general inferences to validate setup
  • We then Custom Train this YOLOV7 API on Weapon dataset for 55 epochs
  • We log the mAp score and F1 scores
  • We establish a baseline score
  • We do not tune the model further because baseline scores were satisfcatory
  • Run inferences on some images from validation split

Sample Ouput/Prediction :

Here are a couple of sample Ouput images from the program/model .

image

image

Result

image image

image

References & Guidance

About

Build a model for threat(weapon) detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages