Gaussian RAM: Lightweight Image Classification via Stochastic Retina Inspired Glimpse and Reinforcement Learning
Official PyTorch implementation of Gaussian-RAM
Previous studies on image classification have been mainly focused on the performance of the networks, not onreal-time operation or model compression. We propose a Gaussian Deep Recurrent visual Attention Model (GDRAM)- a reinforcement learning based lightweight deep neural network for large scale image classification that outperformsthe conventional CNN (Convolutional Neural Network) which uses the entire image as input. Highly inspired by thebiological visual recognition process, our model mimics the stochastic location of the retina with Gaussian distribution. We evaluate the model on Large cluttered MNIST, Large CIFAR-10 and Large CIFAR-100 datasets which are resized to128 in both width and height.
Cluttered MNIST(download), CIFAR10 and CIFAR100 are used to train and evaluate. All the images are resized to 128 in both height and weight for generating high scale image.
- Python3
- PyTorch (> 1.0)
- torchvision (> 0.2)
- Pillow (> 5.0.0)
- NumPy
python train.py --data_path --dataset --batch_size --lr --epochs --random_seed --log_interval --resume --checkpoint
python inference.py --data_path --dataset --random_seed --fast