• Stars
    star
    175
  • Rank 211,564 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[CVPR 2020] DPGN: Distribution Propagation Graph Network for Few-shot Learning.

DPGN: Distribution Propagation Graph Network for Few-shot Learning

This repository is the official implementation of DPGN: Distribution Propagation Graph Network for Few-shot Learning.

Abstract

Most graph-network-based meta-learning approaches model instance-level relation of examples. We extend this idea further to explicitly model the distribution-level relation of one example to all other examples in a 1-vs-N manner. We propose a novel approach named distribution propagation graph network (DPGN) for few-shot learning. It conveys both the distribution-level relations and instance-level relations in each few-shot learning task. To combine the distribution-level relations and instance-level relations for all examples, we construct a dual complete graph network which consists of a point graph and a distribution graph with each node standing for an example. Equipped with dual graph architecture, DPGN propagates label information from labeled examples to unlabeled examples within several update generations. In extensive experiments on few-shot learning benchmarks, DPGN outperforms state-of-the-art results by a large margin in 5% ∼ 12% under supervised settings and 7% ∼ 13% under semi-supervised settings.

Requirements

CUDA Version: 10.1

Python : 3.5.2

To install dependencies:

sudo pip3 install -r requirements.txt

Dataset

For your convenience, you can download the datasets directly from links on the left, or you can make them from scratch following the original splits on the right.

Dataset Original Split
Mini-ImageNet Matching Networks
Tiered-ImageNet SSL
CIFAR-FS R2D2
CUB-200-2011 Closer Look

The dataset directory should look like this:

β”œβ”€β”€ dataset
    β”œβ”€β”€ mini-imagenet
        β”œβ”€β”€ mini_imagenet_test.pickle   
        β”œβ”€β”€ mini_imagenet_train.pickle  
        β”œβ”€β”€ mini_imagenet_val.pickle
    β”œβ”€β”€ tiered-imagenet
        β”œβ”€β”€ class_names.txt   
        β”œβ”€β”€ synsets.txt  
        β”œβ”€β”€ test_images.npz
        β”œβ”€β”€ test_labels.pkl   
        β”œβ”€β”€ train_images.npz  
        β”œβ”€β”€ train_labels.pkl
        β”œβ”€β”€ val_images.npz
        β”œβ”€β”€ val_labels.pkl
    β”œβ”€β”€ cifar-fs
        β”œβ”€β”€ cifar_fs_test.pickle   
        β”œβ”€β”€ cifar_fs_train.pickle  
        β”œβ”€β”€ cifar_fs_val.pickle
    β”œβ”€β”€ cub-200-2011
        β”œβ”€β”€ attributes   
        β”œβ”€β”€ bounding_boxes.txt 
        β”œβ”€β”€ classes.txt
        β”œβ”€β”€ image   
        β”œβ”€β”€ image_class_labels.txt 
        β”œβ”€β”€ images
        β”œβ”€β”€ images.txt   
        β”œβ”€β”€ parts
        β”œβ”€β”€ README
        β”œβ”€β”€ split
        β”œβ”€β”€ train_test_split.txt

Training

To train the model(s) in the paper, run:

python3 main.py --dataset_root dataset --config config/5way_1shot_resnet12_mini-imagenet.py --num_gpu 1 --mode train

Evaluation

To evaluate the model(s) in the paper, run:

python3 main.py --dataset_root dataset --config config/5way_1shot_resnet12_mini-imagenet.py --num_gpu 1 --mode eval

Pre-trained Models

This Google Drive contains pre-trained model under settings of 5way-1shot and 5way-5shots for mini-ImageNet dataset with ResNet12 backbone.

Results

# Default checkpoints directory is:
./checkpoints
# Default logs directory is:
./logs

Our model achieves the following performance on mini-ImageNet, tiered-ImageNet, CUB-200-2011 and CIFAR-FS (more detailed experimental results are in the paper).

miniImageNet:

