SPI-GAN: Towards Single-Pixel Imaging through Generative Adversarial Network

Nazmul Karim, Nazanin RahnavardarXiv 2021

TL;DR

SPI-GAN introduces a Generative Adversarial Network (GAN) framework to single-pixel imaging, enabling high-quality image and video reconstruction at extremely low sampling ratios (down to 5%). By combining a ResNet-based generator with a multi-component loss function (MSE, perceptual, and adversarial), it significantly outperforms existing methods in both reconstruction fidelity and generalization to unseen data.

What Problem Does This Paper Address?

Single-pixel imaging (SPI) is a powerful technique that captures images using a single detector instead of a massive pixel array. By using a spatial light modulator (SLM) to project varying light patterns onto a scene, SPI offers a low-cost, highly efficient alternative for imaging outside the visible spectrum (such as infrared or terahertz imaging).

However, SPI faces a major bottleneck: to reconstruct a sharp image, you traditionally need to project a massive number of light patterns, which drastically increases acquisition time. Traditional iterative reconstruction algorithms are far too slow for real-time applications like video. While recent deep learning approaches have attempted to speed things up, they suffer from poor generalization to unseen objects and tend to produce blurry results because they rely solely on Mean Squared Error (MSE) loss functions.

Methods

SPI-GAN addresses these limitations by splitting the reconstruction task into a fast mathematical initialization followed by a deep learning refinement stage:

  1. Fast Initial Guess ($\ell_2$-norm Recovery): Instead of trying to map raw 1D measurements directly to a 2D image using slow iterative methods, the authors use a fast, non-iterative $\ell_2$-norm linear recovery method. This yields a rough, highly noisy initial image ($\hat{x}_{noisy}$) almost instantly.
  2. ResNet-Based Generator: This noisy image is fed into a deep generator network featuring 17 convolution blocks, 14 of which are residual blocks (ResNet-like architecture). The residual connections help preserve gradient flow, allowing the network to learn robust feature representations without suffering from vanishing gradients.
  3. VGG-Like Discriminator: A discriminator network based on the VGG architecture evaluates the generator's output against the ground truth, driving the adversarial training process.
  4. Multi-Component Loss Function: To prevent the blurriness typical of standard deep learning models, the authors optimize the generator using a weighted combination of three losses:
  5. Pixel-wise MSE Loss: Ensures basic structural layout alignment.
  6. Perceptual Similarity Loss: Extracted from a pre-trained VGG19 network (layer 11) to force the model to prioritize high-frequency textures and sharp edges.
  7. Adversarial Loss: Pushes the network to generate realistic images that lie on the natural image manifold.
Fig. 2. Our proposed SPI-GAN framework mainly consists of a generator that takes the noisy ℓ2-norm solution (ˆxnoisy) and produce a clear reconstruction (ˆx) that is comparable to x. On the other hand, a discriminator learns to differentiate between x and ˆx in an attempt to not to be fooled by the generator.
Fig. 3. Top: The generator network employs a ResNet-like architecture to produce the desired reconstruction. We use convolution layers with different kernel sizes and parametric ReLU activation to extract important features from the input. Bottom: Discriminator network uses a VGG-like architecture [70] that gradually increases the number of filters with pooling layers. Last convolution output goes to the fully connected layer followed by the sigmoid activation. At the end, a binary cross entropy loss function is optimized to discriminate between original image and the reconstructed image.

Datasets

  • STL-10: A large public dataset containing natural images. The authors used 45,000 unlabeled images, converted them to grayscale, and resized them to $64 \times 64$ pixels for training and validation.
  • Generalization Benchmarks: To rigorously test the model's ability to handle completely unseen data, it was evaluated on 6 distinct datasets: CBSD68, Mandrill, Urban-100, Set14, SunHays-80, and BSDS300.
  • UCF101: An action recognition video dataset used to benchmark single-pixel video reconstruction performance (500 clips for training, 50 for validation).

Key Insights and Ideas

  • Bypassing the Spatial Correlation Bottleneck: Many prior deep learning methods used fully connected networks to map 1D measurements to 2D space, which destroys spatial context and hurts generalization. By applying a fast analytical $\ell_2$-norm step first, SPI-GAN allows the convolutional layers to act as an advanced spatial denoiser and refiner.
  • The Power of Perceptual Loss: Relying purely on pixel-level MSE forces a network to average out all possible valid solutions, resulting in a blurry image. Incorporating feature-level perceptual loss from a pre-trained VGG network ensures the model captures fine details that matter to human perception.
  • Zero-Shot Generalization: Because the ResNet architecture learns fundamental structural features rather than just memorizing the training set, the model generalizes remarkably well to entirely different image distributions (e.g., moving from natural objects to urban architecture).

