sihellem
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: libcamera.so.0.0.4: 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: https://lindevs.com/install-precompiled ... 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

  libcamera
    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
/usr/local/lib/libtensorflow-lite.so
/var/lib/dpkg/info/tensorflow-lite.postinst
/var/lib/dpkg/info/tensorflow-lite.md5sums
/var/lib/dpkg/info/tensorflow-lite.prerm
/var/lib/dpkg/info/tensorflow-lite.list
I read in the installation notes (https://www.raspberrypi.com/documentati ... amera-apps) that the libcamera-apps/post_processing_stages/meson.build 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.

sihellem
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”