Method Backbone 5way-1shot 5way-5shot
MatchingNet ConvNet 43.56Β±0.84 55.31Β± 0.73
ProtoNet ConvNet 49.42Β±0.78 68.20Β±0.66
RelationNet ConvNet 50.44Β±0.82 65.32Β±0.70
MAML ConvNet 48.70Β±1.84 55.31Β±0.73
GNN ConvNet 50.33Β±0.36 66.41Β±0.63
TPN ConvNet 55.51Β±0.86 69.86Β±0.65
Edge-label ConvNet 59.63Β±0.52 76.34Β±0.48
DPGN ConvNet 66.01Β±0.36 82.83Β±0.41
LEO WRN 61.76Β±0.08 77.59Β±0.12
wDAE WRN 61.07Β±0.15 76.75Β±0.11
DPGN WRN 67.24Β±0.51 83.72Β±0.44
CloserLook ResNet18 51.75Β±0.80 74.27Β±0.63
CTM ResNet18 62.05Β±0.55 78.63Β±0.06
DPGN ResNet18 66.63Β±0.51 84.07Β±0.42
MetaGAN ResNet12 52.71Β±0.64 68.63Β±0.67
SNAIL ResNet12 55.71Β±0.99 68.88Β±0.92
TADAM ResNet12 58.50Β±0.30 76.70Β±0.30
Shot-Free ResNet12 59.04Β±0.43 77.64Β±0.39
Meta-Transfer ResNet12 61.20Β±1.80 75.53Β±0.80
FEAT ResNet12 62.96Β±0.02 78.49Β±0.02
MetaOptNet ResNet12 62.64Β±0.61 78.63Β±0.46
DPGN ResNet12 67.77Β±0.32 84.60Β±0.43

tieredImageNet:

Method backbone 5way-1shot 5way-5shot
MAML ConvNet 51.67Β±1.81 70.30Β±1.75
ProtoNet ConvNet 53.34Β±0.89 72.69Β±0.74
RelationNet ConvNet 54.48Β±0.93 71.32Β±0.78
TPN ConvNet 59.91Β±0.94 73.30Β±0.75
Edge-label ConvNet 63.52Β±0.52 80.24Β±0.49
DPGN ConvNet 69.43Β±0.49 85.92Β±0.42
CTM ResNet18 64.78Β±0.11 81.05Β±0.52
DPGN ResNet18 70.46Β±0.52 86.44Β±0.41
TapNet ResNet12 63.08Β±0.15 80.26Β±0.12
Meta-Transfer ResNet12 65.62Β±1.80 80.61Β±0.90
MetaOptNet ResNet12 65.81Β±0.74 81.75Β±0.53
Shot-Free ResNet12 66.87Β±0.43 82.64Β±0.39
DPGN ResNet12 72.45Β±0.51 87.24Β±0.39

CUB-200-2011:

Method backbone 5way-1shot 5way-5shot
ProtoNet ConvNet 51.31Β±0.91 70.77Β±0.69
MAML ConvNet 55.92Β±0.95 72.09Β±0.76
MatchingNet ConvNet 61.16Β±0.89 72.86Β±0.70
RelationNet ConvNet 62.45Β±0.98 76.11Β±0.69
CloserLook ConvNet 60.53Β±0.83 79.34Β±0.61
DN4 ConvNet 53.15Β±0.84 81.90Β±0.60
DPGN ConvNet 76.05Β±0.51 89.08Β±0.38
FEAT ResNet12 68.87Β±0.22 82.90Β±0.15
DPGN ResNet12 75.71Β±0.47 91.48Β±0.33

CIFAR-FS:

Method backbone 5way-1shot 5way-5shot
ProtoNet ConvNet 55.5Β±0.7 72.0Β±0.6
MAML ConvNet 58.9Β±1.9 71.5Β±1.0
RelationNet ConvNet 55.0Β±1.0 69.3Β±0.8
R2D2 ConvNet 65.3Β±0.2 79.4Β±0.1
DPGN ConvNet 76.4Β±0.5 88.4Β±0.4
Shot-Free ResNet12 69.2Β±0.4 84.7Β±0.4
MetaOptNet ResNet12 72.0Β±0.7 84.2Β±0.5
DPGN ResNet12 77.9Β±0.5 90.2Β±0.4

More Repositories

1

NAFNet

The state-of-the-art image restoration model without nonlinear activation functions.
Python
1,998
star
2

ML-GCN

PyTorch implementation of Multi-Label Image Recognition with Graph Convolutional Networks, CVPR 2019.
Python
1,384
star
3

video_analyst

A series of basic algorithms that are useful for video understanding, including Single Object Tracking (SOT), Video Object Segmentation (VOS) and so on.
Python
811
star
4

PETR

[ECCV2022] PETR: Position Embedding Transformation for Multi-View 3D Object Detection & [ICCV2023] PETRv2: A Unified Framework for 3D Perception from Multi-Camera Images
Python
787
star
5

IJCAI2023-CoNR

IJCAI2023 - Collaborative Neural Rendering using Anime Character Sheets
Jupyter Notebook
782
star
6

mdistiller

The official implementation of [CVPR2022] Decoupled Knowledge Distillation https://arxiv.org/abs/2203.08679 and [ICCV2023] DOT: A Distillation-Oriented Trainer https://openaccess.thecvf.com/content/ICCV2023/papers/Zhao_DOT_A_Distillation-Oriented_Trainer_ICCV_2023_paper.pdf
Python
739
star
7

BBN

The official PyTorch implementation of paper BBN: Bilateral-Branch Network with Cumulative Learning for Long-Tailed Visual Recognition
Python
656
star
8

MOTR

[ECCV2022] MOTR: End-to-End Multiple-Object Tracking with TRansformer
Python
557
star
9

neural-painter

Paint artistic patterns using random neural network.
Python
531
star
10

CREStereo

Official MegEngine implementation of CREStereo(CVPR 2022 Oral).
Python
443
star
11

megvii-pku-dl-course

Homepage for the joint course of Megvii Inc. and Peking University on Deep Learning.
Python
439
star
12

HiDiffusion

Jupyter Notebook
384
star
13

MSPN

Multi-Stage Pose Network
Python
333
star
14

MOTRv2

[CVPR2023] MOTRv2: Bootstrapping End-to-End Multi-Object Tracking by Pretrained Object Detectors
Python
332
star
15

AnchorDETR

An official implementation of the Anchor DETR.
Python
321
star
16

Sparsebit

A model compression and acceleration toolbox based on pytorch.
Python
319
star
17

FQ-ViT

[IJCAI 2022] FQ-ViT: Post-Training Quantization for Fully Quantized Vision Transformer
Python
273
star
18

FSCE

Python
272
star
19

TransMVSNet

(CVPR 2022) TransMVSNet: Global Context-aware Multi-view Stereo Network with Transformers.
Python
259
star
20

OccDepth

Maybe the first academic open work on stereo 3D SSC method with vision-only input.
Python
258
star
21

RevCol

Official Code of Paper "Reversible Column Networks" "RevColv2"
Python
243
star
22

DCLS-SR

Official PyTorch implementation of the paper "Deep Constrained Least Squares for Blind Image Super-Resolution", CVPR 2022.
Python
215
star
23

TLC

Test-time Local Converter
Python
214
star
24

SOLQ

"SOLQ: Segmenting Objects by Learning Queries", SOLQ is an end-to-end instance segmentation framework with Transformer.
Python
195
star
25

introduction-neural-3d-reconstruction

Course materials for Introduction to Neural 3D Reconstruction
182
star
26

AAAI2023-PVD

Official Implementation of PVD and PVDAL: http://sk-fun.fun/PVD-AL/
Python
180
star
27

tf-tutorials

Tutorials for deep learning course here:
Jupyter Notebook
180
star
28

PMN

[TPAMI 2023 / ACMMM 2022 Best Paper Runner-Up Award] Learnability Enhancement for Low-light Raw Denoising: Where Paired Real Data Meets Noise Modeling (a Data Perspective)
Python
120
star
29

CADDM

Official implementation of ID-unaware Deepfake Detection Model
C++
116
star
30

CR-DA-DET

The official PyTorch implementation of paper Exploring Categorical Regularization for Domain Adaptive Object Detection (CR-DA-DET)
Python
115
star
31

megfile

Megvii FILE Library - Working with Files in Python same as the standard library
Python
104
star
32

TreeEnergyLoss

[CVPR2022] Tree Energy Loss: Towards Sparsely Annotated Semantic Segmentation
Python
101
star
33

CVPR2023-UniDistill

CVPR2023 (highlight) - UniDistill: A Universal Cross-Modality Knowledge Distillation Framework for 3D Object Detection in Bird's-Eye View
Python
99
star
34

Far3D

[AAAI2024] Far3D: Expanding the Horizon for Surround-view 3D Object Detection
Jupyter Notebook
98
star
35

hpman

A hyperparameter manager for deep learning experiments.
Python
94
star
36

RealFlow

The official implementation of the ECCV 2022 Oral paper: RealFlow: EM-based Realistic Optical Flow Dataset Generation from Videos
Python
85
star
37

Iter-E2EDET

Official implementation of the paper "Progressive End-to-End Object Detection in Crowded Scenes"
Python
84
star
38

HDR-Transformer

The official MegEngine implementation of the ECCV 2022 paper: Ghost-free High Dynamic Range Imaging with Context-aware Transformer
Python
82
star
39

FSSD_OoD_Detection

Feature Space Singularity for Out-of-Distribution Detection. (SafeAI 2021)
Python
80
star
40

cv-master-ex

torch version of instant-ngp, image rendering
C++
78
star
41

SSQL-ECCV2022

