The goal of this project is to detect dangerous behaviour from video feeds, like fire, guns... To do this we are using the darknet library.
You have two choices to compile this program:
-
with CUDA The program will run faster (16gb ram / gtx 960 2gb => 15fps)
-
without CUDA The program will run slower (16gb ram / gtx 960 2gb => < 1fps)
so we advise you to install CUDA (we are using cuda 8.0)
In both cases (CUDA || !CUDA) you will need to install opencv
we are using opencv2 so to install it :
You now have the required programs to run samaritain
To compile our program, you first need to compile the darknet static library, to do so:
- go to the
darknet
folder - edit the
Makefile
- set GPU, CUDNN and OPENCV to 1 (only OPENCV if you don't use CUDA)
- run the Makefile
- copy the darknet.a to app/lib/libdarknet.a
- go to the app folder
- run get_weights.sh script
- run the Makefile
- execute the program
So now in command line :
cd darknet
emacs -nw Makefile
GPU=1
CUDNN=1
OPENCV=1
DEBUG=0
make
cp darknet.a ../app/lib/libdarknet.a
cd ../app
cd weights
./get_weights.sh
cd ..
make
./samaritain detector demo cfg/coco.data cfg/yolo.cfg weights/yolo.weights