An anonymizer for pravicy protection of human faces and vehicle plates. This is a customized fork originally from archived project of understand-ai. The original code is developed with tensorflow-1.11 which is a fairly old version with poor GPU support in recent GPUs. With some tricks, the ONNX-RUNTIME provides a work around to running on fairly new GPUs (i.e. CUDA 11.*). Guidelines for ONNX-RUNTIME version is here.
You can use this anonymizer to mask your datasets which is selected to publish.
-
Clone the Repo
git clone https://github.com/fusionportable/Anonymizer.git
-
Download the pre-trained weights
# two .onnx files face.onnx plate.onnx
-
Build Docker Container
# without ros docker build . -t anonymizer:ort-1.14-cuda-11.6
-
Install Dependencies
# tested with CUDA11.8 with onnxruntime=1.14 cd anonymizer pip install --upgrade pip pip install -r requirements.txt
- Anonymize images
python3 anonymizer/bin/anonymize_onnx.py \
--input /absolute/path/to/input/images/folder \
--output /absolute/path/to/output/images/folder \
--weights /absolute/path/to/weights/folder \ --image-extensions jpg \
---face-threshold 0.3 --plate-threshold 0.3 \
--write-detections (default false)
- Anonymize rosbags
TODO
- Add docker image with CUDA11.6 compatibility.
- Add docker image with ROS1 compatibility.
- Add instructions on easy run.
- Add figures for illustration.
- Add scripts directly process the rosbags.
- Refactor the anonymizer in the same branch that is compatiable to plug in detector and obfuscators.