• Stars
    star
    155
  • Rank 239,420 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated about 3 years ago

Reviews

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

Repository Details

FACT

This repo provides a demo for the CVPR 2021 paper "A Fourier-based Framework for Domain Generalization" on the PACS dataset.

To cite, please use:

@InProceedings{Xu_2021_CVPR,
    author    = {Xu, Qinwei and Zhang, Ruipeng and Zhang, Ya and Wang, Yanfeng and Tian, Qi},
    title     = {A Fourier-Based Framework for Domain Generalization},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2021},
    pages     = {14383-14392}
}

Requirements

  • Python 3.6
  • Pytorch 1.1.0

Evaluation

Firstly create directory ckpt/ and drag your model under it. For running the evaluation code, please download the PACS dataset from http://www.eecs.qmul.ac.uk/~dl307/project_iccv2017. Then update the files with suffix _test.txt in data/datalists for each domain, following styles below:

/home/user/data/images/PACS/kfold/art_painting/dog/pic_001.jpg 0
/home/user/data/images/PACS/kfold/art_painting/dog/pic_002.jpg 0
/home/user/data/images/PACS/kfold/art_painting/dog/pic_003.jpg 0
...

Once the data is prepared, remember to update the path of test files and output logs in shell_test.py:

input_dir = 'path/to/test/files'
output_dir = 'path/to/output/logs'

then simply run:

 python shell_test.py -d=art_painting

You can use the argument -d to specify the held-out target domain.

Training from scratch

After downloading the dataset, update the files with suffix _train.txt and _val.txt in data/datalists for each domain, following the same styles as the test files above. Please make sure you are using the official train-val-split. Then update the the path of train&val files and output logs in shell_train.py:

input_dir = 'path/to/train/files'
output_dir = 'path/to/output/logs'

Then running the code:

python shell_train.py -d=art_painting

Use the argument -d to specify the held-out target domain.

Acknowledgement

Part of our code is borrowed from the following repositories.

  • JigenDG: "Domain Generalization by Solving Jigsaw Puzzles", CVPR 2019
  • DDAIG: "Deep Domain-Adversarial Image Generation for Domain Generalisation", AAAI 2020

We thank to the authors for releasing their codes. Please also consider citing their works.

More Repositories

1

MING

明医 (MING):中文医疗问诊大模型
Python
812
star
2

RegAD

[ECCV2022 Oral] Registration based Few-Shot Anomaly Detection
Python
257
star
3

Where2comm

Python
139
star
4

MedKLIP

The official code for MedKLIP: Medical Knowledge Enhanced Language-Image Pre-Training in Radiology. We propose to leverage medical specific knowledge enhancing language-image pre-training method, significantly advancing the ability of pre-trained models to handle unseen diseases on zero-shot classification and grounding tasks.
Python
134
star
5

LED

[CVPR2023] Leapfrog Diffusion Model for Stochastic Trajectory Prediction
Jupyter Notebook
130
star
6

MemoNet

[CVPR2022] Remember Intentions: Retrospective-Memory-based Trajectory Prediction
Python
118
star
7

EqMotion

[CVPR2023] EqMotion: Equivariant Multi-agent Motion Prediction with Invariant Interaction Reasoning
Python
112
star
8

BCL

[ICML2022] Contrastive Learning with Boosted Memorization
Python
110
star
9

GroupNet

[CVPR22] GroupNet: Multiscale Hypergraph Neural Networks for Trajectory Prediction with Relational Reasoning
Python
108
star
10

MVFA-AD

[CVPR2024 Highlight] Adapting Visual-Language Models for Generalizable Anomaly Detection in Medical Images
Python
106
star
11

TBP-Former

78
star
12

CoCa3D

Python
70
star
13

GenMedicalEval

69
star
14

CoBEVFlow

[NeurIPS 2023] Asynchrony-Robust Collaborative Perception via Bird’s Eye View Flow
Python
65
star
15

FedDisco

Python
60
star
16

RECORDS-LTPLL

[ICLR 2023] PyTorch implementation for "Long-Tailed Partial Label Learning via Dynamic Rebalancing"
Python
54
star
17

FedDG-GA

[CVPR 2023] Federated Domain Generalization with Generalization Adjustment
Python
37
star
18

SyncNet

[ECCV2022] Latency-Aware Collaborative Perception
Python
33
star
19

SPGSN

The source codes of 'Skeleton-parted graph scattering networks for 3D human motion prediction'. ECCV 2022
Python
29
star
20

AuxFormer

[ICCV2023] Auxiliary Tasks Benefit 3D Skeleton-based Human Motion Prediction
Python
25
star
21

pFedGraph

Python
23
star
22

BE-SSL

Codes for our paper "Boundary-Enhanced Self-Supervised Learningfor Brain Structure Segmentation"
Python
23
star
23

JRTransformer

[ICCV2023] Joint-Relation Transformer for Multi-Person Motion Prediction
Python
22
star
24

Geometric-Harmonization

[NeurIPS 2023 Spotlight] Combating Representation Learning Disparity with Geometric Harmonization
Python
19
star
25

Collaborative-Uncertainty

Python
19
star
26

GPFL-GRACE

[MICCAI 2023] GRACE: Enhancing Federated Learning for Medical Imaging with Generalized and Personalized Gradient Correction
Python
15
star
27

ECGAD

[MICCAI2023 Early Accept] Multi-scale Cross-restoration Framework for Electrocardiogram Anomaly Detection
Python
15
star
28

LoRKD

Python
12
star
29

K-Diag

Python
10
star
30

MoLA

Python
10
star
31

CoFormer

Python
10
star
32

FedGELA

[NeurIPS 2023]Federated Learning with Bilateral Curation for Partially Class-Disjoint Data
Python
10
star
33

FedLESAM

[ICML 2024 spotlight] This repository contains the implementation details for the paper "Locally Estimated Global Perturbations are Better than Local Perturbations for Federated Sharpness-aware Minimization"
Python
9
star
34

FedSkip

FedSkip-Combatting-Statistical-Heterogeneity-with-Federated-Skip-Aggregation official code
Python
7
star
35

OC_LT

Official code base for "Long-Tailed Diffusion Models With Oriented Calibration" ICLR2024
Python
6
star
36

DISAM

This repository contains the implementation details for the paper "Domain-Inspired Sharpness-Aware Minimization Under Domain Shifts," accepted at the ICLR 2024.
Python
6
star
37

CaT

[ICCV2021] CaT: Weakly Supervised Object Detection with Category Transfer
5
star
38

ECISQA

[NeurIPS 2023] Emergent communication in interactive sketch question answering
Jupyter Notebook
5
star
39

FedMR

[TMLR 2023]Federated Learning under Partially Class-Disjoint Data via Manifold Reshaping
Python
4
star
40

GSC

Python
4
star
41

SSM

[TMM 2022] Self-Supervised Masking for Unsupervised Anomaly Detection and Localization
Python
4
star
42

FreeAlign

Python
3
star
43

ITES

Python
1
star
44

NMMP

Python
1
star
45

mediabrain-sjtu.github.io

TeX
1
star