Git Product home page Git Product logo

magritte's Introduction

Magritte

Magritte is a MediaPipe-based library to redact faces from photos and videos.

It provides processing graphs to reliably detect faces, track their movements in videos, and disguise the person's identity by obfuscating their face.

Processing graphs are built from feature subgraphs that solve sub-problems such as detecting or tracking faces (without recognizing them), determining the area to be redacted, and applying de-identification effect to this area (e.g., blurring, pixelization or sticker redaction).

To get started, refer to our GitHub page.

magritte's People

Contributors

cmaf5 avatar hans-brgs avatar imgbotapp avatar murilolima avatar stoman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magritte's Issues

Magritte on Windows

I wanted to run Magritte on Windows using python. Could you show me the installation steps?

bazel run in the docker container

when i run
bazel run //magritte/examples/desktop --cxxopt='-std=c++17' --experimental_repo_remote_exec --sandbox_debug -- --resource_root_dir=$(bazel info bazel-bin --experimental_repo_remote_exec)/magritte/examples/desktop/desktop_resource_folder --graph_type=FacePixelizationOfflineCpu --input_video=/home/dell/resources/magritteTest.mp4 --output_video=/home/dell/resources

in the container it gives this error
ERROR: /root/.cache/bazel/bazel_root/d5c47a48ad9e38cc04f2d26463381703/external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/BUILD:239:11: Compiling tensorflow/lite/delegates/gpu/gl/gl_errors.cc failed: (Exit 1): process-wrapper failed: error executing command
(cd /root/.cache/bazel/bazel_root/d5c47a48ad9e38cc04f2d26463381703/sandbox/processwrapper-sandbox/978/execroot/magritte &&
exec env -
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/proc/self/cwd
TMPDIR=/tmp
/root/.cache/bazel/bazel_root/install/41b71f1bb3ce13f20cfeeb31a9357113/process-wrapper '--timeout=0' '--kill_delay=15' /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/objs/gl_errors/gl_errors.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/objs/gl_errors/gl_errors.pic.o' -fPIC -iquote external/org_tensorflow -iquote bazel-out/k8-fastbuild/bin/external/org_tensorflow -iquote external/com_google_absl -iquote bazel-out/k8-fastbuild/bin/external/com_google_absl '-std=c++17' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP
="redacted"' '-D__TIME
_="redacted"' -c external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_errors.cc -o bazel-out/k8-fastbuild/bin/external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/_objs/gl_errors/gl_errors.pic.o)
In file included from /usr/include/EGL/eglplatform.h:134,
from /usr/include/EGL/egl.h:39,
from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/portable_egl.h:19,
from external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_errors.cc:23:
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_errors.cc:61:7: error: expected unqualified-id before 'int'
61 | absl::Status GetOpenGlErrors() {
| ^~~~~~
external/org_tensorflow/tensorflow/lite/delegates/gpu/gl/gl_errors.cc:83:7: error: expected unqualified-id before 'int'
83 | absl::Status GetEglError() {
| ^~~~~~
Target //magritte/examples/desktop:desktop failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 74.995s, Critical Path: 40.61s
INFO: 442 processes: 18 internal, 424 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

maybe because of TensorFlow Lite GPU version ?

could u support ios ?

hello , i watch u project examples, don`t have ios demo , so i wish u can support ios
1、support video
2、support static image
3、get result,such as score
thanks

Compilation Error: Duplicate action writing to `desktop_resources_folder_cmd.bat`

Description:

While compiling a project using the following command:

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:\\Users\\hans9\\AppData\\Local\\Programs\\Python\\Python310\\python.exe" -s //magritte/examples/desktop:desktop_resources_folder --experimental_repo_remote_exec --copt -DBOOST_ERROR_CODE_HEADER_ONLY --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11

I encountered an error indicating a conflict with the file desktop_resources_folder_cmd.bat. The exact error message is:

ERROR: C:/users/hans9/onedrive/documents/hans/travail/inmersiv/projet_apprentissage/mediapipe/prise_en_main_c++/magritte/magritte/examples/desktop/BUILD:92:26: for magritte/examples/desktop/desktop_resources_folder_cmd.bat, previous action: action 'Writing script magritte/examples/desktop/desktop_resources_folder_cmd.bat', attempted action: action 'Writing script magritte/examples/desktop/desktop_resources_folder_cmd.bat'

Environment:

  • OS: Windows 11

Additional Information:

  • The build process seems to be attempting to write to desktop_resources_folder_cmd.bat multiple times, which is causing the conflict.
  • I've verified that the logic generating the .bat filename is unique to its context.
  • The error might be related to some rules or macros generating the same file, but I've been unable to identify the root cause.

I would appreciate any insights or potential fixes for this issue. Let me know if any additional information is required. Thanks in advance for your support.

Best regards,

iOS App

Is there any known iOS App available with this API?

Docker build args

When building with docker, what --build-arg values should be used to set the ARG variables?

python example

Could you provide a basic python example of how to use Magritte?

Magritte vs Mediapipe

I have used Mediapipe for face detection using their tutorial code here.
I read that Magritte uses Mediapipe library under the hood, but I couldn't figure out if Magritte does a better job than Mediapipe in identifying faces. Have you compared their results?

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.