Git Product home page Git Product logo

ecb's Introduction

Learning CNN on ViT: A Hybrid Model to Explicitly Class-specific Boundaries for Domain Adaptation

This repository contains the code of the ECB method for Classification in Domain Adaptation.

Ba-Hung Ngo*, Nhat-Tuong Do-Tran*, Tuan-Ngoc Nguyen, Hae-Gon Jeon and Tae Jong Choi†
Accepted In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2024).

Paper | Suppl | arxiv | Project Page | Youtube |

Proposed Method



  • Supervised Training: We train both ViT and CNN branches on labeled samples.
  • Finding To Conquering Strategy (FTC): We find class-specific boundaries based on the fixed ViT Encoder E1 by maximizing discrepancy between the Classifier F1 and F2. Subsequently, the CNN Encoder E2 clusters the target features based on those class-specific boundaris by minimizing discrepancy.

Prepare

Dataset

Please follow the instructions in https://github.com/dotrannhattuong/ECB/dataset/DATASET.md to download datasets.

Installation

conda env create -f environment.yml

Training

  • The train.yaml is the config file for training our method. You can change the arguments to train Semi-Supervised Domain Adaptation (SSDA) or Unsupervised Domain Adaptation (UDA).
python train.py --cfg configs/train.yaml

Evaluation

  • If you need evaluate the test dataset with our pretrained model. You need to download these checkpoint.
sh download_pretrain.sh
python test.py --cfg configs/test.yaml

Visualization

  • The visualization compares features from two networks (CNN, ViT) for the real --> sketch on the DomainNet dataset in the 3-shot scenario, before and after adaptation with the FTC strategy.


  • The visualization in a few samples using GRAD-CAM technique to show to performance for CNN and ViT when applying ECB method.

Citation

@inproceedings{,
  title={Learning CNN on ViT: A Hybrid Model to Explicitly Class-specific Boundaries for Domain Adaptation},
  author={},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2024}
}

ecb's People

Contributors

dotrannhattuong avatar

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.