Key Results

  • Superior Low-Sampling Performance: Even at a tiny 5% sampling ratio, SPI-GAN achieves a Peak Signal-to-Noise Ratio (PSNR) of 17.92 dB and a Structural Similarity Index (SSIM) of 0.487. At a 20% sampling ratio, it reaches 21.11 dB PSNR, outperforming the previous state-of-the-art deep learning method (Deepghost) by nearly 3 dB.
  • Real-Time Video Rates: SPI-GAN boasts an incredibly fast reconstruction time of just 0.035 seconds per frame at a 15% sampling ratio. This allows for real-time single-pixel video reconstruction at 15 to 22 frames per second (fps), vastly outperforming iterative methods which take several seconds per frame.
Fig. 4. A comparison of images and their reconstruction. The input (ˆxnoisy) is fed to the generator that gives us the reconstructed (ˆx) image. Sampling rate is fixed at 20 %.
  • Robustness to Noise & Unseen Data: SPI-GAN maintained its performance edge across 8 different simulated Gaussian noise levels. When tested on completely unseen datasets like Mandrill, SPI-GAN achieved 18.43 dB PSNR compared to Deepghost's 14.36 dB.

Limitations and Future Work

While SPI-GAN demonstrates strong robustness against standard measurement noise, its performance degrades noticeably under extreme noise conditions (e.g., at a noise standard deviation level of $2e-2$).

For future work, the authors plan to extend the capabilities of the SPI-GAN framework from 2D video to 3D single-pixel video reconstruction, which could open up new possibilities in fields like LiDAR and atmospheric imaging.

Summary updated

Abstract

Single-pixel imaging is a novel imaging scheme that has gained popularity due to its huge computational gain and potential for a low-cost alternative to imaging beyond the visible spectrum. The traditional reconstruction methods struggle to produce a clear recovery when one limits the number of illumination patterns from a spatial light modulator. As a remedy, several deep-learning-based solutions have been proposed which lack good generalization ability due to the architectural setup and loss functions. In this paper, we propose a generative adversarial network-based reconstruction framework for single-pixel imaging, referred to as SPI-GAN. Our method can reconstruct images with 17.92 dB PSNR and 0.487 SSIM, even if the sampling ratio drops to 5%. This facilitates much faster reconstruction making our method suitable for single-pixel video. Furthermore, our ResNet-like architecture for the generator leads to useful representation learning that allows us to reconstruct completely unseen objects. The experimental results demonstrate that SPI-GAN achieves significant performance gain, e.g. near 3dB PSNR gain, over the current state-of-the-art method.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
STL-10 · STL10 test setSPI-GANAverage PSNR20.32 dB+2.97 vs baselinesplit: test · sampling-rate=0.20
Source quote
L251: Another DL-based method, deepghost, is based on the auto-encoder architecture that compresses the image into a lower dimension. This network works as a denoiser that recovers images from their undersampled noisy reconstructions. For this noisy reconstruction, the differential ghost imaging (DGI) technique is being employed. Due to the architectural setup of the network, deepghost fails to learn useful feature representations from large number of noisy data. As the generalization performance mostly depends on the features we learn from the training inputs, the reconstruction performance is not on par with our method. Table \ref{tbl:PSNR} shows that SPI-GAN outperforms deepghost and DLGI in terms average PSNR and SSIM. For example, we obtain an average of 20.32 dB PSNR and 0.627 SSIM when the sampling rate is set to 0.20. Where as, deepghost reconstructs samples with an average PSNR of 17.35 dB under the same settings. The performance of DLGI is worse than deepghost, averaging only 14.46 dB of PSNR and 0.395 of SSIM. The performance deteriorates further when we decrease the sampling rate. These two methods consistently perform worse than our method. We also put the qualitative comparison of these methods in the supplementary section.
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
STL-10 · STL10 test setDeepghost baselineAverage PSNR17.35 dBsplit: test · sampling-rate=0.20
Source quote
L251: Another DL-based method, deepghost, is based on the auto-encoder architecture that compresses the image into a lower dimension. This network works as a denoiser that recovers images from their undersampled noisy reconstructions. For this noisy reconstruction, the differential ghost imaging (DGI) technique is being employed. Due to the architectural setup of the network, deepghost fails to learn useful feature representations from large number of noisy data. As the generalization performance mostly depends on the features we learn from the training inputs, the reconstruction performance is not on par with our method. Table \ref{tbl:PSNR} shows that SPI-GAN outperforms deepghost and DLGI in terms average PSNR and SSIM. For example, we obtain an average of 20.32 dB PSNR and 0.627 SSIM when the sampling rate is set to 0.20. Where as, deepghost reconstructs samples with an average PSNR of 17.35 dB under the same settings. The performance of DLGI is worse than deepghost, averaging only 14.46 dB of PSNR and 0.395 of SSIM. The performance deteriorates further when we decrease the sampling rate. These two methods consistently perform worse than our method. We also put the qualitative comparison of these methods in the supplementary section.
BibTeX
@misc{karim2021spi,
  author = {Nazmul Karim and Nazanin Rahnavard},
  title = {{SPI-GAN: Towards Single-Pixel Imaging through Generative Adversarial Network}},
  year = {2021},
  eprint = {2107.01330},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.01330},
}

Loading related content...

Figure