Giter VIP home page Giter VIP logo

omz-model-download's Introduction

mobilenet-yolo-syg model

license1 license2

Introduction

A YOLOv4-MobileNet object detection pipeline inherited from keras-YOLOv3-model-set and keras-yolo3-Mobilenet. Implement with keras, including model training/tuning, model evaluation and on device deployment. The model supports dataset called SYGData0829 collected by our team and including 4 classes which are 'motor,bike,truck,bus'.

Setup

Prerequisites

  • Python 3.6.5
  • Tensorflow 1.15.0
  • Keras 2.2.5

Training your own model

Dataset preparation

To download SYGData0829 dataset, you need to follow the steps below:

  1. Go to the github repo
  2. Select SYGData0829.zip.001SYGData0829.zip.002SYGData0829.zip.003SYGData0829.zip.004 and download archive
  3. Unpack archive
unzip -zvf SYGData0829.zip -d <path_same_with_train.py>
cd <path_same_with_train.py>
python voc_annotation.py  

You will get 3 files which the model will load the related dataset according to.

Start to train

You can directly run the file with the default parameters.

python train.py

or you can modify train.py to set annotation_path,classes_path,anchors_path,weights_path,log_dir, Init_epoch,Freeze_epoch,batch_size,learning_rate_base, Freeze_epoch,Epoch and other train parameters, then run the files.

Inference

If you want to test image,modify FLAG as True in the file yolo_image.py, make dictionary named img and put test images, then

python yolo_image.py

If you want to test video,make dictionary named video and put test videos, modify video_path in the file yolo_image.py, then

python yolo_image.py

Evalution

Preparation

  • modify all_path and save_path in the file get_gt_txt1.py to get the ground-truth in the test dataset.
  • modify all_path and save_path in the file get_dr_txt2.py to get the detection-result and images-optional in the test dataset.
  • modify MINOVERLAP in the file get_map3.py to calculate mAP.

Start to evaluate

python get_gt_txt1.py
python get_dr_txt2.py
python get_map3.py

evalution metric and result

Metric Value
AP@motor 94.5%
AP@truck 57%
AP@bus 86%
AP@car 77%
mAP 67.84%

omz-model-download's People

Contributors

ermubuzhiming avatar

Watchers

 avatar

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.