CLI tool to block objects in images using a pretrained neural network
Top 22.4% on sourcepulse
This project provides a script to automatically obscure objects in images, inspired by the "Black Mirror" episode "White Christmas." It targets users who want to easily anonymize or censor specific items in their photos, offering a simple command-line interface for customization.
How It Works
The tool leverages a Mask R-CNN model pre-trained on the MS COCO dataset. This allows it to detect and segment various objects within an image. Users can specify which object classes (e.g., 'person', 'bus', 'giraffe') to block, and the script applies a configurable solid color mask to the detected instances, generating both static and animated output images.
Quick Start & Requirements
pip3 install -r requirements.txt
python3 person_blocker.py -i <image_path> -o <object_type>
python3 person_blocker.py -n
.Highlighted Details
person_blocked.png
) and animated GIFs (person_blocked.gif
).Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project relies on TensorFlow 1.3+, which is an older version and may present compatibility challenges with modern Python environments or newer TensorFlow versions.
2 years ago
1 day