/yolo-person-detect

Detect person with YOLO and Keras

Primary LanguageJupyter Notebook

README

This README would normally document whatever steps are necessary to get your application up and running.

Setup

git clone git@bitbucket.org:toancauxanh/yolo-aitl.git
cd yolo-aitl
python3 -m venv --system-site-packages venv
source venv/bin/activate
(venv) pip install -r requirements.txt
(venv) ./init.py

For simpler, the commands below will be presented without the prefix "(venv)".

Depend on your system, let's choose tensorflow or tensorflow-gpu should be installed:

pip install tensorflow

# or

pip install tensorflow-gpu

Then:

For example:

cd yolo-aitl
tar -xzvf temp/person-small.tar.gz -C temp
./seed.py -d temp/person-small/

seed.py would automatically separate dataset to training set and evaluation set for you.

Lastly, if everything is ok, you can start training now:

./train.py

Prediction

Using predict.py, you can:

1, Detect person from specified image

./predict.py -f tests/images/01.jpg

2, Detect all .jpg image from specified folder

./predict.py -d path_to_input_folder -o path_to_output_folder

3, Randomly detect an image stored in test/images

./predict.py

4, Detect person from AVI or MP4 video file

./predict.py -f path_to_your_video.avi

5, Detect persom from camera

./predict -c N

With N is camera index.

TensorBoard

tensorboar --logdir=temp/logs

Test

./test.sh