Skip to content

hybrid optical electronic convolutional neural networks

License

Notifications You must be signed in to change notification settings

jameclear/opticalCNN

 
 

Repository files navigation

opticalCNN

Under preparation...

Our code was run with Python 3.5.5 and Tensorflow 1.9.0

Example to optimize a single-layer optical correlator for QuickDraw-16:

  1. Download quickdraw-16 training dataset (see below) into assets folder
  2. onn_quickdraw-16-tiled.py: optimizes a single-layer tiled kernel PSF model for the quickdraw-16 dataset
  3. Walk through ONNMaskOpt.ipynb until the "Visualization of phase mask optimization" section. You can use the saved checkpoint folder we link below, or the checkpoint from running onn_quickdraw-16-tiled.py
  4. onn_maskopt.py: optimizes a phase mask to correspond to a pre-computed PSF. You can use the sample psf in the assets folder or use the one you save from the ONNMaskOpt.ipynb walkthrough
  5. Walk through ONNMaskOpt.ipynb from "Visualization of phase mask optimization" and plug in the checkpoint from onn_maskopt.py.

Other code:

  • jupyter notebooks are useful for visualization, but in the current state they rely on files that may not be added yet
  • other scripts are added, but they are not completely demo-ready
  • the core code for hybrid two-layer networks have "hybrid" in the filename

Downloads:

Additional code used to interface with prototype hardware is available upon request.

Paper

Title: Hybrid optical-electronic convolutional neural networks with optimized diffractive optics for image classification

Authors: Julie Chang*, Vincent Sitzmann, Xiong Dun, Wolfgang Heidrich, and Gordon Wetzstein*

*Correspondence to: {jchang10, gordon.wetzstein}@stanford.edu

Link to our paper

Website

Link to our project page: http://www.computationalimaging.org/publications/hybrid-optical-electronic-convolutional-neural-networks/

Data

The original images used in all experiments were downloaded directly from MNIST, CIFAR-10, or Google QuickDraw source websites. The If you are interested in the CIFAR-10 dataset captured by our prototype, please send us an email.

About

hybrid optical electronic convolutional neural networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 90.6%
  • Python 9.4%