Giter Club home page Giter Club logo

super-pixels's Introduction

Superpixels

In this work, we demonstrate that infusing domain knowledge in the form of superpixels-based radial graph improves the predictive performance of CNN-based classifiers. We would love to know about any issues found on this repository. Please create an issue for any queries, or contact us at [email protected].

Pre-print

Abstract

Paper Abstract

Updates

  • [18 May 2021]: Repository is made public.

Directory Structure

You can find the structure of the repository (i.e., the sub-directories and files) here.

Usage

Quick Colab Guide

Colab Notebook

Setting Up

Clone the repository.

git clone https://github.com/abheesht17/super-pixels.git
cd super-pixels

Install the requirements.

make requirements

At times, especially on Colab, the above command fails. It is preferable that you run the following:

pip3 install --upgrade -r requirements.txt --find-links https://pytorch-geometric.com/whl/torch-1.8.0+cu101.html --find-links https://download.pytorch.org/whl/torch_stable.html

Note: Find the CUDA version and install accordingly.

Datasets

All the datasets are available on Google Drive.

List of available datasets:

Grid Search

For all models and datasets, the configs are present in the configs/custom_trainer directory. Choose a config according to the model and the dataset you want to run. For example, to do a Grid Search on the CNN+GAT model using the LFW dataset, you have to run the following command:

python train.py --config_dir ./configs/custom_trainer/graph_image/hybrid/cnn_gat_lfw --grid_search --validation

Currently, we guarantee that the "cnn" and "cnn_gat" models are in working condition. The rest have to be checked.

This will save the logs and the final model at the path specified in the logs parameter. The default is the logs/<model_dataset_name> folder.

Note: Performing Grid Search is not necessary. The default hyperparameters specified in the configs are the ones obtained after performing Grid Search; one can directly run the training and inference command given in the next subsection.

Training and Inference

python train.py --config_dir ./configs/custom_trainer/graph_image/hybrid/cnn_gat_lfw

Tasks

  • Add Usage.
  • Add Citation(s).
  • Update README.md.
  • Add Directory Structure.

Results and Analysis

Results on Standard Datasets

Dataset CNN CNN+GNN
MNIST 99.30% 99.21%
FMNIST 91.65% 91.50%
CIFAR-10 77.80% 76.81%
CIFAR-100 42.88% 46.79%

Results on Domain-Specific Datasets

Dataset CNN CNN+GNN
COVID 89.09% 91.01%
LFW 60.83% 66.12%
SOCOFing 65.68% 93.58%

Citation

Our paper is under review at ESANN 2021.

You can cite our work as:

@misc{chhablani2021superpixelbased,
      title={Superpixel-based Domain-Knowledge Infusion in Computer Vision}, 
      author={Gunjan Chhablani and Abheesht Sharma and Harshit Pandey and Tirtharaj Dash},
      year={2021},
      eprint={2105.09448},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

If you use any part of our code in your work, please use the following citation:

@misc{sharma2021superpixelsgithub,
  author = {Abheesht Sharma and Gunjan Chhablani and Harshit Pandey and Tirtharaj Dash},
  title = {abheesht17/super-pixels},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/abheesht17/super-pixels}},
}

super-pixels's People

Contributors

gchhablani avatar harsh4799 avatar abheesht17 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.