Full body anonymization - Realistic Full-Body Anonymization with Surface-Guided GANs

Overview

Realistic Full-Body Anonymization with Surface-Guided GANs

This is the official source code for the paper "Realistic Full-Body Anonymization with Surface-Guided GANs".

[Arixv Paper] [Appendix]

Surface-guided GANs is an automatic full-body anonymization technique based on Generative Adversarial Networks.

The key idea of surface-guided GANs is to guide the generative model with dense pixel-to-surface information (based on continuous surface embeddings). This yields highly realistic anonymization result and allows for diverse anonymization.

Requirements

  • Pytorch >= 1.9
  • Torchvision >= 0.11
  • Python >= 3.8
  • CUDA capable device for training. Training was done with 1-4 32GB V100 GPUs.

Installation

We recommend to setup and install pytorch with anaconda following the pytorch installation instructions.

  1. Clone repository: git clone https://github.com/hukkelas/full_body_anonymization/.
  2. Install using setup.py:
pip install -e .

Test the model

The file anonymize.py can anonymize image paths, directories and videos. python anonymize.py --help prints the different options.

To anonymize, visualize and save an output image, you can write:

python3 anonymize.py configs/surface_guided/configE.py coco_val2017_000000001000.jpg --visualize --save

The truncation value decides the "creativity" of the generator, which you can specify in the range (0, 1). Setting -t 1 will generate diverse anonymization between individuals in the image. We recommend to set it to t=0.5 to tradeoff between quality and diversity.

python3 anonymize.py configs/surface_guided/configE.py coco_val2017_000000001000.jpg --visualize --save -t 1

Pre-trained models

Current release includes a pre-trained model for ConfigE from the main paper. More pre-trained models will be released later.

Train the model

Instructions to train and reproduce results from the paper will be released by January 14th 2022.

License

All code, except the stated below, is released under MIT License.

Code under has are provided with other licenses:

Citation

If you use this code for your research, please cite:

@misc{hukkelås2022realistic,
      title={Realistic Full-Body Anonymization with Surface-Guided GANs}, 
      author={Håkon Hukkelås and Morten Smebye and Rudolf Mester and Frank Lindseth},
      year={2022},
      eprint={2201.02193},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
You might also like...
An architecture that makes any doodle realistic, in any specified style, using VQGAN, CLIP and some basic embedding arithmetics.
An architecture that makes any doodle realistic, in any specified style, using VQGAN, CLIP and some basic embedding arithmetics.

Sketch Simulator An architecture that makes any doodle realistic, in any specified style, using VQGAN, CLIP and some basic embedding arithmetics. See

GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models

GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Model This repository is the official PyTorch implementation of GraphRNN, a graph gene

This Artificial Intelligence program can take a black and white/grayscale image and generate a realistic or plausible colorized version of the same picture.

Colorizer The point of this project is to write a program capable of taking a black and white / grayscale image, and generating a realistic or plausib

Official implementation of the paper 'Details or Artifacts: A Locally Discriminative Learning Approach to Realistic Image Super-Resolution' in CVPR 2022
Official implementation of the paper 'Details or Artifacts: A Locally Discriminative Learning Approach to Realistic Image Super-Resolution' in CVPR 2022

LDL Paper | Supplementary Material Details or Artifacts: A Locally Discriminative Learning Approach to Realistic Image Super-Resolution Jie Liang*, Hu

Code for the ECCV2020 paper "A Differentiable Recurrent Surface for Asynchronous Event-Based Data"

A Differentiable Recurrent Surface for Asynchronous Event-Based Data Code for the ECCV2020 paper "A Differentiable Recurrent Surface for Asynchronous

Poisson Surface Reconstruction for LiDAR Odometry and Mapping
Poisson Surface Reconstruction for LiDAR Odometry and Mapping

Poisson Surface Reconstruction for LiDAR Odometry and Mapping Surfels TSDF Our Approach Table: Qualitative comparison between the different mapping te

Implementation for the
Implementation for the "Surface Reconstruction from 3D Line Segments" paper.

Surface Reconstruction from 3D Line Segments Surface reconstruction from 3d line segments. Langlois, P. A., Boulch, A., & Marlet, R. In 2019 Internati

the code of the paper: Recurrent Multi-view Alignment Network for Unsupervised Surface Registration (CVPR 2021)
the code of the paper: Recurrent Multi-view Alignment Network for Unsupervised Surface Registration (CVPR 2021)

RMA-Net This repo is the implementation of the paper: Recurrent Multi-view Alignment Network for Unsupervised Surface Registration (CVPR 2021). Paper

Neural Surface Maps

Neural Surface Maps Official implementation of Neural Surface Maps - Luca Morreale, Noam Aigerman, Vladimir Kim, Niloy J. Mitra [Paper] [Project Page]

Comments
  • Adding checkpoint saving

    Adding checkpoint saving

    It seems like the checkpoint is saved only at the end of training. As training takes long I think it would be good to save current checkpoints with logging. Am I right to add it in fba/engine/trainer.py ->train_step function:

        def train_step(self):
            with torch.autograd.profiler.record_function("data_fetch"):
                batch = next(self.data_train)
            self.to_log.update(self.step_D(batch))
            self.to_log.update(self.step_G(batch))
            self.EMA_generator.update(self.generator)
            if logger.global_step >= self._next_log_point:
                log = {f"loss/{key}": item.item() for key, item in self.to_log.items()}
                logger.log_variable("amp/grad_scale", self.scaler.get_scale())
                logger.log_dictionary(log, commit=True)
                self._next_log_point += self._ims_per_log
                self.to_log = {}
                super().save_checkpoint() 
    
    opened by KyriaAnnwyn 2
  • Datasets problem

    Datasets problem

    Excuse me, when I tred to train your model I found the datasets.md was empty. So how can I prepare my datasets or have the datasets.md finished? Thanks!

    opened by towardshch 5
Owner
Håkon Hukkelås
Interested in generative models, autonomous vehicles and other deep learning areas.
Håkon Hukkelås
Expressive Body Capture: 3D Hands, Face, and Body from a Single Image

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image [Project Page] [Paper] [Supp. Mat.] Table of Contents License Description Fittin

Vassilis Choutas 1.3k Jan 7, 2023
WormMovementSimulation - 3D Simulation of Worm Body Movement with Neurons attached to its body

Generate 3D Locomotion Data This module is intended to create 2D video trajector

null 1 Aug 9, 2022
Code for 'Self-Guided and Cross-Guided Learning for Few-shot segmentation. (CVPR' 2021)'

