Giter Club home page Giter Club logo

cvpr2018-hnd's Introduction

Introduction

This repository implements Lee et al., Hierarchical Novelty Detection for Visual Object Recognition, CVPR 2018 in PyTorch.

@inproceedings{lee2018hierarchical,
  title={Hierarchical Novelty Detection for Visual Object Recognition},
  author={Lee, Kibok and Lee, Kimin and Min, Kyle and Zhang, Yuting and Shin, Jinwoo and Lee, Honglak},
  booktitle={CVPR},
  year={2018}
}

Dependencies

Data

You may download either raw images or ResNet-101 features. If you download ResNet-101 features, place them in datasets/{dataset}/. ({dataset} = ImageNet, AWA2, CUB)

ImageNet

  • Raw images
    • Move ILSVRC 2012 train to datasets/ImageNet/train/.
      • e.g., an image should be found in datasets/ImageNet/train/n01440764/n01440764_18.JPEG.
    • Move ILSVRC 2012 val to datasets/ImageNet/known/.
      • ILSVRC 2012 validation dataset is not sorted. You can move validation images to labeled subfolders using [this script].
    • Move ImageNet Fall 2011 to datasets/ImageNet/novel/.
  • ResNet-101 features [train] [val] [known] [novel]

AWA, CUB

WordNet

You do not have to download the files, but we provide the source of them for your reference.

Preparation

Taxonomy

Run sh scripts/preparation.sh {d}. ({d} = imagenet_full, imagenet, awa2, cub)

  • {d} = imagenet_full if you have raw images
  • {d} = imagenet if you have ResNet-101 features

Output files are in taxonomy/{dataset}/.

You can download pre-built taxonomies [here].

Feature extraction (ImageNet) or conversion (AWA, CUB)

Run sh scripts/feature.sh {d}. ({d} = imagenet, awa2, cub)

Output files are in datasets/{dataset}/.

If you have ResNet-101 features for ImageNet, skip this.

Train, test

Run sh scripts/train.sh {d} {m}. ({d} = imagenet, awa2, cub, {m} = relabel, td, loo, td+loo)

Output files are in train/.

You can download models reported in the paper [here].

Note

  • The code keeps all random numbers and final models. For new experiment, you may remove the following if exist:
datasets/{dataset}/balanced_order_{:d}.h5
datasets/{dataset}/relabels_{:d}.h5
train/
  • The code can produce results in hierarchical measures. To see them, build the taxonomy with additional argument, e.g., python build_taxonomy.py ImageNet detailed

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.