PyTorch implementation of SSQL (Accepted to ECCV2022 oral presentation)
Python
75
star
42

expman

Shell
62
star
43

megvii-tsinghua-dl-course

Slides with modifications for a course at Tsinghua University.
56
star
44

BasesHomo

The official PyTorch implementation of the paper "Motion Basis Learning for Unsupervised Deep Homography Estimation with Subspace Projection".
Python
53
star
45

LGD

Official Implementation of the detection self-distillation framework LGD.
Python
52
star
46

D2C-SR

Official MegEngine implementation of ECCV2022 "D2C-SR: A Divergence to Convergence Approach for Real-World Image Super-Resolution".
Python
43
star
47

KD-MVS

Code for ECCV2022 paper 'KD-MVS: Knowledge Distillation Based Self-supervised Learning for Multi-view Stereo'
Python
42
star
48

protoclip

πŸ“ Official pytorch implementation of paper "ProtoCLIP: Prototypical Contrastive Language Image Pretraining" (IEEE TNNLS)
Python
41
star
49

pytorch-gym

Implementation of the Deep Deterministic Policy Gradient(DDPG) in bullet Gym using pytorch
Python
40
star
50

AGFlow

Learning Optical Flow with Adaptive Graph Reasoning (AGFlow, AAAI-2022)
Python
39
star
51

KPAFlow

PyTorch implementation of KPA-Flow. Learning Optical Flow with Kernel Patch Attention (CVPR-2022)
Python
37
star
52

FullMatch

Official implementation of FullMatch (CVPR2023)
Python
37
star
53

TPS-CVPR2023

Python
37
star
54

HomoGAN

This is the official implementation of HomoGAN, CVPR2022
Python
35
star
55

PCB

Official code for CVPR 2022 paper "Relieving Long-tailed Instance Segmentation via Pairwise Class Balance".
Python
34
star
56

FST-Matching

Official implementation of the FST-Matching Model.
Python
33
star
57

US3L-CVPR2023

PyTorch implementation of US3L (Accepted to CVPR2023)
Python
32
star
58

basecls

A codebase & model zoo for pretrained backbone based on MegEngine.
Python
32
star
59

Sobolev_INRs

[ECCV 2022] The official experimental code of "Sobolev Training for Implicit Neural Representations with Approximated Image Derivatives"
Python
29
star
60

Portraits_Correction

Python
29
star
61

basedet

An object detection codebase based on MegEngine.
Python
27
star
62

Co-mining

Co-mining: Self-Supervised Learning for Sparsely Annotated Object Detection, AAAI 2021.
Python
26
star
63

zipfls

This repo is the official megengine implementation of the ECCV2022 paper: Efficient One Pass Self-distillation with Zipf's Label Smoothing.
Python
24
star
64

tf-cpn

Cascade Pyramid Netwrok
Python
24
star
65

Arch-Net

Arch-Net: Model Distillation for Architecture Agnostic Model Deployment
Python
22
star
66

IntLLaMA

IntLLaMA: A fast and light quantization solution for LLaMA
Python
21
star
67

juicefs-python

JuiceFS Python SDK
Python
18
star
68

ED-Net

PyTorch implementation of A Lightweight Encoder-Decoder Path for Deep Residual Networks.
Python
18
star
69

MSCL

[ECCV2022] Motion Sensitive Contrastive Learning for Self-supervised Video Representation
Python
16
star
70

hpargparse

argparse extension for hpman
Python
16
star
71

RG-SENet_SP-SENet

PyTorch implementation of Delving Deep into Spatial Pooling for Squeeze-and-Excitation Networks.
Python
16
star
72

LBHomo

This is the official PyTorch implementation of Semi-supervised Deep Large-baseline Homography Estimation with Progressive Equivalence Constraint, AAAI 2023
Python
14
star
73

MEMD

Megvii Electric Moped Detector (ONNX based inference)
Python
13
star
74

DVN

Python
12
star
75

Occ2net

Jupyter Notebook
12
star
76

revisitAIRL

[ECCV2022] Revisiting the Critical Factors of Augmentation-Invariant Representation Learning
Python
11
star
77

megengine-face-recognition

Python
9
star
78

SimpleDG

This is the training and test code for ECCV2022 workshop NICO challenge
Python
7
star
79

GeneGAN

Pytorch version of GeneGAN
Python
7
star
80

basecore

basecore is a simple repo that provides deep learning frame for MegEngine.
Python
7
star
81

hpnevergrad

A nevergrad extension for hpman
Python
4
star
82

.github

2
star
83

DRConv

Python
1
star