SCL Introduction Code for 'Self-Guided and Cross-Guided Learning for Few-shot segmentation. (CVPR' 2021)' We evaluated our approach using two baseline

null 34 Oct 8, 2022
🕺Full body detection and tracking

Pose-Detection ?? Overview Human pose estimation from video plays a critical role in various applications such as quantifying physical exercises, sign

Abbas Ataei 20 Nov 21, 2022
《Towards High Fidelity Face Relighting with Realistic Shadows》(CVPR 2021)

Towards High Fidelity Face-Relighting with Realistic Shadows Andrew Hou, Ze Zhang, Michel Sarkis, Ning Bi, Yiying Tong, Xiaoming Liu. In CVPR, 2021. T

null 114 Dec 10, 2022
Disentangled Cycle Consistency for Highly-realistic Virtual Try-On, CVPR 2021

Disentangled Cycle Consistency for Highly-realistic Virtual Try-On, CVPR 2021 [WIP] The code for CVPR 2021 paper 'Disentangled Cycle Consistency for H

ChongjianGE 94 Dec 11, 2022
Pytorch implementation for reproducing StackGAN_v2 results in the paper StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks

StackGAN-v2 StackGAN-v1: Tensorflow implementation StackGAN-v1: Pytorch implementation Inception score evaluation Pytorch implementation for reproduci

Han Zhang 809 Dec 16, 2022
In this project we investigate the performance of the SetCon model on realistic video footage. Therefore, we implemented the model in PyTorch and tested the model on two example videos.

Contrastive Learning of Object Representations Supervisor: Prof. Dr. Gemma Roig Institutions: Goethe University CVAI - Computational Vision & Artifici

Dirk Neuhäuser 6 Dec 8, 2022
pytorch implementation for Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network arXiv:1609.04802

PyTorch SRResNet Implementation of Paper: "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"(https://arxiv.org/abs

Jiu XU 436 Jan 9, 2023
Toward Realistic Single-View 3D Object Reconstruction with Unsupervised Learning from Multiple Images (ICCV 2021)

Table of Content Introduction Getting Started Datasets Installation Experiments Training & Testing Pretrained models Texture fine-tuning Demo Toward R

VinAI Research 42 Dec 5, 2022