{"id":13722051,"url":"https://github.com/understand-ai/anonymizer","last_synced_at":"2025-05-07T14:31:07.631Z","repository":{"id":42186060,"uuid":"152791526","full_name":"understand-ai/anonymizer","owner":"understand-ai","description":"**ARCHIVED** An anonymizer to obfuscate faces and license plates.","archived":true,"fork":false,"pushed_at":"2022-04-11T16:02:12.000Z","size":398,"stargazers_count":262,"open_issues_count":0,"forks_count":97,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-14T11:39:49.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/understand-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-12T18:20:30.000Z","updated_at":"2024-11-07T21:08:37.000Z","dependencies_parsed_at":"2022-08-12T08:50:43.385Z","dependency_job_id":null,"html_url":"https://github.com/understand-ai/anonymizer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/understand-ai%2Fanonymizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/understand-ai%2Fanonymizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/understand-ai%2Fanonymizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/understand-ai%2Fanonymizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/understand-ai","download_url":"https://codeload.github.com/understand-ai/anonymizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895561,"owners_count":21821180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:01:24.093Z","updated_at":"2025-05-07T14:31:07.014Z","avatar_url":"https://github.com/understand-ai.png","language":"Python","readme":"___\n\n⚠️  **ARCHIVED REPOSITORY** ⚠️   \n\n**We decided to archive this repository to make it read-only and indicate that it's no longer actively maintained.**\n___\n\n# understand.ai Anonymizer [ARCHIVED]\n\nTo improve privacy and make it easier for companies to comply with GDPR, we at [understand.ai](https://understand.ai/) decided to open-source our anonymization software and weights for a model trained on our in-house datasets for faces and license plates.\nThe model is trained with the [Tensorflow Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection) to make it easy for everyone to use these weights in their projects.\n\nOur anonymizer is used for projects with some of Germany's largest car manufacturers and suppliers,\nbut we are sure there are many more applications.  \n\n## Disclaimer\n\nPlease note that the version here is not identical to the anonymizer we use in customer projects. This model is an early version in terms of quality and speed. The code is written for easy-of-use instead of speed.  \nFor this reason, no multiprocessing code or batched detection and blurring are used in this repository.\n\nThis version of our anonymizer is trained to detect faces and license plates in images recorded with sensors \ntypically used in autonomous vehicles. It will not work on low-quality or grayscale images and will also not work on \nfish-eye or other extreme camera configurations.\n\n\n## Examples\n\n![License Plate Example Raw](images/coco02.jpg?raw=true \"Title\")\n![License Plate Anonymized](images/coco02_anonymized.jpg?raw=true \"Title\")\n\n![Face Example Raw](images/coco01.jpg?raw=true \"Title\")\n![Face Example Anonymized](images/coco01_anonymized.jpg?raw=true \"Title\")\n\n\n## Installation\n\nTo install the anonymizer just clone this repository, create a new python3.6 environment and install the dependencies.  \nThe sequence of commands to do all this is\n\n```bash\npython -m venv ~/.virtualenvs/anonymizer\nsource ~/.virtualenvs/anonymizer/bin/activate\n\ngit clone https://github.com/understand-ai/anonymizer\ncd anonymizer\n\npip install --upgrade pip\npip install -r requirements.txt\n```\n\nTo make sure everything is working as intended run the test suite with the following command\n\n```bash\npytest\n```\n\nRunning the test cases can take several minutes and is dependent on your GPU (or CPU) and internet speed.  \nSome test cases download model weights and some perform inference to make sure everything works as intended.\n\n## Weights\n[weights_face_v1.0.0.pb](https://drive.google.com/file/d/1CwChAYxJo3mON6rcvXsl82FMSKj82vxF)\n\n[weights_plate_v1.0.0.pb](https://drive.google.com/file/d/1Fls9FYlQdRlLAtw-GVS_ie1oQUYmci9g)\n\n\n## Usage\n\nIn case you want to run the model on CPU, make sure that you install `tensorflow` instead of `tensorflow-gpu` listed\nin the `requirements.txt`.\n\nSince the weights will be downloaded automatically all that is needed to anonymize images is to run\n\n```bash\nPYTHONPATH=$PYTHONPATH:. python anonymizer/bin/anonymize.py --input /path/to/input_folder --image-output /path/to/output_folder --weights /path/to/store/weights\n```\n\nfrom the top folder of this repository. This will save both anonymized images and detection results as json-files to\nthe output folder.\n\n### Advanced Usage\n\nIn case you do not want to save the detections to json, add the parameter `no-write-detections`.\nExample:\n\n```bash\nPYTHONPATH=$PYTHONPATH:. python anonymizer/bin/anonymize.py --input /path/to/input_folder --image-output /path/to/output_folder --weights /path/to/store/weights --no-write-detections\n```\n\nDetection threshold for faces and license plates can be passed as additional parameters.\nBoth are floats in [0.001, 1.0]. Example:\n\n```bash\nPYTHONPATH=$PYTHONPATH:. python anonymizer/bin/anonymize.py --input /path/to/input_folder --image-output /path/to/output_folder --weights /path/to/store/weights --face-threshold=0.1 --plate-threshold=0.9\n```\n\nBy default only `*.jpg` and `*.png` files are anonymized. To for instance only anonymize jpgs and tiffs, \nthe parameter `image-extensions` can be used. Example:\n\n```bash\nPYTHONPATH=$PYTHONPATH:. python anonymizer/bin/anonymize.py --input /path/to/input_folder --image-output /path/to/output_folder --weights /path/to/store/weights --image-extensions=jpg,tiff\n```\n\nThe parameters for the blurring can be changed as well. For this the parameter `obfuscation-kernel` is used.\nIt consists of three values: The size of the gaussian kernel used for blurring, it's standard deviation and the size\nof another kernel that is used to make the transition between blurred and non-blurred regions smoother.\nExample usage:\n\n```bash\nPYTHONPATH=$PYTHONPATH:. python anonymizer/bin/anonymize.py --input /path/to/input_folder --image-output /path/to/output_folder --weights /path/to/store/weights --obfuscation-kernel=\"65,3,19\"\n```\n\n## Attributions\n\nAn image for one of the test cases was taken from the COCO dataset.  \nThe pictures in this README are under an [Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/legalcode) license.\nYou can find the pictures [here](http://farm4.staticflickr.com/3081/2289618559_2daf30a365_z.jpg) and [here](http://farm8.staticflickr.com/7062/6802736606_ed325d0452_z.jpg).\n","funding_links":[],"categories":["Sensor Processing"],"sub_categories":["Image Processing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funderstand-ai%2Fanonymizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funderstand-ai%2Fanonymizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funderstand-ai%2Fanonymizer/lists"}