A keras implementation of YOLOv3 (Tensorflow backend) for raccoon detection (ref: qqwweee/keras-yolo3)

Raccoon dataset

Raccoon dataset is avaiable here: Raccoon dataset (modified from experiencor/raccoon_dataset)


How to use:

1) Get the model

Step 1: Download the project:

git clone

Step 2: Download YOLOv3 weights from YOLO website or yolov3.weights.

Step 3: Convert the Darknet YOLO model to a Keras model

python yolov3.cfg yolov3.weights model_data/yolo.h5  # to get yolo.h5(model)

OR download the model yolo.h5 to model_data/ directory directly.

2) Test the model on coco dataset(original yolo model is trained on coco dataset)

Run YOLO detecion.

python --model_path model_data/yolo.h5 --classes_path model_data/coco_classes.txt --image


3) Retrain the model for raccoon detection:

Step 1: Download Raccoon dataset to root directory

git clone

Step 2: Parse annotation:


Step 3: Download YOLOv3 weights from yolo_weights to model_data/ directory

Step 4: Retrain the model(use yolo.h5 as the pretrained model)

python -a Raccoon_dataset/raccoon_train_data.txt -c Raccoon_dataset/raccoon_classes.txt -o model_data/raccoon_derived_model.h5

OR download the trained model raccoon_derived_model.h5 to model_data/ directory directly.

Step 5: Run the model

python --image

4) pedestrian detection: training dataset: Robust Multi-Person Tracking from Mobile Platforms

More training data is needed to improve the accuracy!

Step1: training or download the model directly pedestrian_detection_model.h5:

python -a test_data/training_data/annotation.txt -c test_data/training_data/pedestrian_classes.txt -o model_data/pedestrian_detection_model.h5

Step2: running:

python --model_path model_data/pedestrian_detection_model.h5 --classes_path test_data/training_data/pedestrian_classes.txt

Pedestrian detection result: Yotube

Raccoon detection result



Some issues

  1. The test environment is

    • Python 3.5.5
    • Keras 2.2.0
    • tensorflow 1.6.0
  2. The model for raccoon detection was trained using ONLY CPU, so the accuracy is not very high. If you want to achieve a better performance, you can use GPUs for training.