All Projects → tfaehse → DashcamCleaner

tfaehse / DashcamCleaner

Licence: MIT License
Censor identifiable information in videos., in particular dashcam recordings in Germany.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to DashcamCleaner

Pesdk Ios Examples
A fully customizable photo editor for your app.
Stars: ✭ 837 (+4085%)
Mutual labels:  blur, frame
blur-my-shell
Extension that adds a blur look to different parts of the GNOME Shell, including the top panel, dash and overview
Stars: ✭ 516 (+2480%)
Mutual labels:  blur
RainbowTaskbar
Customizable Windows taskbar effects.
Stars: ✭ 39 (+95%)
Mutual labels:  blur
ECardFlow
🍭A custom ViewPager for multiple card flow system. && A layout which provide beautiful background effects for ViewPager.
Stars: ✭ 47 (+135%)
Mutual labels:  blur
ANYstructure
ANYstructure is the ultimate steel structure design tool for plate fields and cylinders. Weight optimization for all structures with machine learning capabilities. Calculations are based on DNV standards and rules.
Stars: ✭ 21 (+5%)
Mutual labels:  plates
tensorRT Pro
C++ library based on tensorrt integration
Stars: ✭ 857 (+4185%)
Mutual labels:  yolov5
flamingo
FreeCAD - flamingo workbench
Stars: ✭ 30 (+50%)
Mutual labels:  frame
Yolov5
Efficient implementation of YOLOV5 in TensorFlow2
Stars: ✭ 146 (+630%)
Mutual labels:  yolov5
raccoon
Python DataFrame with fast insert and appends
Stars: ✭ 64 (+220%)
Mutual labels:  frame
yolov5 rotation
rotated bbox detection. inspired by https://github.com/hukaixuan19970627/YOLOv5_DOTA_OBB, thanks hukaixuan19970627.
Stars: ✭ 51 (+155%)
Mutual labels:  yolov5
code-frame
Minimal Code Frame like babel-code-frame, but smaller
Stars: ✭ 22 (+10%)
Mutual labels:  frame
UniRate
Unity plugin to easily manage the application frame rate and rendering interval. Preventing battery power consumption and device heat, especially on mobile platforms.
Stars: ✭ 26 (+30%)
Mutual labels:  frame
onnx tensorrt project
Support Yolov5(4.0)/Yolov5(5.0)/YoloR/YoloX/Yolov4/Yolov3/CenterNet/CenterFace/RetinaFace/Classify/Unet. use darknet/libtorch/pytorch/mxnet to onnx to tensorrt
Stars: ✭ 145 (+625%)
Mutual labels:  yolov5
Face-Morphing
👯‍♀️ We are more alike than different - morphing one face to another
Stars: ✭ 66 (+230%)
Mutual labels:  faces
yolov5 deepsort tensorrt cpp
This repo is a C++ version of yolov5_deepsort_tensorrt. Packing all C++ programs into .so files, using Python script to call C++ programs further.
Stars: ✭ 21 (+5%)
Mutual labels:  yolov5
Kawase
Kawase dual filter blur for GameMaker Studio 2
Stars: ✭ 23 (+15%)
Mutual labels:  blur
Yolov5-distillation-train-inference
Yolov5 distillation training | Yolov5知识蒸馏训练,支持训练自己的数据
Stars: ✭ 84 (+320%)
Mutual labels:  yolov5
TOP-OPT-Plates
MATLAB Code for Topology Optimization of Plates
Stars: ✭ 25 (+25%)
Mutual labels:  plates
speed-prediction
Use 3D convolutional network to predict the speed of a car via dashcam stream. The final mean squared error on validation set is 3.1 (mile/hour)^2.
Stars: ✭ 34 (+70%)
Mutual labels:  dashcam
yolo slowfast
Yolov5+SlowFast: Realtime Action Detection Based on PytorchVideo
Stars: ✭ 99 (+395%)
Mutual labels:  yolov5

DashcamCleaner

This tool allows you to automatically censor faces and number plates on dashcam footage.
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Weights
  5. Roadmap
  6. Contributing
  7. License
  8. Contact
  9. Acknowledgements

About The Project

This project is a result of data protection laws that require identifiable information to be censored in media that is posted to the internet. Dashcam videos in particular tend to be fairly cumbersome to manually edit, so this tool aims to automate the task.

