Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Use tensorflow lite with Qt
Forum Updated to NodeBB v4.3 + New Features

Use tensorflow lite with Qt

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by tham
    #1

    Environment :

    OS : Win10 64bits
    Qt: 5.12.3
    NDK: r18b
    JDK: jdk1.8.0_201

    I would like to use the tensorflow-lite with Qt5, but there are lots of issues when I try to import the java classes. But how could I download the tensorflow-lite-gpu, tensorflow-lite-cpu and tensorflow-lite-support?

    The android studio make this work with 3 lines in the build.gradle, I try to add the 3 lines into the build.gradle too.

    dependencies {
        // Build off of nightly TensorFlow Lite
        implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly'
        implementation 'org.tensorflow:tensorflow-lite-gpu:0.0.0-nightly'
        implementation 'org.tensorflow:tensorflow-lite-support:0.0.0-nightly'    
    }
    

    Error messages

    At pastebin

    I can build this example by android studio without any issues, how could I use the java api of tensorflow with Qt?

    1 Reply Last reply
    0
    • thamT Offline
      thamT Offline
      tham
      wrote on last edited by
      #2

      Found the solutions, put them at StackOverflow.

      It would be ideal if we could use the c++ api rather than java, hope one day we could have a c++ library which could perform inference task of deep learning models efficiently on major platforms of desktop, mobiles and other embedded devices (opencv works well for desktops and other embedded devices, bad at mobile)

      1 Reply Last reply
      1
      • JBonillaJ Offline
        JBonillaJ Offline
        JBonilla
        wrote on last edited by JBonilla
        #3

        Hi,

        You can use the TensorFlow Lite c++ API with Qt/QML for Android and iOS devices, have a look at this tutorial. There are also other tutorials that apply to desktop and Raspberry Pi.

        https://mechatronicsblog.com/tensorflow-lite-integration-with-qt-and-v-play-for-multi-platform-machine-learning-apps-on-ios-and-android/

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved