Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 2.19 KB

README.md

File metadata and controls

66 lines (42 loc) · 2.19 KB

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