Skip to content

Rheosoph/node-package-privacy-blur

Repository files navigation

Privacy Blur

Privacy Blur is a Flow-Like WASM node package that reads an image from a FlowPath, detects faces, blurs detected regions, and writes the processed image to another FlowPath.

It is designed for privacy-preserving image workflows that need to run inside the Flow-Like WASM sandbox. The implementation uses pure Rust image processing and an embedded SeetaFace/rustface frontal face detector model.

Node

Node Category Description
blur_faces Image/Privacy Reads a source image, blurs detected face regions, and writes the result to a target path.

Inputs

Pin Type Description
exec Execution Starts processing.
image_path FlowPath struct Source image path.
target_path FlowPath struct Destination image path. .jpg/.jpeg writes JPEG; all other extensions write PNG.
detection_mode String Recall/false-positive tradeoff: balanced, aggressive, or maximum. Defaults to aggressive.

Outputs

Pin Type Description
exec_out Execution Activated after a successful write.
error_out Execution Activated when reading, decoding, detection setup, encoding, or writing fails.
output_path FlowPath struct Destination path that received the output image.
face_count Integer Number of blurred regions.
succeeded Boolean true after successful processing, false on the failure branch.
error_message String Failure details when error_out is activated.

If no faces are detected, the node still writes the decoded image to the target path and returns face_count = 0.

Detection Modes

Mode Intended Use
balanced Fewer false positives, lower recall.
aggressive Default privacy/reliability balance.
maximum Highest recall available in this detector, with extra filtering for weak low-score detections.

The detector is best suited for frontal or near-frontal faces. Rotated, occluded, profile, very small, or low-contrast faces can still be missed. The maximum mode may blur occasional non-face regions; use aggressive or balanced when false positives matter more than recall.

Implementation Notes

  • Image decoding and encoding use the pure-Rust image crate with PNG and JPEG support.
  • Face detection uses rustface with the SeetaFace frontal detector model embedded in the WASM component.
  • Detection runs on one raw grayscale pass using conservative scan settings for WASM stability.
  • Large images are downscaled for detection and detected boxes are mapped back to the original image before blurring.
  • Output images are re-encoded without preserving original image metadata.

Repository Layout

src/lib.rs                         Flow-Like node implementation
models/seeta_fd_frontal_v1.0.bin   Embedded SeetaFace detector model
tests/lint.rs                      Node metadata lint tests
flow-like.toml                     Flow-Like package manifest
mise.toml                          Local build/test tasks

Prerequisites

  • Rust 1.82 or newer
  • wasm32-wasip2 target
rustup target add wasm32-wasip2

Or with mise:

mise run setup

Build

cargo build --release --target wasm32-wasip2

The compiled component is written to:

target/wasm32-wasip2/release/privacy_blur.wasm

With mise:

mise run build

This also copies the component to node.wasm. The generated node.wasm file is ignored by Git.

Test

cargo test --target "$(rustc -vV | awk '/host:/ {print $2}')"

With mise:

mise run test

Run the full local check suite:

mise run check

Publishing to Flow-Like

  1. Build the WASM component.
  2. In Flow-Like Desktop, open Library -> Packages -> Publish.
  3. Select target/wasm32-wasip2/release/privacy_blur.wasm.
  4. Select flow-like.toml.
  5. Keep NOTICE.md, LICENSE-MIT, and LICENSE-BSD-2-Clause with any binary release or package documentation.
  6. Submit the package.

Licenses and Model Provenance

This repository contains components under multiple permissive licenses:

  • The Privacy Blur package source code is licensed under MIT.
  • The embedded SeetaFace detector model and the compiled rustface detector implementation are BSD-2-Clause licensed.

The package metadata uses the SPDX expression MIT AND BSD-2-Clause because the distributed WASM includes both sets of licensed material. See LICENSE, LICENSE-MIT, LICENSE-BSD-2-Clause, and NOTICE.md.

About

Flow-Like WASM node that detects and blurs faces in FlowPath images for privacy-preserving workflows.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE-MIT

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages