Posts: 2
Joined: Mon Sep 18, 2023 12:24 pm

libcamera-apps fails to detect tensorflow-lite

Mon Sep 18, 2023 12:30 pm

Hi all,

I upgraded my Pi 4B today (Raspbian GNU/Linux 11 (bullseye)). I also made the switch to arm_64bit=0 in /boot/config.txt, as the upgrade seems to have automatically switched the 32bit to 64bit kernel.

Code: Select all

uname -a
Linux raspberrypi 6.1.21-v7l+ #1642 SMP Mon Apr  3 17:22:30 BST 2023 armv7l GNU/Linux
It resulted in breaking libcamera, with any command resulting in:

Code: Select all

libcamera-vid: error while loading shared libraries: cannot open shared object file: No such file or directory
Hence, I decided to do a fresh install of all the suite (libcamera, libepoxy, libcamera-apps) using the last install type meson (instead of previously CMake)

Everything went well but for TensorFlow Lite (which was previously running without any issue on the same machine). It was installed using the procedure found on: ... pberry-pi/

Although I used the flags enabling TensorFlow Lite during the build, it fails to detect it:

Code: Select all

meson setup build -Denable_libav=true -Denable_drm=true -Denable_egl=true -Denable_qt=true -Denable_opencv=true -Denable_tflite=true
The Meson build system
Version: 1.2.1
Run-time dependency opencv4 found: YES 4.5.1
Found CMake: /usr/bin/cmake (3.18.4)
Run-time dependency tensorflow-lite found: NO (tried pkgconfig and cmake)
Build targets in project: 7

libcamera-apps 1.2.1

    location             : /usr/local/lib/arm-linux-gnueabihf
    version              : 0.0.5

  Build configuration
    libav encoder        : YES
    drm preview          : YES
    egl preview          : YES
    qt preview           : YES
    OpenCV postprocessing: YES
    TFLite postprocessing: NO

  User defined options
    enable_drm           : true
    enable_egl           : true
    enable_libav         : true
    enable_opencv        : true
    enable_qt            : true
    enable_tflite        : true

Found ninja-1.11.1.git.kitware.jobserver-1 at /usr/local/bin/ninja
TFlite is however on my system, as returned by the check:

Code: Select all

$ find / -name "*tensorflow-lite*" |& grep -v denied
I read in the installation notes ( ... amera-apps) that the libcamera-apps/post_processing_stages/ may need to be tweaked.

But how? What's to be modified?
Last edited by sihellem on Sat Sep 23, 2023 4:10 pm, edited 1 time in total.

Posts: 2
Joined: Mon Sep 18, 2023 12:24 pm

Re: libcamera-apps fails to detect tensorflow-lite

Sat Sep 23, 2023 2:55 pm

Nobody? I have not had any luck with this issue.

Return to “Raspberry Pi OS”