Abnormal behavior detection
Detect whether there is any abnormal behavior you have defined occurs in the video surveillance. It's going to alert when it happens.
$: 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
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!
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/
bytrain/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
andout.txt
to yolo files, and amenddemo.c
.