The goal is to release a simple to use application with simple settings and acceptable performance that does not require any knowledge about image processing, neural networks or even programming as a whole on the end user's part.

Development started with an MVP using understand.ai's Anonymizer for its backend. Since then, the project has moved on to a custom-trained YOLOv5 network. I wrote about my experiences training the network and generating training data on Towards Data Science.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

You need a working Python environment with a Python version of 3.8 or higher that satisfies the listed requirements.txt. Depending on your machine, you can leverage GPU acceleration for pytorch - see here or just use requirements-gpu.txt.

Since OpenCV does not care about audio channels, ffmpeg is used to combine the edited video and the audio channel of the input video. The environment variable FFMPEG_BINARY needs to be set to the ffmpeg executable for this to work.

Installation example on Windows using Conda

  1. Clone the repo
    git clone https://github.com/tfaehse/DashcamCleaner.git
  2. Set up Python environment and install requisites
    conda create -n py38 python=3.8
    conda activate py38
    pip install -r requirements.txt
  3. Install ffmpeg binaries (release essentials is enough) and create an environment variable "FFMPEG_BINARY" that points to the ffmpeg.exe binary.

Usage

On first launch, the YOLOv5 model is automatically downloaded and fused with the custom weights for face and plate detection from this repo.

UI screenshot

The UI is fairly self-explanatory: To use the tool, you need to:

  • choose an input video file
  • choose an output location
  • hit start!

The options adjust parameters of the detection algorithm and post processing options laid out in the roadmap. The detection threshold and inference size are direct parameters of the YOLOv5 detector, they provide the main controls for detection quality and speed that can be tweaked. In short:

  • Each recognized object, i.e. a face or a license plate, possesses a confidence value that describes how likely it is to actually be a license plate or a face. Increasing the threshold results in fewer false positives, at the cost of potential false negatives
  • The performance of the detector depends on the input size of the image, so the resolution of the video. The inference size option allows downscaling the input for detections only. The result is faster detection with reduced precision. NOTE: The output video still uses the full resolution from the input video, there is no loss in quality! Only detection runs at a lower resolution.

The blur size determines how strongly detected faces and license plates are blurred. Boxes around faces and license plates can be enlarged by a factor between 0.8 and 10 using the ROI enlargement dial.

Sometimes, a license plate might be missed for just one frame. This one frame, usually 1/30th of a second long, still means the license plate or face could easily be identified - a computationally very cheap (as opposed to increasing the inference scale) way to fix such false negatives can be the frame memory option. In essence, it blurs not only the detected boxes in the current frame, it also blurs regions that were detected in n frames before. Especially in combination with ROI enlargement and videos without very quick movement, this method can hide away missed detections.

For reference: even at 1080p inference, i.e. an inference scale of 1, a 1080p30fps video from my 70mai 1S processes at around 10 frames per second, a 1 minute clip takes ~3 minutes to blur on a 5820K/GTX1060 machine.

Weights

DashcamCleaner now supports loading weights dynamically, differently trained networks can be selected in the user interface. As part of this change, I will distribute trained networks for German roads with different training parameters over the next weeks:

  • different training image resolutions
  • different network depths, i.e. YOLOv5's small and medium definitions

Once this is completed, I intend to publish an analysis on how training and inference image size and network depth affect performance and quality of the program.

As a rule of thumb:

  • bigger images lead to better detection of small objects, for both training and inference
  • deeper networks have a higher ceiling for object detection but slow down training and inference
  • lowering inference image size can dramatically speed up the program

In summary, you should select the highest inference image size you can afford. The impact of higher training image sizes and deeper networks will be investigated once training has been completed!

Roadmap

With the transition to a custom YOLOv5 detector, the original targets for the tool have been met. Performance is satisfactory and detection quality is very promising. However, work remains:

  • further trained networks and an analysis of different network sizes and image sizes used for training
  • release standalone executable

Implemented post processing steps:

  • a "frame memory": plate and face positions from the last n frames are also blurred → useful for static plates/faces
  • enlarging of blurred regions → useful in combination with frame memory - most single missed frames can be captured this way, unless very quick movement is happening

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Thomas Fähse - [email protected]

Project Link: https://github.com/tfaehse/DashcamCleaner

Acknowledgements

  • YOLOv5 was chosen for its combination of performance, speed and ease of use
  • The original prototype was essentially a wrapper for Anonymizer, and the current implementation wouldn't have been possible without its high quality labels.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].