Git Product home page Git Product logo

yolov4deepsort's Introduction

Violence Detector

This project sought to identify fights in surveillance footage by using low-cost methods.

Dependencies

Python 3.8+

NumPy
Pandas
sklean
OpenCV
Pillow
TensorFlow >= 2

Installation

This repository uses a TensorFlow 2.x compatible version of the one proposed by https://github.com/Qidian213/deep_sort_yolov3.

  • Weight Files

  • Environment Setup

    • Clone and compile YOLOv4 from https://github.com/AlexeyAB/darknet
    • Copy the files darknet and libdarknet.so to this project's folder
    • Place the mars-small128.pb and yolov4.weights into a weights folder
  • Dataset

    • Extract the RWF-2000 dataset into this folder
    • Alternatively edit file run_all.py to change the path used

Running

Evaluating

Running the run_all.py script will create an output table

File Ground Truth #Frames #Frames with Fights Detected
... ... ... ...

Running then the script plot.py will process output tables and create comparison graphs.

These tables can also be loaded by the Facets app.

Running Individual Videos

By editing the paths at the start of files extract_movement.py and conflict_detector.py , one can first run the extract_movement.py script to create a table, registering the position of each person during the video.

By then running the conflict_detector.py script, one can see how many frames are there in the video and how many of those contain potential fight scenes. Also, the tables loaded for this script can also be loaded by the visualize.py script, which displays the video while showing the personal space of each person detected.

yolov4deepsort's People

Contributors

muriloregio avatar

Stargazers

 avatar

Watchers

 avatar

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.