Giter VIP home page Giter VIP logo

tensorflow-lite-yolov3's Introduction

tensorflow-lite-yolo-v3

Convert the weights of YOLO v3 object detector into tensorflow lite format. It can be served for tensorflow serving as well.

Setup env

docker build -t tflite .
docker run -it -v /home/peace195/tensorflow-lite-yolo-v3:/root/ tflite

How to run

  1. Download COCO class names file: wget https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names
  2. Download binary file with desired weights:
    • Full weights: wget https://pjreddie.com/media/files/yolov3.weights
    • Tiny weights: wget https://pjreddie.com/media/files/yolov3-tiny.weights
    • SPP weights: wget https://pjreddie.com/media/files/yolov3-spp.weights
  3. Convert .weights to .pb saved_model python ./convert_weights_pb.py (this can be used for tensorflow serving)
  4. Convert .pb to .tflite tflite_convert --saved_model_dir=saved_model/ --output_file yolo_v3.tflite --saved_model_signature_key='predict'

Optional Flags

convert_weights_pb.py:

--class_names
    Path to the class names file
--weights_file
    Path to the desired weights file    
--data_format
    `NCHW` (gpu only) or `NHWC`
--tiny
    Use yolov3-tiny
--spp
    Use yolov3-spp
--output_graph
    Location to write the output .pb graph

Contact me if you have any issues: [email protected] / Binh Do

tensorflow-lite-yolov3's People

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.