Skip to content

Repository files navigation

LA3D CI Python LA3D CI Anaconda
Open LA3D-AN-VAD-Video-XD in Colab LA3D DEMO LA3D PAPER LA3D PAPER Appendix LA3D PAPER Supplementary

LA3D DEMO LA3D: A Lightweight Adaptive Privacy Anonymization for VAD

Official implementation of the paper Mulugeta W. Asres, et al. "Low-Latency Video Anonymization for Crowd Anomaly Detection: Privacy vs. Performance", published in the IEEE Transactions on Information Forensics and Security (TIFS).

The LA3D (Lightweight Adaptive Privacy Anonymization for Video Anomaly Detection) provides computationally efficient and dynamic anonymization (AN) that enhances privacy protection while maintaining the accuracy of Video Anomaly Detection (VAD).

Highlights (Project page at LA3D DEMO)

  • AI holds considerable promise for enhancing computer vision (CV) applications using surveillance CCTV cameras.
  • Concerns about privacy and model bias have made it challenging to utilize CV in public.
  • Deep learning AN models are computationally demanding for real-time edge deployment.
  • In this study, we revisit conventional AN solutions for privacy protection and real-time VAD.
  • We propose a novel LA3D that employs dynamic AN to enhance privacy-aware VAD.
  • The LA3D enables substantial enhancement in the privacy AN without significantly degrading VAD efficacy.
  • Performance was evaluated on publicly available privacy and large-scale VAD data sets.
pel_xd_all_imwh320x136_Fast.Five.2011__.00-32-56_00-33-26_label_B2-0-0_ad.mp4
pel_ucf_all_imwh320x240_Burglary033_x264_ad.mp4

Resources

We thank and credit the public data sets and source code for the models listed below.

System Design of the LA3D

General System Pipeline Diagram of Anonymized VAD:

LA3D_diagrams-vad_anonymized

System Pipeline Diagram of the adaptive AN System: The adaptive AN enhances privacy protection by utilizing the dynamic AN method.

LA3D Diagram Adaptive AN Approach

Performance on Privacy Attribute Detection vs. Video Anomaly Detection

Using PEL4VAD and MGFN VAD Models on the UCF-Crime and XD-Violence Datasets.

$No-AN$: Non-anonymized, $G^0$: baseline Guassian smoothing, $G^a$: adaptive Guassian, $G^a_{max}$: adaptive maximum Guassian, $P^0$: baseline pixelization, $\mathcal{P^a}$: adaptive pixelization, and $P^a_{max}$: adaptive maximum pixelization.

The PEL4VAD and MGFN VAD models on UCF-Crime and XD-Violence vs. PD on VISPR

NB: The above plot presents improved performance of the MGFN VAD model than the reported scores in the aXriv paper due to an enhanced preprocessing of standardization scaling from kinetics.

Table of Contents

Installation

Download models from Google drive

# Clone the repo.
git clone https://github.com/muleina/LA3D.git && cd LA3D

# Download the model checkpoints from the Google drive link. 
# Store the models in /src/models/{'MODEL NAME'}/. Keep the path structure for each model as the download repository.

    |-LA3D/
        |-src/
            |-model/
                |-OBJECT_DETECTOR/
                    |-yolo/
                |-VIDEO_ENCODER_RESNET_1024/
                    |-models/
                        |-i3d/
                            |-ckpt/
                |-VIDEO_ENCODER_RESNET_2048/
                    |-ckpt/
                |-PEL4VAD/
                    |-ckpt/
                |-MGFN
                    |-ckpt/

# Anaconda install options: using yml
conda env create -f conda_environment.yml

# Anaconda install options: using txt
conda create --name la3d --file conda_requirements.txt

# Pip install to existing environment.
pip install -r pip_requirements.txt

# The setup configurations of the LA3D are given in the config/config.py file.

Usage-CLI

The LA3D app testing parameters can be supplied through the main.py.

Real-time processing through webcam and offline processing from image or video files are supported.

Use the flag -v for direct visualization of the results and -s to save results.

LA3D: Real-Time AN using Webcam

python main.py -a an -if webcam -is 320 240 -anm mask -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm no-an -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm edge -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm blur -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm adaptive_blur -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm adaptive_full_blur -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm adaptive_max_blur -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm pixelization -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm adaptive_pixelization -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if webcam -is 320 240 -anm adaptive_max_pixelization -odc person -ods 320 240 -odt 0.25 -v

LA3D: AN on Images

