Clone this repo by
git clone https://github.com/varungupta31/dashcam_anonymizer.git
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!
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]
Similar approach as above, now the command would be
python blur_videos.py --config configs/vid_blur.yaml
Note:
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.runs
directory, as it may lead to new file names within the runs, which will cause errors.blur_videos.py
script currently expects the videos to be named numerically [1.mp4, 111.mp4]@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,