google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.63k stars 5.17k forks source link

Iris detection demo does not work out-of-the-box #5645

Open TakhirMamirov opened 1 month ago

TakhirMamirov commented 1 month ago

OS Platform and Distribution

Ubuntu 22.04

Compiler version

No response

Programming Language and version

C++

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

0.10.15

Bazel version

No response

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

Iris detection demo does not work out of the box

Complete Logs

INFO: Running command line: bazel-bin/mediapipe/examples/desktop/iris_tracking/iris_depth_from_image_desktop '--input_image_path=/mediapipe/mediapipe/examples/desktop/face_detection/images/image_1.jpg' '--output_image_path=/mediapipe/mediapipe/examples/desktop/face_detection/images/image_output.jpg'
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1727293254.281285       9 iris_depth_from_image_desktop.cc:162] Failed to run the graph: ; Can't find file: mediapipe/graphs/iris_tracking/iris_depth_cpu.pbtxt
TakhirMamirov commented 1 month ago

I've taken the whole Mediapipe repo on my local machine, then run Docker file with the following command:

docker build --tag=mediapipe .
docker run -it --name mediapipe mediapipe:latest

Once it is built, I tried to run the following command:

GLOG_v=2 GLOG_logtostderr=1 bazel run --sandbox_debug --verbose_failures --define MEDIAPIPE_DISABLE_GPU=1 --copt=-I/usr/include/opencv4 mediapipe/examples/desktop/iris_tracking:iris_depth_from_image_desktop -- --input_image_path=/mediapipe/examples/desktop/iris_tracking/images/image_1.jpg --output_image_path=/mediapipe/examples/desktop/iris_tracking/images/image_output.jpg

It reported the following error: ...iris_depth_from_image_desktop.cc] Failed to run the graph: ; Can't find file: /mediapipe/graphs/iris_tracking/iris_depth_cpu.pbtxt

When I went into Docker container and observed the files, I noticed that the required file sits one level deeper, i.e.:

/mediapipe/mediapipe/graphs/iris_tracking/iris_depth_cpu.pbtxt

Well, I fixed the reference manually, but then it started to complain further not able to find the tflite file due to the same reason. What am I doing wrong and how to avoid referencing one level deeper from the original mediapipe folder?