ShoupingShan / Abnormal-behavior-Detection

Abnormal behavior detection in the video surveillance based on yolo darknet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abnormal behavior detection

Introduction

  Detect whether there is any abnormal behavior you have defined occurs  in the video surveillance. It's going to alert when it happens.

Author

Platform

Demo

ima1

How to run

  $: git clone git@github.com:ShoupingShan/Abnormal-behavior-Detection.git
  $: cd Abnormal-behavior-Detection
  $: make
  $: wget https://pjreddie.com/media/files/yolo.weights
  $: ./darknet detector demo cfg/coco.data cfg/yolo.cfg yolo.weights -c 0

Attention

Makefile

This is what I use, uncomment if you know your arch and want to specify

ARCH= -gencode arch=compute_50,code=compute_50

demo.c

line 147 and line 154

Make sure you have replaced your own path!

How to train

First, suppose you have collected your training video files such as "samples.avi".

Please open and run Video_cut/main.cpp then you can get many subfiles and each of them is 1 second. Delete some wrong files if exist(sometimes happens).

Mark sure these subfiles obeying this principle: rename the filename as "f****.avi"(starts with 'f') if it is abnormal. Otherwise, you needn't rename it.

Return to the Terminal:ls > ../dir.txt(get file path)

Make a copy of yolo program, and replace src/ by train/src,you can get same number of subfiles but ended with .dat.

Return to the Terminal:ls > ../dir.txt(get file path)

Open train/SVM, train this model automatically.

Copy alpha.txt and out.txt to yolo files, and amend demo.c.

Contact Us

shp395210@outlook.com

About

Abnormal behavior detection in the video surveillance based on yolo darknet

License:MIT License


Languages

Language:C 91.1%Language:Cuda 7.8%Language:C++ 0.6%Language:Python 0.2%Language:Makefile 0.1%Language:Shell 0.1%Language:Objective-C 0.0%