Code Monkey home page Code Monkey logo

qt-tf-lite-example's Introduction

Qt TensorFlow Lite example

A simple example that shows how to use TensorFlow Lite with Qt. That's a modified version of the label_image example.

Tested on Ubuntu 20.04.

How to build

  • Install Visual Studio Code with Remote Containers extension
  • Clone this project and open in Visual Studio Code
    git clone https://github.com/IvanSafonov/qt-tf-lite-example.git
    code ./qt-tf-lite-example
  • In the Command Palette find and click Remote-Containers: Reopen in Container
  • In the Command Palette find and click CMake: Build

Launch example

The result executable file can be found in the build subdirectory.

vscode ➜ /workspaces/qt-tf-lite-example $ ./build/qt-tf-lite-example -h
Usage: ./build/qt-tf-lite-example [options] images
Qt TensorFlow Lite example

Options:
  -h, --help             Displays this help.
  -m, --model <model>    TFLite model
  -l, --labels <labels>  Model labels file

Arguments:
  images                 Input images for classification
vscode ➜ /workspaces/qt-tf-lite-example $ ./build/qt-tf-lite-example ./grace_hopper.jpg
INFO: Initialized TensorFlow Lite runtime.
"./grace_hopper.jpg"
0.784314 653 "military uniform"
0.105882 907 "Windsor tie"
0.0156863 458 "bow tie"
0.0117647 466 "bulletproof vest"

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.