Official code for the paper: Deep Graph Matching under Quadratic Constraint (CVPR 2021)

Related tags

Deep Learning QC-DGM
Overview

QC-DGM

This is the official PyTorch implementation and models for our CVPR 2021 paper: Deep Graph Matching under Quadratic Constraint.

It also contains the configuration files to reproduce the results of qc-DGM_1 reported in the paper on Pascal VOC Keypoint and Willow Object Class dataset.

Get started

  1. pytorch (GPU version) >= 1.1
  2. ninja-build: apt-get install ninja-build
  3. python packages: pip install tensorboardX scipy easydict pyyaml
  4. Download dataset:
    1. Pascal VOC Keypoint:
    • Download and tar VOC2011 keypoints, and the path looks like: ./data/PascalVOC/VOC2011.
    • Download and tar Berkeley annotation, and the path looks like: ./data/PascalVOC/annotations.
    • The train/test split of Pascal VOC Keypoint is available in: ./data/PascalVOC/voc2011_pairs.npz.
    1. Willow Object Class dataset:

Training

  1. Run training and evaluation on Pascal VOC Keypoint:

    python train_eval.py --cfg ./experiments/QCDGM_voc.yaml

    or you could replace the default ./experiments/QCDGM_voc.yaml with path to your own configuration file.

  2. Run training and evaluation on Willow Object Class dataset:

    python train_eval.py --cfg ./experiments/QCDGM_willow.yaml

    or you could replace the default ./experiments/QCDGM_willow.yaml with path to your own configuration file.

Evaluation

  1. Run evaluation on Pascal VOC Keypoint on epoch k:

    python eval.py --cfg ./experiments/QCDGM_voc.yaml --epoch k

    or you could replace the default ./experiments/QCDGM_voc.yaml with path to your own configuration file.

  2. Run evaluation on Willow Object Class dataset on epoch k:

    python eval.py --cfg ./experiments/QCDGM_willow.yaml --epoch k

    or you could replace the default ./experiments/QCDGM_voc.yaml with path to your own configuration file.

Results

We report the performance on Pascal VOC Keypoint and Willow Object Class datasets.

Pascal VOC Keypoint

method aero bike bird boat bottle bus car cat chair cow table dog horse mbike person plant sheep sofa train tv mean
qc-DGM 48.4 61.6 65.3 61.3 82.4 79.6 74.3 72.0 41.8 68.8 65.0 66.1 70.9 69.6 48.2 92.1 69.0 66.7 90.4 91.8 69.3

Willow Object Class

method face m-bike car duck wbottle mean
qc-DGM 100.0 95.0 93.8 93.8 97.6 96.0

Citation

@InProceedings{Gao_2021_CVPR,
author = {Gao, Quankai and Wang, Fudong and Xue, Nan and Yu, Jin-Gang and Xia, Gui-Song},
title = {Deep Graph Matching under Quadratic Constraint},
booktitle = {Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR)},
year = {2021}
}
You might also like...
ISBI 2022: Cross-level Contrastive Learning and Consistency Constraint for Semi-supervised Medical Image.
ISBI 2022: Cross-level Contrastive Learning and Consistency Constraint for Semi-supervised Medical Image.

Cross-level Contrastive Learning and Consistency Constraint for Semi-supervised Medical Image Introduction This repository contains the PyTorch implem

Reusable constraint types to use with typing.Annotated

annotated-types PEP-593 added typing.Annotated as a way of adding context-specific metadata to existing types, and specifies that Annotated[T, x] shou

Constraint-based geometry sketcher for blender
Constraint-based geometry sketcher for blender

Constraint-based sketcher addon for Blender that allows to create precise 2d shapes by defining a set of geometric constraints like tangent, distance,

Official repository for the CVPR 2021 paper "Learning Feature Aggregation for Deep 3D Morphable Models"

Deep3DMM Official repository for the CVPR 2021 paper Learning Feature Aggregation for Deep 3D Morphable Models. Requirements This code is tested on Py

Lipstick ain't enough: Beyond Color-Matching for In-the-Wild Makeup Transfer (CVPR 2021)
Lipstick ain't enough: Beyond Color-Matching for In-the-Wild Makeup Transfer (CVPR 2021)

Table of Content Introduction Datasets Getting Started Requirements Usage Example Training & Evaluation CPM: Color-Pattern Makeup Transfer CPM is a ho

LoFTR:Detector-Free Local Feature Matching with Transformers CVPR 2021

LoFTR-with-train-script LoFTR:Detector-Free Local Feature Matching with Transformers CVPR 2021 (with train script --- unofficial ---). About Megadepth

Official PyTorch code for CVPR 2020 paper
Official PyTorch code for CVPR 2020 paper "Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision"

Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision https://arxiv.org/abs/2003.00393 Abstract Active learning (AL) aims to min

Awesome Deep Graph Clustering is a collection of SOTA, novel deep graph clustering methods

ADGC: Awesome Deep Graph Clustering ADGC is a collection of state-of-the-art (SOTA), novel deep graph clustering methods (papers, codes and datasets).

git git《Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking》(CVPR 2021) GitHub:git2] 《Masksembles for Uncertainty Estimation》(CVPR 2021) GitHub:git3]
git git《Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking》(CVPR 2021) GitHub:git2] 《Masksembles for Uncertainty Estimation》(CVPR 2021) GitHub:git3]

Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking Ning Wang, Wengang Zhou, Jie Wang, and Houqiang Li Accepted by CVPR