python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm no-an -odc person -ods 320 240 -odt 0.25 -v
python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm mask -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm adaptive_blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm adaptive_full_blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm pixelization -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an -if image -is 320 240 -id "{add here the main_path}/data/VISPR/2017_17368641.jpg" -anm adaptive_pixelization -odc person -ods 320 240 -odt 0.25 -s

LA3D: AN-VAD on Videos

# PEL4VAD on UCF-Crime dataset
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm no-an -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm mask -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm adaptive_blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm adaptive_full_blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm pixelization -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm adaptive_pixelization -odc person -ods 320 240 -odt 0.25 -s

# PEL4VAD on XD-Violence dataset
python main.py -a an-ad -adm pel -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm no-an -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm mask -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm adaptive_blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm adaptive_full_blur -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm pixelization -odc person -ods 320 240 -odt 0.25 -s
python main.py -a an-ad -adm pel -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm adaptive_pixelization -odc person -ods 320 240 -odt 0.25 -s

# MGFN on UCF-Crime dataset
python main.py -a an-ad -adm mgfn -ads ucf -if video -id "{add here the main_path}/data/UCF_Crime/Burglary033_x264.mp4" -anm mask -odc person -ods 320 240 -odt 0.25 -s

# MGFN on XD-Violence dataset
python main.py -a an-ad -adm mgfn -ads xd -if video -id "{add here the main_path}/data/XD_Violence/Fast.Five.2011__#00-32-56_00-33-26_label_B2-0-0.mp4" -anm mask -odc person -ods 320 240 -odt 0.25 -s

Usage-Notebook

We have also provided notebooks for a step-wise demo of the AN-VAD pipeline using different models and data sources.

Results:

AN Enhancement using LA3D's Adaptive Approach

The privacy shield comparison with baseline AN: the adaptive AN improves protection considerably---robust against variations in target-object depth and image resolution.

$No-AN$: Non-anonymized, $G^0$: baseline Guassian smoothing, $G^a$: adaptive Guassian, $P^0$: baseline pixelization, and $\mathcal{P^a}$: adaptive pixelization.

Baseline vs Adaptive AN on VISPR Dataset

Scalability comparison on different image resolutions

Scalability of Adaptive AN on VISPR Dataset

AN Trade-offs on VAD

The figure demonstrates the impact of the different AN on the VAD performance. The PEL4VAD has generally better anomaly localization than the MGFN VAD model.

AN-vAD on the UCF-Crime and XD-Violence Datasets

More AN Results:

$No-AN$: Non-anonymized, $G^0$: baseline Guassian, $G^a$: adaptive Guassian, $P^0$: baseline pixelization, and $\mathcal{P^a}$: adaptive pixelization.

AN on the VISPR Dataset

Computational Cost Analysis

The conventional baseline vs adaptive vs deep learning AN approaches on an Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz with 64GB RAM and Nvidia Tesla V100-SXM3-32GB.

  • The adaptive approaches of the LA3D increase the processing time by approximately 5% compared to the non-adpative AN-VAD.

We have also conducted the cost analysis of the AN in GPU and CPU modes:

  • The adaptive AN increases the GPU processing time by $3$ to $6$ ms and $1$ to $9$ ms on CPU.
  • The incremental memory remains roughly GPU: $220$ MB and CPU: $160$ MB, with a negligible difference from the baseline ANs.
  • The DL method has a $16 \times$ slower speed and a $14 \times$ higher memory consumption.
  • The cost analysis demonstrates the feasibility of the proposed lightweight AN approaches for real-time edge CV applications.
  • The DeepPrivacy2, one of the state-of-the-art DL in realistic image generation for AN, considerably sacrifices computation efficiency.

Per-Frame AN Computational Cost

Privacy-Leakage after AN

We have revealed potential privacy leakage after AN, where a person can be identified from personal belongings. We employ OSNet ReID models on the Market1501 multi-camera dataset.

Privacy Leakage after AN through Items

BibTeX Citation

If you employ any part of the study or the code, please kindly cite the following paper:

@article{asres2025low,
  title={Low-Latency Video Anonymization for Crowd Anomaly Detection: Privacy Versus Performance},
  author={Asres, Mulugeta Weldezgina and Jiao, Lei and Omlin, Christian Walter},
  journal={IEEE Transactions on Information Forensics and Security},
  year={2025},
  publisher={IEEE}
}

About

A lightweight adaptive anonymization for VAD (LA3D) that employs dynamic adjustment to enhance privacy protection.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages