Giter Site home page Giter Site logo

s3n's Introduction

Selective Sparse Sampling for Fine-grained Image Recognition

Illustration

PyTorch Implementation

This repository contains:

  • the pytorch implementation of Selective Sparse Sampling.
  • the CUB-200-2011 demo (training, test).

Please follow the instruction below to install it and run the experiment demo.

Prerequisites

Installation

  1. Install S3N via Nest's CLI tool:

    # note that data will be saved under your current path
    $ git clone https://github.com/Yao-DD/S3N.git ./S3N
    $ nest module install ./S3N/ s3n
    # verify the installation
    $ nest module list --filter s3n

Prepare Data

  1. Download the CUB-200-2011 dataset:

    $ mkdir ./S3N/datasets
    $ cd ./S3N/datasets
    # download and extract data
    $ wget http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/CUB_200_2011.tgz
    $ tar xvf CUB_200_2011.tgz
  2. Prepare annotation files:

    Move the file ./datasets/train.txt and ./datasets/test.txt into ./datasets/CUB_200_2011. The list of image file names and label is contained in the file ./datasets/CUB_200_2011/train.txt and ./datasets/CUB_200_2011/test.txt, with each line corresponding to one image:

    <image_name> <class_id>  
    

Run the demo

  1. run the code as:

    $ cd ./S3N
    # run baseline
    $ PYTHONWARNINGS='ignore' CUDA_VISIBLE_DEVICES=0,1 nest task run ./demo/cub_baseline.yml
    # run S3N
    $ PYTHONWARNINGS='ignore' CUDA_VISIBLE_DEVICES=0,1 nest task run ./demo/cub_s3n.yml

Pretrained models

  1. S3N model for CUB_200_2011 dataset is availavble on Baidu Disk.

    The link:https://pan.baidu.com/s/19x9zI_ZNi32sRGRgNwN_Fw
    code: r252

CAUTION

The current code was prepared under the above-mentioned prerequisites. The use of other version can cause problems.

s3n's People

Contributors

ding1995 avatar yao-dd avatar

Watchers

 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.