Comments
  • AttributeError: 'EasyDict' object has no attribute 'PCA

    AttributeError: 'EasyDict' object has no attribute 'PCA

    Hi! When I run the codes, it says AttributeError: 'EasyDict' object has no attribute 'PCA.

    Traceback (most recent call last):
      File "eval.py", line 138, in <module>
        model = Net()
      File "/Ship03/Sources/FeatureMatching/QC-DGM/QCDGM/model.py", line 48, in __init__
        self.add_module('cross_graph_{}'.format(i), nn.Linear(cfg.PCA.GNN_FEAT * 2 + 4, cfg.PCA.GNN_FEAT + 2))
    AttributeError: 'EasyDict' object has no attribute 'PCA
    
    opened by xmlyqing00 10
  • No file voc2011_pairs.npz

    No file voc2011_pairs.npz

    Hi,

    Nice project. I tried to run the eval.py on PASCAL VOC dataset, but I can't find the train/eval split file voc2011_pairs.npz. Could you help me figure it out? Thanks.

    Best

    opened by xmlyqing00 3
  • In the data_loader.py Line#17 might cause some errors.

    In the data_loader.py Line#17 might cause some errors.

    https://github.com/Zerg-Overmind/QC-DGM/blob/970fcb4330aa2d7da6ebde4fdaf90e0151ac5f60/data/data_loader.py#L17

    data_loader.py Line#17 def init(self, name, length, cls=None, **args): "cls" is a default inner parameter like "max, min". In python 3.7, there is a confusing problem: TypeError: new() got multiple values for argument 'cls' Just change the cls to another word in this .py file, e.g. following, could be fine.

    def __init__(self, name, length, cls_name=None, **args): and Line#24 also should rename:

    self.cls = None if cls_name == 'none' else cls_name

    Sincerely thank the authors for the open source work.

    opened by siaoliu 1
  • Questions about evaluation details

    Questions about evaluation details

    Hi,

    Thank you for providing the training and evaluation codes. In the evaluation part, you solve the quadratic constraint (Eqn 7) to get the optimal assignment. In your code, the QC-optimization starts from line 128 in QCDGM/model.py. The quadratic constraints are AA_src and BB_tgt

    After that, I think the assignment is stored in the variable s (or X? I'm confused here, I think it should be X but you return s instead) and it is returned to eval.py as s_pred.

    You do a Hungarian algorithm here (eval.py line 81) to discrete the values. That makes sense. But I can't follow the following several lines. You do the qc_opt again with constraints A_src and A_tgt, which represents edge connections. Why do you need to do it as "post-processing"? In your training codes, I don't see such post-processing there.

    Thanks for your time.

    opened by xmlyqing00 0
Owner
Quankai Gao
(*^▽^*)
Quankai Gao
Official code for our CVPR '22 paper "Dataset Distillation by Matching Training Trajectories"

Dataset Distillation by Matching Training Trajectories Project Page | Paper This repo contains code for training expert trajectories and distilling sy

George Cazenavette 256 Jan 5, 2023
the code for our CVPR 2021 paper Bilateral Grid Learning for Stereo Matching Network [BGNet]

BGNet This repository contains the code for our CVPR 2021 paper Bilateral Grid Learning for Stereo Matching Network [BGNet] Environment Python 3.6.* C

3DCV developer 87 Nov 29, 2022
Official PyTorch Implementation of Convolutional Hough Matching Networks, CVPR 2021 (oral)

Convolutional Hough Matching Networks This is the implementation of the paper "Convolutional Hough Matching Network" by J. Min and M. Cho. Implemented

Juhong Min 70 Nov 22, 2022
Code for "LoFTR: Detector-Free Local Feature Matching with Transformers", CVPR 2021

LoFTR: Detector-Free Local Feature Matching with Transformers Project Page | Paper LoFTR: Detector-Free Local Feature Matching with Transformers Jiami

ZJU3DV 1.4k Jan 4, 2023
Regularizing Generative Adversarial Networks under Limited Data (CVPR 2021)

Regularizing Generative Adversarial Networks under Limited Data [Project Page][Paper] Implementation for our GAN regularization method. The proposed r

Google 148 Nov 18, 2022
Pytorch implementation for "Adversarial Robustness under Long-Tailed Distribution" (CVPR 2021 Oral)

Adversarial Long-Tail This repository contains the PyTorch implementation of the paper: Adversarial Robustness under Long-Tailed Distribution, CVPR 20

Tong WU 89 Dec 15, 2022
A Python implementation of the Locality Preserving Matching (LPM) method for pruning outliers in image matching.

LPM_Python A Python implementation of the Locality Preserving Matching (LPM) method for pruning outliers in image matching. The code is established ac

AoxiangFan 11 Nov 7, 2022
Official source code to CVPR'20 paper, "When2com: Multi-Agent Perception via Communication Graph Grouping"

When2com: Multi-Agent Perception via Communication Graph Grouping This is the PyTorch implementation of our paper: When2com: Multi-Agent Perception vi

null 34 Nov 9, 2022
Combining Reinforcement Learning and Constraint Programming for Combinatorial Optimization

Hybrid solving process for combinatorial optimization problems Combinatorial optimization has found applications in numerous fields, from aerospace to

null 117 Dec 13, 2022
Robot Reinforcement Learning on the Constraint Manifold

Implementation of "Robot Reinforcement Learning on the Constraint Manifold"

null 31 Dec 5, 2022