Skip to content

Abnormal behavior detection in the video surveillance based on yolo darknet

License

Notifications You must be signed in to change notification settings

ShoupingShan/Abnormal-behavior-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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