MIT License

项目介绍

varungupta31/dashcam_anonymizer 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 89 个 Star、16 次 Fork。

仓库全名
varungupta31/dashcam_anonymizer
开源许可证
MIT License
Star 数
89
Fork 数
16

README 摘要

Dashcam Anonymizer 🕵🏻‍♂️ This repository blurs human faces and license plates in images and videos using a state-of-the-art object detection model, YOLOv8 by Ultralytics, and is fine-tuned using images from the OpenImagesDatasetV7. Setup 🔩 Clone this repo by A Convenient Script Has Been Provided To Setup the Repository 👨🏽‍💻 Activate any Python Environment of Your Preference (conda recommended) Preferably with…

完整内容见 GitHub 原始 README 或本页 。

常见问题

dashcam_anonymizer 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 89 个 Star。

dashcam_anonymizer 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 dashcam_anonymizer 的源码?

可以直接克隆仓库:git clone https://github.com/varungupta31/dashcam_anonymizer.git;安装与运行步骤见仓库 README。

dashcam_anonymizer 最近还在维护吗?

仓库最近一次更新为 2025年9月18日,当前没有未关闭的 Issue;Star 数为 89,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Code to Blur Human Faces and Vehicle License Plates in Video and Images using a SoTA Object Detection model YOLOv8

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Python
Shell

Release

贡献者

README

Dashcam Anonymizer 🕵🏻‍♂️

This repository blurs human faces and license plates in images and videos using a state-of-the-art object detection model, YOLOv8 by Ultralytics, and is fine-tuned using images from the OpenImagesDatasetV7.

Setup 🔩

Clone this repo by

git clone https://github.com/varungupta31/dashcam_anonymizer.git

A Convenient Script Has Been Provided To Setup the Repository 👨🏽‍💻

Activate any Python Environment of Your Preference (conda recommended)

Preferably with Python3.10+ 🐍

$ cd dashcam_anonymizer
$ chmod +x setup.sh

# Always be careful runnning .sh files, feel free to browse the contents of setup.sh before running
# The setup.sh file downloads relevant libraries and download the custom YOLO model as well (an alternate link if provided below as well)

$ ./setup.sh

[2024 🗞️] The model is now also hosted on a Google Drive, enabling the convenient gdown downloads!

Blurring Images in a Directory 📷

To blur all images in a directory,

Download the model from here and move it to model dir.

Update the configs/img_blur.yaml as required, and run the following command

python blur_images.py --config configs/img_blur.yaml

The resulting blur images will be stored in the directory specified in the YAML. Note: annot_txt folder will contain the YOLO detections in .txt format, converted to the VOC bounding-box format.

[2024 Updated]

Blurring Videos in a Directory 📹

Similar approach as above, now the command would be

python blur_videos.py --config configs/vid_blur.yaml

Note:

  1. If you run into mysterious libgc errors, what worked for me was to also install the opencv via Conda. PIP installation, leaves out some libgc libraries, which causes issues in the videowriter codecs.
  2. The configuration files are slightly different for videos and images. Make sure to choose and edit the correct ones depending upon the modality.
  3. This is designed to process all the contents in a given directory at once. If the blurring is to be re-run, make sure to delete the runs directory, as it may lead to new file names within the runs, which will cause errors.
  4. The blur_videos.py script currently expects the videos to be named numerically [1.mp4, 111.mp4] [Updates 2024, not anymore - name file as you wish]

Please Note 📝

  • Will this do a 100% perfect job? --> Maybe not.
    • Some specific angles pose a challenge in perfect detections - especially with faces!
  • Is there scope for improvement in terms of optimization? --> There always is.
    • Good to question it and call out, even better to help me improve it :)
  • This project has aged somewhat, but I still feel it does a pretty decent job compared to what’s out there.
    • If you feel the implementation is outdated, you may still benefit from the model I trained :)
    • If you end up improving the YOLO model, please raise an issue and I’ll be glad to incorporate it with due credits.

If this repository helped you in a research project, please consider to cite and ⭐️ this Repository!

@software{dashcam_anonymizer,
  author = {Varun Gupta},
  month = {8},
  title = {{Dashcam Anonymizer}},
  url = {https://github.com/varungupta31/dashcam_anonymizer},
  version = {1.0.0},
  year = {2023}
}

and please consider,

"Buy Me A Coffee"

评论

暂无评论