Code Monkey home page Code Monkey logo

weapon-detection's Introduction

weapon-detection

Handgun, Shotgun and Knife using yolov4-tiny in videos as well as images. Training code, dataset and trained weight file available.

Dataset

  Data is Annotated using Labelme and is available in yolo format with txt files
      ├── data
      │    ├── obj (Train dataset)
      │    │   ├── Knife
      │    │   ├── Handgun
      │    │   └── Shotgun
      │    ├── test (Test dataset)
      │    │   ├── Knife
      │    │   ├── Handgun
      │    │   └── Shotgun
      │    ├── train.txt  (Train label)
      │    └── test.txt   (Test label)

DATASET

Pretrained yolo-tiny weights

Pre-train model

Colab GPU Training

Complete project is trained and evaluated on google colab Notebook

Knife, Handgun and Shotgun Detection

predictions

Important files for Training

  Training folder contain important files
      ├── training
      │    ├── obj.data
      │    ├── obj.names
      │    ├── yolov4-tiny.config
      │    └── yolov4-tiny.conv.29  

Training and Prediction command

 # train your custom detector! (uncomment %%capture below if you run into memory issues or your Colab is crashing)
 # %%capture
 └── !./darknet detector train training/obj.data training/yolov4-tiny.cfg training/yolov4-tiny.conv.29  -dont_show -map
 
 # run your custom detector with this command (upload an image to your google drive to test, thresh flag sets accuracy that detection must be in order to show it)
 ├── !./darknet detector test training/obj.data training/yolov4-tiny.cfg /mydrive/yolo/yolov4/darknet/backup/yolov4-tiny_4000.weights          /mydrive/yolo/yolov4/darknet/data/test/Knife/7bc500661f0ea2c7.jpg -thresh 0.5
 └── imShow('predictions.jpg')

Convert Model to tfile for android device deloyment

   ├── tflite.ipynb

For Colab GPU Training I Use this awesome repository for setting yolo

Yolo

weapon-detection's People

Contributors

bharatc9530 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

weapon-detection's Issues

Dead download link

Hi,
I really appreciate your work and want to use your data to train models for my own system. However, the download link in README is already dead, could you fix it?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.