Git Product home page Git Product logo

opom's Introduction

One Person One Mask (OPOM)

Code and datasets of TPAMI 2022 paper OPOM: Customized Invisible Cloak towards Face Privacy Protection.

While convenient in daily life, face recognition technologies also raise privacy concerns for regular users on the social media since they could be used to analyze face images and videos, efficiently and surreptitiously without any security restrictions. We investigate the face privacy protection from a technology standpoint based on a new type of customized cloak, which can be applied to all the images of a regular user, to prevent malicious face recognition systems from uncovering their identity. Specifically, we propose a new method, named one person one mask (OPOM), to generate person-specific (class-wise) universal masks by optimizing each training sample in the direction away from the feature subspace of the source identity. The effectiveness of the proposed method is evaluated on both common and celebrity datasets against black-box face recognition models.

arch

Usage Instructions

Environment

Please install Anaconda, Pytorch and MxNet. For other libs, please refer to the file requirements.txt.

conda create -n OPOM python=3.7
conda activate OPOM
git clone https://github.com/zhongyy/OPOM.git
pip install -r requirements.txt

Datasets and face recognition models

  • Please download Privacy-Commons dataset Baidu Netdisk(password: 3g2b), Google Drive; and Privacy-Celebrities dataset Baidu Netdisk(password: 28cq), Google Drive.

  • Create a folder ['data/'] at the same level with ['code/'], and then unzip the datasets into it.

  • Please download Surrogate models and Target models: Baidu Netdisk(password: y1cy), Google Drive.

  • Create a folder ['models/'] at the same level with ['code/'], and then unzip the models into it.

Privacy Mask Generation

To generate privacy masks of Privacy-Commons dataset, based on surrgate model "Resnet50-WebFace-Softmax", with different approximation methods, and transferability enhancement methods, please do as follows. Other surrogate models can be used modifying "--pretrained". Other parameters, please refer to the code.

cd code/generation
./gen_privacy_common_softmax.sh 

To generate privacy masks of Privacy-Celebrities dataset, please do as follows.

./gen_privacy_celeb_softmax.sh 

Privacy Mask Evaluation

After generating the privacy masks, please refer to the evaluation part for privacy pretection rate. You can modify "--msk_dir" for different versions of masks. For Privacy-Commons dataset, evaluation towards six target models is as follows.

cd code/evaluation
./test_common.sh 

For Privacy-Celebrities dataset, evaluation towards six target models is as follows.

./test_celeb.sh 

Citation

If you find OPOM useful in your research, please consider to cite:

@ARTICLE{zhong2022OPOM,
  title = {OPOM: Customized Invisible Cloak towards Face Privacy Protection},
  author = {Zhong, Yaoyao and Deng, Weihong},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  year = {2022}
}

Acknowledgment

We would like to thank Jinglin Zhang and Xuannan Liu for useful feedback, and anonymous referees for their valuable comments.

opom's People

Contributors

zhongyy avatar

Stargazers

 avatar  avatar  avatar yb_li avatar Qizhang Li avatar  avatar Cameltr avatar xaddwell avatar Jun Liu avatar Leo avatar sleepy dog avatar  avatar  avatar 爱可可-爱生活 avatar  avatar Katsuya Hyodo avatar Xuanmeng Zhang avatar Hongwei Fan avatar  avatar

Watchers

 avatar

opom's Issues

About test_celeb.sh

Hi, I am using "test_celeb.sh" and mxnet gives me the following error "MXNetError: Compile with USE_CUDA=1 to enable GPU usage". I'm using Python 3.7 (ubuntu18.04) Cuda 10.0, switching CUDA to 11.x does the same thing, switching to mxnet's version of CUDA results in a worse link loss problem. Do you have a good solution for this?

Visualize the masks

Thank you for your excellent work. I want to know how to visualize these mask in ‘generation’

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.