GithubHelp home page GithubHelp logo

ahahnut / -r-p2-ml-gcn Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 598 KB

Project codes of (Robust) Privacy-Preserving Multi-label Image Recognition with Graph Convolutional Network

Python 100.00%

-r-p2-ml-gcn's Introduction

P2-ML-GCN and RP2-ML-GCN.pytorch

Requirements

Please, install the following packages

  • numpy
  • torch-0.3.1
  • torchnet
  • torchvision-0.2.0
  • tqdm

Please unzip the files data.zip and checkpoint.zip.

Download pretrain models

checkpoint/coco (GoogleDrive)

checkpoint/voc (GoogleDrive)

Laplace Noise

noise = torch.from_numpy(np.random.laplace(0,1/epsilon,feature.size())).cuda().float()

You can add the noise Laplace noise into the model's input features, weights and output (in P2_models.py).

Regularization term

The regularization term can be added into the original loss function (in RP2_demo_voc2007_gcn.py or RP2_demo_voc2007_gcn.py).

Train Voc2007

python3 RP2_demo_voc2007_gcn.py data/voc --image-size 448 --batch-size 16 --epochs 40

Train MS-COCO

python3 RP2_demo_coco_gcn.py data/coco --image-size 448 --batch-size 8 --epochs 20

Test Voc2007

python3 RP2_demo_voc2007_gcn.py data/voc --image-size 448 --batch-size 16 -e --resume checkpoint/voc/voc_checkpoint.pth.tar

Test MS-COCO

python3 RP2_demo_coco_gcn.py data/coco --image-size 448 --batch-size 8 -e --resume checkpoint/coco/coco_checkpoint.pth.tar

Training Framework

The framework follows ML-GCN Multi-Label Image Recognition with Graph Convolutional Networks, CVPR 2019. And add the Laplace noise into the dot-produce of features and weights. Framework

Reference

This project is based on https://github.com/Megvii-Nanjing/ML-GCN

Tips

If you have any questions about our work, please do not hesitate to contact us.

-r-p2-ml-gcn's People

Contributors

ahahnut avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sorrowyn tf369

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.