Fast Object Classification in Single-pixel Imaging
Fast Object Classification in Single-pixel Imaging
Shuming Jiao Tsinghua Berkeley Shenzhen Institute (TBSI), Shenzhen, 518000, China [email protected]
ABSTRACT
In single-pixel imaging (SPI), the target object is illuminated with varying patterns sequentially and an intensity sequence is recorded by a single-pixel detector without spatial resolution. A high quality object image can only be computationally reconstructed after a large number of illuminations, with disadvantages of long imaging time and high cost. Conventionally, object classification is performed after a reconstructed object image with good fidelity is available. In this paper, we propose to classify the target object with a small number of illuminations in a fast manner for Fourier SPI. A naive Bayes classifier is employed to classify the target objects based on the single-pixel intensity sequence without any image reconstruction and each sequence element is regarded as an object feature in the classifier. Simulation results demonstrate our proposed scheme can classify the number digit object images with high accuracy (e.g. 80% accuracy using only 13 illuminations, at a sampling ratio of 0.3%).
Keywords: single-pixel imaging, ghost imaging, Bayes classifier, classification, recognition, Fourier. INTRODUCTION
Single-pixel imaging [1, 2] (SPI) is a computational imaging technique in which the object scene is illuminated with varying patterns sequentially and a one-dimensional intensity sequence is recorded by a single-pixel detector without spatial resolution. The object image is computationally reconstructed from the single-pixel intensity sequence and the illumination patterns. Single-pixel imaging has several unique features compared with conventional imaging techniques, such as low-cost single-pixel detector instead of pixelated detector, imaging without direct line of sight, and imaging under weak light condition. Single-pixel imaging is proposed for a variety of applications such as terahertz imaging [3], remote sensing [4], three-dimensional (3-D) imaging [5-7], microscopy [8, 9], scattering imaging [10], hyperspectral imaging [11], X-ray imaging [12], optical security [13-16], lidar detection [17, 18] and gas leak monitoring [19]. On the downside, SPI usually requires a large number of illuminations with different patterns to acquire a reconstructed object image with satisfactory quality. For example, in computational ghost imaging, where random intensity patterns are employed as the illumination patterns and correlation is used as the reconstruction algorithm, it may require more than 10000 illumination patterns to capture an object image with a size of 64×64 pixels. Some attempts have been made to improve the imaging efficiency and reduce sampling ratio in SPI by using more advanced reconstruction algorithms (e.g. compressive sensing [20, 21], deep learning [22-25]) or designing more appropriate illumination patterns (e.g. Fourier transform patterns [26], Hadamard patterns [8], wavelet patterns [27]). In addition, error correction coding ([28-30]) can be used to improve the imaging efficiency in encrypted SPI. However, it is still hard to successfully recover an object image with good fidelity from only a short single-pixel intensity sequence consisting of a small number of pixels. In various optical imaging systems including SPI, the automatic classification of target objects is a critical issue and has wide applications. For example, when SPI is applied in microcopy applications (such as medical diagnosis and water quality inspection), it is necessary to identify what category of microorganisms or cells the sample belongs to. When SPI is applied in remote sensing, the ground objects (buildings, grassland, forest etc.) need to be automatically classified. Conventionally, the target object classification can be performed after a high-quality object image is already computationally reconstructed from a SPI system. Then the numerous image classification algorithms in computer vision field (such as [31-33]) can be directly employed and there is no difference in the image classification process between photographs captured by a camera and reconstructed images from SPI. However, as stated above, a high-quality reconstructed image can only be obtained after a large number of illuminations with high cost. In this paper, we investigate the fast classification of target object in SPI when only a very limited number of illuminations is performed and a reconstructed image with reasonable quality is not available.
In some previous works, the authentication (or recognition) of target object was implemented for SPI with relatively less number of illuminations [14-16, 34-36]. However, despite the success in these works, the target object can only be authenticated as correct or wrong, regarding to a reference object image (or possibly some geometrical variant of the reference object [37]). A classification of multiple-class objects cannot be achieved in these schemes [14-16, 34-36]. Furthermore, the number of illuminations for successful authentication is still at least 3% of the Nyquist limit [15], and is yet to be improved. (a) (b) (c)
Figure 1. (a) Optical setup for a Fourier single-pixel imaging (FSPI) system; (b) Working mechanism of a Fourier single-pixel imaging system; (c) Reconstructed image quality grdually enhanced as the number of illumiantions increases PROPOSED FAST OBJECT CLASSIFICAION SCHEME
In this work, the author proposes to employ a naive Bayes classifier [38] to perform target object classification in Fourier single-pixel imaging (FSPI) [26] with a very small number of illuminations and without object image reconstruction. The optical setup of a FSPI system is shown in Figure 1(a). A comparison of our proposed scheme with conventional object classification scheme in SPI is demonstrated in Figure 2.
Figure 2. (a)Conventional approach for target object classification in single-pixel imaging; (b) Proposed approach for target object classification in single-pixel imaging in our work.
In FSPI, the sinusoidal patterns in Fourier transform is projected onto the target object sequentially from low frequency components to high frequency components. Then the total light intensity
I(t) for the object scene under each illumination is recorded by a single-pixel detector, which is equivalent to the inner product between the object image
𝑂(𝑥, 𝑦) and the sinusoidal patterns cos[−2𝜋(𝑢𝑥 + 𝑣𝑦)] or sin[−2𝜋(𝑢𝑥 + 𝑣𝑦)] [(x,y): spatial domain; (u,v): frequency domain], illustrated by Equation (1)-(3) and Figure 1(b), where Re[F(u, v)] and
Im[F(u, v)] denote the real part and imaginary part of a Fourier spectrum coefficient. In this way, the Fourier spectrum coefficients of the target object is gradually captured point by point in SPI.
F(u, v) = ∬ 𝑂(𝑥, 𝑦)exp[−2𝜋(𝑢𝑥 + 𝑣𝑦)] 𝑑𝑥𝑑𝑦 (1)
Re[F(u, v)] = ∬ 𝑂(𝑥, 𝑦)cos[−2𝜋(𝑢𝑥 + 𝑣𝑦)] 𝑑𝑥𝑑𝑦 (2)
Im[F(u, v)] = ∬ 𝑂(𝑥, 𝑦)sin[−2𝜋(𝑢𝑥 + 𝑣𝑦)] 𝑑𝑥𝑑𝑦 (3)
For an object image of size M × N, the number of components in its entire discrete Fourier spectrum will be M × N complex values. Due to the symmetric property in Fourier spectrum, only half of the spectrum needs to be recorded. One complex value can be acquired from two recorded real intensity values using two illuminations. So it requires M × N illuminations (full sampling) to acquire the entire Fourier spectrum of the object image. Since most natural object images are locally smooth, the energy of their Fourier spectrum is concentrated in the low frequency components. The reconstructed object image quality can be gradually enhanced as the number of illuminations increases. An object image with reasonable quality can usually be reconstructed with a sampling ratio of around 10%-20% (10%-20% lowest frequency components in the spectrum). In this work, the target object classification is performed when the sampling ratio is much smaller than 10%. A Naive Bayes probabilistic classifier is a classical data classification algorithm in machine learning and statistics. In single-pixel imaging, it is assumed that the detector records a sequence of N intensity values I(t) ( , corresponding to the real parts and imaginary parts of each complex spectrum components. Each recorded single-pixel intensity value I(t) can be considered as one feature (or predictor) of the target object 𝑂(𝑥, 𝑦) . The target object is classified into one of the K possible categories based on the N features. Naive Bayes classifier is a supervised machine learning approach and a set of exemplar object images with correct class labels are required as training images. First, from the FSPI results of training objects, the intensity values of each feature (such as
Re[F(1,1)] or Im[F(2,3)] ) will have K different probability distribution models for K different categories of objects. A Gaussian probability distribution (Equation (4)) with parameters 𝜇 (average intensity) and 𝜎 (standard deviation of intensities) can be constructed with data fitting for each intensity sequence element I(t) ( and each object class C(m) ( , from the training images. There are totally N × K
Gaussian probability distribution functions.
𝑃(𝐼(𝑡)|𝐶(𝑚)) = 𝑡,𝑚 exp{− [𝐼(𝑡)−𝜇 𝑡,𝑚 ] 𝑡,𝑚2 } (4) For an arbitrary given intensity sequence 𝐼 ( I(1) , I(2) ,…, I(N) ) generated from a target object (not belonging to the training set) and recorded by a FSPI system, the probability of 𝐼 belonging to each object category can be calculated by combining the probabilities of each element I(t) in the sequence belonging to each object category. The overall probability of the entire sequence belonging to one object category
𝐶(𝑚) can be calculated by Equation (5)
𝑃(𝐶(𝑚)|𝐼) = 𝑃[𝐶(𝑚)] ∏ 𝑃(𝐼(𝑡)|𝐶(𝑚))
𝑁𝑡=1 (5) where
𝑃[𝐶(𝑚)] is the proportion of
𝐶(𝑚) category samples in the training data set and
𝑃(𝐼(𝑡)|𝐶(𝑚)) is the probability of the sequence element
𝐼(𝑡) belong to
𝐶(𝑚) (obtained from the pre-calculated probability distribution functions). Finally, the classification result is determined by selecting the maximum one among the m probability values of
𝑃[𝐶(𝑚)] . For example, if
𝑃[𝐶(2)] has the highest value, the intensity sequence is considered being from an object of second category. SIMULATION RESULTS
The MNIST database [39], consisting of huge numbers of handwritten number digit images (Figure 3), is employed to verify our proposed scheme. Each number digit image is considered as one possible target object in FSPI and they need to be classified into ten categories (digits 0 to 9). In simulation, 9000 images are employed as training objects and 500 images are employed as the testing objects. All training and testing images are scaled to a size of
64 × 64 pixels.
Figure 3.
Some image examples [40] of MINST database
In our simulation, a single-pixel intensity sequence is recorded by a FSPI system for each training and testing object. A naive Bayes classifier system is trained with the intensity sequence data generated from labeled training objects. Then the intensity sequence data generated from testing objects are classified with the classifier. The overall classification accuracy (correct rate) versus the number of illuminations in FSPI for testing objects is shown in Figure 4.
Figure 4.
Classification accuray versus number of illumiantion patterns in FSPI for number digit obejcts with an image size of
64 × 64 pixels
In FSPI, it usually requires approximately 4096 (
64 × 64 ) illuminations to record the entire Fourier spectrum at full sampling ratio for an object image with a size of
64 × 64 pixels. A minimum of 100 to 200 illuminations is usually required to ensure a reconstructed image with reasonable quality. However, our proposed scheme can achieve a classification accuracy of over 80% with only 13 illuminations (a sampling ratio of only 0.3%) and a classification accuracy of nearly 90% with around 50 illuminations. Fifteen examples of original testing object images, classification results and reconstructed image results with inverse Fourier transform (when the number of illuminations is 13) are shown in Figure 5.
Figure 5.
Fifteen examples of (a) original testing object images; (b) classification results (correct ones marked with black color and wrong ones marked with red color); and (c) reconstructed image results with inverse Fourier transform (when the number of illuminations is 13)
It can be observed that the quality of reconstructed images (shown in Figure (c)) are very low and the number digit is very difficult to be identified visually when the number of illuminations is only 13. However, our proposed scheme can yield correct classification results for 80% of the objects only based on the 13 elements in the single-pixel intensity sequence, without any image reconstruction. CONCLUSION
In single-pixel imaging (SPI), a high quality object image can only be reconstructed after an adequate number of illuminations, with disadvantages of long imaging time and high cost. We proposed to classify the target object with a small number of illuminations in a fast manner for SPI. A naive Bayes classifier is employed to classify the target objects based on the single-pixel intensity sequence acquired by a Fourier single-pixel imaging (FSPI) system and each intensity is regarded as an object feature in the classifier. Simulation results demonstrate our proposed method can classify the number digit objects images with high accuracy (e.g. 80% accuracy can be achieved using only 13 illuminations). Our work reveals the possibility of performing high-level computer vision tasks (e.g. image classification) even when a good reconstructed result is not available in a SPI system. The results and discussions in this paper can provide a basis that numerous future works are built upon. For example, more advanced classification algorithms (e.g. deep learning), in addition to Bayes classifier, can be attempted for the object classification problem in SPI. Results from real optical experiments, in addition to numerical simulation, can be evaluated.
The classification of more complicated objects in practical applications (such as classification of cells in single-pixel microscopy and classification of land objects in single-pixel remote sensing), in addition to simple number digit objects, can be furthered investigated.
REFERENCES [1]
M. F. Duarte, M. A. Davenport, D. Takhar, J. N. Laska, T. Sun, K. F. Kelly and R. G. Baraniuk, “Single-pixel imaging via compressive sampling,” IEEE Signal Proc. Mag. , 83-91 (2008). [2] J. H. Shapiro, “Computational ghost imaging,” Phys. Rev. A. , 061802 (2008). [3] W. Chan, K. Charan, D. Takhar, K. Kelly, R. Baraniuk, and D. Mittleman, “A single-pixel terahertz imaging system based on compressed sensing,” Appl. Phys. Lett. , 121105 (2008). [4] B. I. Erkmen, “Computational ghost imaging for remote sensing,” J. Opt. Soc. Am. A , 782–789 (2012). [5] B. Sun, M. P. Edgar, R. Bowman, L. E. Vittert, S. Welsh, A. Bowman and M. J. Padgett, “3-D Computational imaging with single-pixel detectors,” Science , 844-847 (2013). [6]
M.-J. Sun, M. P. Edgar, G. M. Gibson, B. Sun, N. Radwell, R. Lamb and M. J. Padgett, “Single-pixel three-dimensional imaging with timebased depth resolution,” Nat. Commun. , 12010 (2016). [7] Z. Zhang, S. Liu, J. Peng, M. Yao, G. Zheng, and J. Zhong, "Simultaneous spatial, spectral, and 3D compressive imaging via efficient Fourier single-pixel measurements," Optica , 315-319 (2018). [8] N. Radwell, K. J. Mitchell, G. M. Gibson, M. P. Edgar, R. Bowman and M. J. Padgett, “Single-pixel infrared and visible microscope,” Optica , 285-289 (2014). [9] R. S. Aspden, N. R. Gemmell, P. A. Morris, D. S. Tasca, L. Mertens, M. G. Tanner, R. A. Kirkwood, A. Ruggeri, A. Tosi, R. W. Boyd, G. S. Buller, R. H. Hadfield and M. J. Padgett, “Photon-sparse microscopy: visible light imaging using infrared illumination,” Optica , 1049 (2015). [10] E. Tajahuerce, V. Durán, P. Clemente, E. Irles, F. Soldevila, P. Andrés and J. Lancis, “Image transmission through dynamic scattering media by single-pixel photodetection,” Opt. Express , 16945-16955 (2014). [11] L. Bian, J. Suo, G. Situ, Z. Li, J. Fan, F. Chen and Q. Dai, “Multispectral imaging using a single bucket detector,” Sci. Rep. , 24752 (2016). [12] D. Pelliccia, A. Rack, M. Scheel, V. Cantelli and D. M. Paganin, “Experimental x-ray ghost imaging,” Phys. Rev. Lett. , 113902 (2016). [13]
P. Clemente, V. Durán, E. Tajahuerce and J. Lancis, “Optical encryption based on computational ghost imaging,” Opt. Lett. , 2391-2393 (2010). [14] W. Chen and X. Chen, “Object authentication in computational ghost imaging with the realizations less than 5% of Nyquist limit,” Opt. Lett. , 546-548 (2013). [15] Z. Chen, J. Shi and G. Zeng, “Object authentication based on compressive ghost imaging,” Appl. Opt. , 8644-8650 (2016). [16] J. Wu, B. Haobogedewude, Z. Liu and S. Liu, “Optical secure image verification system based on ghost imaging,” Opt. Commun. , 98-103 (2017). [17]
C. Zhao, W. Gong, M. Chen, E. Li, H. Wang, W. Xu and S. Han, “Ghost imaging lidar via sparsity constraints,” Appl. Phys. Lett. , 141123 (2012). [18]
W. Gong, C. Zhao, H. Yu, M. Chen, W. Xu and S. Han, “Three-dimensional ghost imaging lidar via sparsity constraint,” Sci. Rep. , 26133 (2016). [19] G. M. Gibson, B. Sun, M. P. Edgar, D. B. Phillips, N. Hempler, G. T. Maker, G. P. Malcolm and M. J. Padgett, “Real-time imaging of methane gas leaks using a single-pixel camera,” Opt. Express , 2998–3005 (2017). [20] O. Katz, Y. Bromberg and Y. Silberberg, “Compressive ghost imaging,” Appl. Phys. Lett. , 131110 (2009). [21] L. Bian, J. Suo, Q. Dai and F. Chen, "Experimental comparison of single-pixel imaging algorithms," J. Opt. Soc. Am. A , 78-87 (2018). [22] M. Lyu, W. Wang, H. Wang, H. Wang, G. Li, N. Chen and G. Situ, “Deep-learning-based ghost imaging,” Sci. Rep. , 17865 (2017). [23] T. Shimobaba, Y. Endo, T. Nishitsuji, T. Takahashi, Y. Nagahama, S. Hasegawa, M. Sano, R. Hirayama, T. Kakue, A. Shiraki and T. Ito, “Computational ghost imaging using deep learning,” Opt. Commun. , 147-151 (2018). [24]
C. F. Higham, R. Murray-Smith, M. J. Padgett and M. P. Edgar, “Deep learning for real-time single-pixel video,” Sci. Rep. , 2369 (2018). [25] Y. He, G. Wang, G. Dong, S. Zhu, H. Chen, A. Zhang and Z. Xu, “Ghost Imaging Based on Deep Learning,” Sci. Rep. , 6469 (2018). [26] Z. Zhang, X. Ma and J. Zhong, “Single-pixel imaging by means of Fourier spectrum acquisition,” Nature Commun. , 6225 (2015). [27] W. K. Yu, M. F. Li, X. R. Yao, X. F. Liu, L. A. Wu and G. J. Zhai, “Adaptive compressive ghost imaging based on wavelet trees and sparse representation,” Opt. Express , 7133-7144 (2014). [28] S. Zhao, L. Wang, W. Liang, W. Cheng and L. Gong, “High performance optical encryption based on computational ghost imaging with QR code and compressive sensing technique,” Opt. Commun. , 90-95 (2015). [29]
S. Jiao, W. Zou and X. Li, “Noise Removal for Optical Holographic Encryption from Telecommunication Engineering Perspective,” Digital Holography and Three-Dimensional Imaging 2017, paper Th2A-5, Optical Society of America (2017). [30]
S. Jiao, Z. Jin, C. Zhou, W. Zou and X. Li, “Is QR code an optimal data container in optical encryption systems from error correction coding perspective?” J. Opt. Soc. Am. A , A23-A29 (2018). [31] A. Krizhevsky, I. Sutskever and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” Advances in Neural Information Processing Systems 2012, 1097-1105 (2012). [32]
K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint, 1409.1556 (2014). [33]
K. He, X. Zhang, S. Ren and J. Sun, “Deep residual learning for image recognition,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770-778 (2016). [34]
H. Chen, J. Shi, X. Liu, Z. Niu and G. Zeng, “Single-pixel non-imaging object recognition by means of Fourier spectrum acquisition,” Opt. Commun. , 269-275 (2018). [35]
B. Li and W. Zhang, “A method of object recognition for single-pixel imaging,” 2017 International Conference on Optical Instruments and Technology: Optoelectronic Imaging/Spectroscopy and Signal Processing Technology, 1062017, International Society for Optics and Photonics (2018). [36]
X. Gu and S. Zhao, “Nonorthogonal object identification based on ghost imaging,” Photonics Res. , 238-242, (2015). [37] S. Jiao, C. Zhou, W. Zou and X. Li, “Shift, rotation and scale invariant optical information authentication with binary digital holography,” Opt. Commun. , 53-59 (2017). [38]
I. Rish, “An empirical study of the naive Bayes classifier,” IJCAI 2001 workshop on empirical methods in artificial intelligence, Vol. 3, No. 22, 41-46, IBM (2001). [39]
L. Deng, “The MNIST database of handwritten digit images for machine learning research,” IEEE Signal Proc. Mag. , 141 (2012). [40], 141 (2012). [40]