Code Monkey home page Code Monkey logo

sacod's Introduction

SACoD: Sensor Algorithm Co-Design Towards Efficient CNN-powered Intelligent PhlatCam

Yonggan Fu, Yang Zhang, Yue Wang, Zhihan Lu, Vivek Boominathan, Ashok Veeraraghavan, Yingyan Lin

Accepted at ICCV 2021 [Paper Link].

Overview

There has been a booming demand for integrating Convolutional Neural Networks (CNNs) powered functionalities into Internet-of-Thing (IoT) devices to enable ubiquitous intelligent "IoT cameras". This work proposes SACoD, a Sensor Algorithm Co-Design framework to develop more efficient CNN-powered PhlatCam. In particular, the mask coded in the PhlatCam sensor and the backend CNN model are jointly optimized in terms of both model parameters and architectures via differential neural architecture search. Extensive experiments including both simulation and physical measurement on manufactured masks show that the proposed SACoD framework achieves aggressive model compression and energy savings while maintaining or even boosting the task accuracy.

Method

We co-optimize the phase mask, network architecture, and model weights via a differentiable search process:

More details and illustrations can be found in our paper.

Results

Evaluation on CIFAR-10/100

The trade-off between accuracy and FLOPs/energy:

Visual Quality on Unpaired Image Translation Tasks

Benchmark the visual quality of different imaging systems:

Visualization of Fabricated Masks

Visualization of the physically fabricated masks and the corresponding Point Spread Functions (PSFs):

Code Usage

A two-stage process is needed to generate the final imaging system, i.e., the search and training stage. The corresponding settings are specified in config_search.py and config_train.py, respectively. Users should modify the settings like dataset / data path in these two config files according to the demands.

Prerequisites

See env.yml for the complete conda environment. Create a new conda environment:

conda env create -f env.yml
conda activate pytorch

Search

To search for an optimal sensor/network for CIFAR-10/CIFAR-100, modify the dataset and trained_mask (whether to start from a pre-defined mask) fields in config_search.py and run:

python train_search.py

Train

To train the sensor/network obtained from the search stage, modify the dataset, trained_mask, and load_path fields in config_train.py and run:

python train.py

Baselines

To search/train a network with gabor mask, go to the gabor folder, and modify config_search.py and config_train.py accordingly and run python train_search.py to search for gabor-mask-based model or run python train.py to train the searched system.

To co-train a mask and a fixed network, go to the "co-train" folder, and run python main.py [args...]. In the arguments, you can specify the number of masks to use and the dataset to use.

Pretrained Models

The pretrained models for CIFAR-10/CIFAR-100 (with the highest accuracy) are provided in the pretrained directory.

Citation

@inproceedings{fu2021sacod,
  title={SACoD: Sensor Algorithm Co-Design Towards Efficient CNN-powered Intelligent PhlatCam},
  author={Fu, Yonggan and Zhang, Yang and Wang, Yue and Lu, Zhihan and Boominathan, Vivek and Veeraraghavan, Ashok and Lin, Yingyan},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={5168--5177},
  year={2021}
}

sacod's People

Contributors

tilmto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sacod's Issues

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.