Code Monkey home page Code Monkey logo

manuelschmitzberger / tensorflow_object_detection_tflite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from finnickniu/tensorflow_object_detection_tflite

0.0 1.0 0.0 49.37 MB

This is a repo for mobilenet-ssd tflite c++ on x86 and arm64

CMake 0.97% C++ 84.79% Python 4.93% C 3.91% Java 1.12% Shell 1.07% Objective-C 0.19% Objective-C++ 0.47% Jupyter Notebook 1.05% Ruby 0.01% C# 0.53% Swift 0.12% Makefile 0.33% Batchfile 0.03% RobotFramework 0.01% PHP 0.38% Pawn 0.03% Assembly 0.01% Pascal 0.01% Smarty 0.05%

tensorflow_object_detection_tflite's Introduction

System Environment:

System: Ubuntu 18.04

Opencv: opencv 4.1.0

Instructions:

  1. Run demo.cpp on x86 unbuntu, make sure opencv and bazel are installed.

    1. Build libtensorflowlite.so, under the tensorflow directory.
                bazel build -c opt //tensorflow/lite:libtensorflowlite.so --fat_apk_cpu=arm64-v8a
    
    1. Move .so to tensorflow_object_detection_tflite/lib
    2. Change find_library(TFLITE_LIBRARY tensorflow-lite "lib") to find_library(TFLITE_LIBRARY tensorflowlite "lib") in CMakeLists.txt.
    3. Build cmake
            mkdir build
            cd build
            cmake ..
            make -j
            ./demo
    
  2. Run demo.cpp on arm64-v8a ubuntu.

    1. Intall opencv on your arm64 motherboard.
    2. Build libtensorflow-lite.a, followed by the tensorflow tutorial https://www.tensorflow.org/lite/guide/build_arm64. Careful about the arm version, v7 or v8.
    3. Move .a to tensorflow_object_detection_tflite/lib
    4. keep find_library(TFLITE_LIBRARY tensorflow-lite "lib") unchanged.
    5. Build cmake
            mkdir build
            cd build
            cmake ..
            make -j
            ./demo
    
  3. If there is a flatbuffers error, build flatbuffers on your desktop, and use its header files and .a lib file, put and replace them into tensorflow_object_detection_tflite/include and tensorflow_object_detection_tflite/lib, respectively. You can check here to know how to build. google/flatbuffers#5569 (comment)

  4. Result image

Screenshot

tensorflow_object_detection_tflite's People

Contributors

finnickniu avatar

Watchers

James Cloos 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.