GithubHelp home page GithubHelp logo

mahoori12 / and Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raymond-sci/and

0.0 0.0 0.0 1.14 MB

Official Pytorch Implementation for ICML'19 paper: Unsupervised Deep Learning by Neighbourhood Discovery

Home Page: https://raymond-sci.github.io/projects/huang2019and

Python 100.00%

and's Introduction

AND: Anchor Neighbourhood Discovery

Accepted by 36th International Conference on Machine Learning (ICML 2019).

Pytorch implementation of Unsupervised Deep Learning by Neighbourhood Discovery.

Highlight

  • We propose the idea of exploiting local neighbourhoods for unsupervised deep learning. This strategy preserves the capability of clustering for class boundary inference whilst minimising the negative impact of class inconsistency typically encountered in clusters.
  • We formulate an Anchor Neighbourhood Discovery (AND) approach to progressive unsupervised deep learning. The AND model not only generalises the idea of sample specificity learning, but also additionally considers the originally missing sample-to-sample correlation during model learning by a novel neighbourhood supervision design.
  • We further introduce a curriculum learning algorithm to gradually perform neighbourhood discovery for maximising the class consistency of neighbourhoods therefore enhancing the unsupervised learning capability.

Main results

The proposed AND model was evaluated on four object image classification datasets including CIFAR 10/100, SVHN and ImageNet12. Results are shown at the following tables:

Reproduction

Requirements

Python 2.7 and Pytorch 1.0 are required. Please refer to /path/to/AND/requirements.yaml for other necessary modules. Conda environment we used for the experiments can also be rebuilt according to it.

Usages

  1. Clone this repo: git clone https://github.com/Raymond-sci/AND.git
  2. Download datasets and store them in /path/to/AND/data. (Soft link is recommended to avoid redundant copies of datasets)
  3. To reproduce our reported result of ResNet18 on CIFAR10, please use the following command:python main.py --cfgs configs/base.yaml configs/cifar10.yaml
  4. Running on GPUs: code will be run on CPU by default, use this flag to specify the gpu devices which you want to use
  5. To evaluate trained models, use --resume to set the path of the generated checkpoint file and use --test-only flag to exit the program after evaluation

Every time the main.py is run, a new session will be started with the name of current timestamp and all the related files will be stored in folder sessions/timestamp/ including checkpoints, logs, etc.

Pre-trained model

To play with the pre-trained model, please go to ResNet18 / AlexNet. A few things need to be noticed:

  • The model is saved in pytorch format
  • It expects RGB images that their pixel values are normalised with the following mean RGB values mean=[0.485, 0.456, 0.406] and std RGB values std=[0.229, 0.224, 0.225]. Prior to normalisation the range of the image values must be [0.0, 1.0].

License

This project is licensed under the MIT License. You may find out more here.

Reference

If you use this code, please cite the following paper:

Jiabo Huang, Qi Dong, Shaogang Gong and Xiatian Zhu. "Unsupervised Deep Learning by Neighbourhood Discovery." Proc. ICML (2019).

@InProceedings{huang2018and,
  title={Unsupervised Deep Learning by Neighbourhood Discovery},
  author={Jiabo Huang, Qi Dong, Shaogang Gong and Xiatian Zhu},
  booktitle={Proceedings of the International Conference on machine learning (ICML)},
  year={2019},
}

and's People

Contributors

raymond-sci 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.