Giter Club home page Giter Club logo

keras-yolo3's Introduction

keras-yolo3

Introduction

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)

Raccoon

How to use:

1) Get the model

Step 1: Download the project:

git clone https://github.com/bing0037/keras-yolo3.git

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

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

python convert.py 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 yolo_video.py --model_path model_data/yolo.h5 --classes_path model_data/coco_classes.txt --image

Raccoon

3) Retrain the model for raccoon detection:

Step 1: Download Raccoon dataset to root directory

git clone https://github.com/bing0037/Raccoon_dataset.git

Step 2: Parse annotation:

python raccoon_annotation.py

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 train.py -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 yolo_video.py --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 train.py -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 yolo_video.py --model_path model_data/pedestrian_detection_model.h5 --classes_path test_data/training_data/pedestrian_classes.txt

Pedestrian detection result: Yotube

Raccoon detection result

Raccoon

Raccoon

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.