Photonics Research, Volume. 12, Issue 7, 1410(2024)

Screening COVID-19 from chest X-ray images by an optical diffractive neural network with the optimized F number

Jialong Wang1、†, Shouyu Chai1、†, Wenting Gu1, Boyi Li1, Xue Jiang2, Yunxiang Zhang3, Hongen Liao4,5, Xin Liu1、*, and Dean Ta1,2,6
Author Affiliations
  • 1Academy for Engineering and Technology, Fudan University, Shanghai 200433, China
  • 2Center for Biomedical Engineering, Fudan University, Shanghai 200433, China
  • 3Department of Chemistry, Fudan University, Shanghai 200433, China
  • 4Department of Biomedical Engineering, School of Medicine, Tsinghua University, Beijing 100084, China
  • 5e-mail: liao@tsinghua.edu.cn
  • 6e-mail: tda@fudan.edu.cn
  • show less
    Figures & Tables(12)
    Architecture of the ODNN-COVID framework for COVID-19 detection based on the CXR images. An optically encoded CXR image is illuminated by a plane wave with the wavelength λ in the input plane. The incident light sequentially propagates between the diffractive layers in turn. Finally, the output light intensity will be concentrated in the specific region of the output plane to the greatest extent, which depicts the final diagnosis results of COVID-19. The axial distances among these planes and layers are denoted by di,i=0,…,L, where L is the number of diffractive layers in the network.
    Diagnosis results implemented by ODNN-COVID from numerical simulations. (a) Diagnosis results of the binary-classification task. The first row depicts the phase modulation map (0−2π) of three diffractive layers of ODNN-COVID after training. The second through fifth rows report the patient CXR samples from COVID-19 and non-COVID-19 (at the input plane) and the corresponding optical diagnosis results (at the output plane). The sixth and seventh rows show the intensity distribution of the light fields just after the phase modulation of each diffractive layer (the second through fourth columns, respectively) and the final outputs (the last column), when taking a COVID-19 and a non-COVID-19 as input data, respectively. (b), (c) Diagnosis results of three-classification and four-classification diagnosis tasks. Examples of input CXR images for each class, the corresponding optical diagnosis results, the normalized results of the output light intensity in the detection regions, and phase modulation maps are shown, respectively.
    Quantitative analysis of diagnosis results implemented by ODNN-COVID. (a)–(c) Confusion matrices of all classification tasks. (d) Loss and accuracy curves of all classification tasks. The values in dashed boxes represent the accuracy and the standard deviation. It can be observed that between the 20th and 25th epochs, the loss and accuracy of all models have approached convergence.
    Diagram and photograph of the experimental setup for ODNN-COVID. (a) Diagram of the experimental setup. L1 to L4 are lenses. P1 to P4 are polarizers. BS1 and BS2 are beam splitters. M1 and M2 are 4f systems, which are used for collimation and pixel matching. The plane wave emitted by the laser is coded by the ASLM and then phase modulated by the PSLM, and the final diagnosis result is captured by the CMOS camera. (b) Photograph of the experimental setup. The ASLM, PSLM, and CMOS camera form the ODNN system as the main components.
    Anti-perturbation strategy in the experimental system. The upper left corner shows the diagram of a single-layer ODNN-COVID and CXR images with COVID-19 and non-COVID-19 features. The y axis represents the perturbation range introduced during the training (orange dots), and the x axis represents the range of perturbations present in practice during the blind testing (purple dots). The middle part shows the light intensity output with the same CXR input and the corresponding overall accuracy and standard deviation (blue dashed boxes).
    Experimental results of the binary-classification task implemented by ODNN-COVID. (a) Diagram of a single-layer ODNN-COVID architecture. (b) Phase modulation map (0−2π) of the diffractive layer containing 1920×1200 neurons, which is loaded on the PSLM. (c) The diagnosis results of simulation and experiments. The first row shows the patient CXR sample images, which are loaded on the ASLM. All CXR images are resized to 800×800 and then employ zero padding to the size of 1920×1200. The second and third rows show the simulation results and final diagnosis images captured experimentally by the CMOS camera where the light intensity is focused on the pre-defined detection regions in a way that can be visually discerned. The fourth row shows the normalized experimental results of the sum of output light intensity within the specific detection regions. (d), (e) Confusion matrices and accuracies of the simulation (with the anti-perturbation strategy) and experimental results are shown.
    Experimental results of the three-classification task implemented by ODNN-COVID. (a) Phase modulation map (0−2π) for the three-classification task, which is loaded on the PSLM. (b) Diagnosis results of simulation and experiments. The patient CXR sample, simulation, and experimental results, as well as the normalized experimental results of the sum of output light intensity within the detection regions. (c), (d) Confusion matrices and accuracies of the simulation (with the anti-perturbation strategy) and experimental results are shown.
    Effect of Connectivity and F number on ODNN-COVID’s performance. (a) Performance of ODNN-COVID with different Connectivity. A diagram of a three-layer ODNN-COVID and the used illumination light are shown in the upper left corner. The first row shows the diagrams of Connectivity, which are set to 100%, 50%, 5%, and 0.05%, respectively. The second to fifth rows show the results of the output light intensity (i.e., diagnosis results) by ODNN-COVID with the varying Connectivity when facing different types of CXR images. The corresponding overall accuracy and standard deviation are also shown in the blue dashed box. (b) Effect of F number on accuracy performance of a three-layer ODNN-COVID with different illumination light sources. (c) Light intensity output by the ODNN-COVID models with different F numbers and diffraction angles for the same CXR images. The output results highlighted by the black dashed box show that large diffraction angle indeed increased the upper bound of the optimized range of F number. The corresponding overall accuracy and standard deviation are also shown in the blue dashed box.
    Independent effects of various physical parameters related to F number on the diagnosis performance of ODNN-COVID. Three numerical simulations that compare with each other are presented. To improve computational efficiency, all simulations are implemented through a three-layer ODNN-COVID with 200×200 neurons per layer. In each numerical simulation, two of the three physical parameters (the sizes of the diffractive layer, the axial distances between the layers, and the wavelengths of illumination light) related to the F number are fixed. Only one physical parameter is changed to make the F number equal to 10−5, 5×10−5, 10−4, 5×10−4, 10−3, 5×10−3, 10−2, 5×10−2, and 10−1, respectively. In the process of the F number decreasing from 10−4 to 10−5, the accuracy of ODNN system remains at a low level and the outputs become increasingly blurry because of the convergence of elements in the transfer matrix M. During the process of the F number decreasing from 10−2 to 5×10−4, the Connectivity within the ODNN systems is in an appropriate range, so the diagnosis accuracy of the network reaches a high level (90%–93%). The positions, shapes, and light intensity differences of both detection regions can also be effectively distinguished. In the case where the F number is relatively large, the ODNN system is at a low Connectivity, exhibiting a relatively low accuracy. The limited information transfer through diffraction propagation also leads to the rough outline of the CXR images being displayed in the output. Moreover, a larger φmax can indeed expand the upper bound of the acceptable F number. The values within the blue dashed box depict the mean accuracy and standard deviation. (a) Schematic of ODNN-COVID with the changing size of the diffractive layers. The wavelength of illumination light is set to 670 nm, and the distance between diffractive layers is set to 15 cm. (b) Distribution of light intensity (i.e., diagnosis results) at the output plane for models with different neuron sizes when facing to different types of the CXR images. A diagram of the three-layer ODNN-COVID is shown in the upper left corner with a being the side size of each pixel and N being the number of pixels per side in the diffractive layer. The first to fourth rows show the output light intensity of ODNN-COVID retrained according to different pixel sizes (1 μm, 2 μm, 3 μm, 7 μm, 10 μm, 22 μm, 32 μm, 70 μm, and 100 μm, respectively). (c) Schematic of ODNN-COVID with the changing distance between diffractive layers. (d) Supplementary explanation of Fig. 8(c). The visible light with a wavelength of 670 nm and terahertz light with a wavelength of 0.75 mm are both used as illumination light sources, corresponding to neuron side lengths of 8 μm and 0.38 mm. Upper left corner: a diagram of the three-layer ODNN-COVID is shown where d is the axial distance between layers. First to fourth rows: the final light intensity (i.e., diagnosis result) of ODNN-COVID retrained by changing the axial distances (10 m, 2 m, 1 m, 0.2 m, 0.1 m, 20 mm, 10 mm, 2 mm, and 1 mm for visible light and 20 m, 4 m, 2 m, 0.4 m, 0.2 m, 40 mm, 20 mm, 4 mm, and 2 mm for terahertz light). (e) Schematic of ODNN-COVID with the changing wavelength of the illumination light. The axial distance and the pixel side size of each diffractive layer are kept at 18 m and 0.3 mm. Here, the values of certain parameters (i.e., the axial distance) may not be applied in real experimental scenarios, but are only for conceptual verification in the situations that the F numbers need to move within a large range (10−5 to 10−1). (f) Diagnosis results of ODNN-COVID with different wavelengths. First to fourth rows: the final light intensity (i.e., diagnosis result) of ODNN-COVID retrained by changing the wavelengths λ (500 μm, 100 μm, 50 μm, 10 μm, 5 μm, 1 μm, 500 nm, 100 nm, and 50 nm, respectively).
    Effects of the number of diffractive layers on the diagnosis performance of ODNN-COVID. In conventional neural networks, the number of the hidden layers generally has an important impact on the performance of the networks. Similarly, we evaluate effects of the number of diffractive layers on the performance of optical neural networks, i.e., ODNN-COVID. In this scenario, the illumination light wavelength, the number of pixels, and the neural side size of each diffractive layer are still kept at 670 nm, 200×200, and 8 μm, respectively. The axial distance is fixed at 10 cm. (a) Schematic of ODNN-COVID with the varying number of the diffractive layers. (b) Output light intensity (i.e., diagnosis results) of ODNN-COVID with different numbers of diffractive layers. A diagram of ODNN-COVID is shown with L representing the number of diffractive layers (upper left corner). The first to fourth rows depict that the final output light intensity where ODNN-COVID is retrained by changing the number of diffractive layers (1 layer, 2 layers, 3 layers, 4 layers, and 5 layers, respectively). The fifth row depicts the mean accuracy and standard deviation of ODNN-COVID when processing the patient CXR images. As expected, with an increase in the number of diffraction layers, the final detection performance of ODNN-COVID tends to improve. Compared to the single-layer ODNN-COVID, the multi-layer ODNN-COVID models exhibit the higher accuracy. Moreover, the accuracy differences among multi-layer diffraction networks are not significant. This phenomenon is in line with our general understanding of neural networks. Although more layers represent more trainable neurons, an excessive number of neurons may also make the test set performance of the network even worse because of the possible overfitting. On the other hand, it should also be noted that the multi-layer will also increase the difficulty of aligning the entire optical path system as well as the experimental cost.
    ODNN-COVID adapts to diagnose with different wavelengths of illumination light. To demonstrate ODNN-COVID can adapt to different wavelengths of illumination light as long as the F number is within the optimized range, we subdivided the wavelengths in the visible light band and also added a millimeter wave in the terahertz band for the comparisons. (a) Schematic of ODNN-COVID with the changing wavelength of the illumination light. (b) Output light intensity obtained by a three-layer ODNN-COVID with different wavelengths of illumination light. In the scenarios, the used wavelengths of illumination light are 470 nm (blue), 570 nm (yellow), 670 nm (red), 770 nm (infrared), and 0.75 mm (terahertz), respectively. Here, the axial distances between layers, the number of pixels, and the neural side size of each diffractive layer for the visible light band and terahertz band are kept at 10 cm, 200×200, 8 μm and 5 cm, 200×200, 0.4 mm, respectively. The second to fifth columns show the output light intensity (i.e., diagnosis results) of all retrained models. The values within the blue dashed box depict the obtained mean accuracy and standard deviation. The results demonstrate that no matter what wavelength the selected illumination light is used in the optical network models, as long as the F number is within the optimized range, ODNN-COVID does theoretically show the similar and excellent performance in both the accuracy and the difference in light intensity between the two detection regions.
    • Table 1. Training and Testing Datasets for COVID-19 Diagnosis Tasksa

      View table
      View in Article

      Table 1. Training and Testing Datasets for COVID-19 Diagnosis Tasksa

      Classification TasksCOVID-19Non-COVID-19PneumoniaNormalBacterialViral
      Binary-classification diagnosisTraining set960 + 480960 + 480××××
      Testing set240 + 120240 + 120××××
      Three-classification diagnosisTraining set960 + 480×960 + 480960 + 480××
      Testing set240 + 120×240 + 120240 + 120××
      Four-classification diagnosisTraining set960 + 480××960 + 480960 + 480960 + 480
      Testing set240 + 120××240 + 120240 + 120240 + 120
    Tools

    Get Citation

    Copy Citation Text

    Jialong Wang, Shouyu Chai, Wenting Gu, Boyi Li, Xue Jiang, Yunxiang Zhang, Hongen Liao, Xin Liu, Dean Ta, "Screening COVID-19 from chest X-ray images by an optical diffractive neural network with the optimized F number," Photonics Res. 12, 1410 (2024)

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category: Image Processing and Image Analysis

    Received: Nov. 20, 2023

    Accepted: Apr. 7, 2024

    Published Online: Jun. 17, 2024

    The Author Email: Xin Liu (xin_liu@fudan.edu.cn)

    DOI:10.1364/PRJ.513537

    CSTR:32188.14.PRJ.513537

    Topics