Real-time particle pollution sensing using machine learning

Particle pollution is a global health challenge that is linked to around three million premature deaths per year. There is therefore great interest in the development of sensors capable of precisely quantifying both the number and type of particles. Here, we demonstrate an approach that leverages machine learning in order to identify particulates directly from their scattering patterns. We show the capability for producing a 2D sample map of spherical particles present on a coverslip, and also demonstrate real-time identification of a range of particles including those from diesel combustion. Published by The Optical Society under the terms of the Creative Commons Attribution 4.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation,


Introduction
Airborne pollution particles are a global health challenge since they are linked to illnesses such as asthma, cancer, heart disease and dementia, causing around three million premature deaths a year [1].Particle characterisation is therefore invaluable in atmospheric pollution monitoring, where aerosols [2] and black carbon [3,4], along with other pollutants such as particles from diesel combustion [5] (referred to here as diesel soot), are understood to influence human health [6][7][8][9].Harmful contaminants such as polystyrene microspheres that can be present in the marine environment and have a negative effect on marine life [10,11], and thus human life, would also be invaluable to monitor.Therefore, the development of techniques that can be used to characterise a broad range of particles is a key strategy in reducing the number of deaths caused by pollution.To date, environmental monitoring through object classification direct from observation of the scattered light has been demonstrated in both water and using aerosol particles [12,13].
Light that is scattered from an object encodes rich information about the shape and structure of that object [14,15].However, without specialised equipment, only the intensity of the scattered light can be recorded and the phase information is lost.Therefore, an exact description of the object is not directly possible, as both amplitude and phase of the scattered light is required.The challenge of producing the inverse function that maps a scattering pattern to the object has led to lensless imaging approaches such as phase retrieval [16][17][18][19][20] and ptychography [21][22][23].Phase retrieval offers a solution by requiring that the object is oversampled, which is equivalent to ensuring that the object has zero padding (i.e.no intensity contribution) outside a well-defined region.Therefore, this approach is generally only applicable to objects that are smaller than the size of the illuminating light source.Ptychography enables imaging over a continuous object, but requires the collection of scattering patterns that correspond to overlapping regions of the object, where, in general, the degree of overlap must also be measured, along with the illumination function.A general solution to this inverse problem, which places no limitations on the sample or the illumination function, would therefore be of significant value.
Neural networks (NNs) [24][25][26] are a computing paradigm inspired by the interconnected network of neurons present in biological intelligence.Rather than being programmed with specific instructions, a NN learns an algorithmic process from processing input-output data.With appropriate training data, a NN therefore has the potential to learn a direct transfer function from scattering pattern to quantification of the sample, without any need for understanding the physical laws of light-matter interaction.NNs can therefore forgo the need to develop complex light-interaction models [27,28].An additional advantage of using NNs for sensing is the recently shown ability to update the NN for additional particle type determination or accuracy when required, without retraining on the whole previous data set [29].
Recent advances in NN has allowed lensless computational imaging [30] and phase recovery [31][32][33], as well as object classification through scattering media [34][35][36] and through diffraction imaging [37].Theoretical work by Ulanowski et al. [38] described applying NNs to determining particle size and refractive index.Although the determination of particle refractive index and size of colloidal spherical particles [39][40][41] has also been demonstrated experimentally using NNs [42], our results presented here demonstrate the application of machine learning to determine the size, material and number of microspheres in a cluster, as well as the real-time identification of a range of real-world airborne pollution particles.
Specifically, we demonstrate firstly a NN that can predict the material and number of microspheres at each position on a substrate, hence producing a sample map, and secondly a NN that runs in real-time for identification of airborne pollutants such as pollen and particles from diesel combustion.The real-time NN receives live camera images of scattering patterns and processes them in real-time, returning its determination as the illuminating laser spot is scanned over the particles.These two experiments offer a proof-of-principle demonstration of the applicability of our technique for both marine and airborne pollution identification.The proposed sensing concept, as shown in Fig. 1, is that a NN can directly quantify the material and number of particles from a single scattering pattern, once provided with appropriate training data.

Sample fabrication
Polystyrene microspheres of size 5 µm ± 70 nm and silicon dioxide microspheres of size 5 µm ± 200 nm from Sigma Aldrich were deposited onto a substrate (a 22 mm by 50 mm, 0.15 mm thick borosilicate coverslip) in a dilution of 1 part per 1000 in deionized water.The two solutions were deposited onto the substrate approximately 3 mm apart, each covering a region approximately 3 mm in diameter.The aqueous solution was evaporated by placing the substrate on a hotplate for two minutes at 90 °C.
The airborne pollution particles used were Narcissus pollen grains, Iva xanthiifolia pollen grains, diesel soot (particles from diesel combustion) collected from a car exhaust, and wood ash, which were deposited on separate substrates.This allowed labelling and recording of scattering patterns for training the NN.Subsequently, the four types of pollutants were deposited onto four separate quadrants on a new substrate, for real-time measurements.Images of the pollution particles were recorded using a Zeiss Evo SEM.

Experimental setup
Light from a HeNe laser operating at 632.8 nm, was focused onto the substrate using a 5 cm focal length lens, producing a spot size with diameter approximately 20 µm.The scattered light from the particles was projected onto a screen at a distance of 5 cm from the substrate, and subsequently imaged by a CMOS camera (Thorlabs, DCC1545M, 1280 x 1024), placed 30 cm away, with an integration time of 100 ms.Owing to the housing of the camera preventing the detector being placed in close proximity to the particle, by imaging the screen, we were able to capture signals from higher scattering angles than that possible with the CMOS camera alone.The camera was connected to a computer to allow real-time capturing of images, and synchronisation with the programmable XYZ movement stages.To image the substrate, the screen was removed and replaced with a 20x microscope objective (Nikon 20x NA = 0.4) connected to a CMOS camera (Thorlabs, DCC1545M, 1280 x 1024).

Data collection and training
Figure 2 shows the schematic for data collection and NN training.A region of a substrate (a borosilicate coverslip) was sparsely coated with 5 µm diameter polystyrene microspheres and an adjacent region of 5 µm diameter silicon dioxide microspheres, both of total area approximately 3 mm by 3 mm.The substrate was mounted on an XYZ translation stage in order for the focussed light from a HeNe laser to be scanned over the substrate regions of interest.The HeNe light was focussed to a spot size of approximately 20 µm diameter, and the movement steps in X and Y on the substrate, between recording each scattering pattern, was 30 µm.
Since a NN learns by the processing of training data, rather than being hard-coded with algorithms, the resulting efficacy is generally dependent on the quality and appropriateness of the training data set.Here, each item in the training data set consisted of a single scattering pattern (the input) and two parameters corresponding to the material and the number of particles (the output).For the training data set, for each scattering pattern, the material was known from prior knowledge of the particle distribution and the number of particles was determined from a microscope image of the sample that was visually inspected and humancounted.The training data set consisted of 568 items, collected from both material regions under identical conditions, and contained a distribution of number of particle clusters.Each scattering pattern was used as an input for the NN, which then predicted the material and number of particles.The feedback from the comparison function was used to optimize the weighting between the neurons in the NN, via an automatic process known as backpropagation [43], in order to increase the prediction accuracy.

Neural network
The type of NN used was a convolutional neural network (CNN) [44,45], and the CNN framework used was Tensorflow [46].CNNs are particularly effective at processing image data, as they can include a series of convolutional processes that, during training, are optimized in order to recognise specific features in the images.Both the NNs used in this work (one for microspheres analysis and one for real-time pollution analysis) consisted of an input layer, two convolutional layers with a fully connected layer (1024 neurons) before the categorisation output.Training took 10000 and 1000 epochs (iterations through the entire data set) for the microspheres and real-time NNs, respectively.
Figure 3 displays a diagram of the NN used for both the microspheres and real-time experiments.The training data was pre-processed by cropping the images to 112 by 112 pixels and normalising to a maximum value of 255, before being passed into the NN.The first two layers following the input layer consisted of 64 and 32 convolutions, for microspheres NN and real-time NN, respectively, with sizes of 112 by 112 and 56 by 56 for microspheres, and 112 by 112 and 56 by 56 for real-time, for the first and second layers.A kernel size of 3 and 15 was used for each layer for microspheres and real-time NN, respectively, with a pooling factor of 2 and stride of 2. The output of the second layer was passed to a fully connected layer of 1024 neurons.A dropout [47] of 0.1 was used for the fully connected layer and ReLU activation function [48] was used at each layer.The training protocol was the adaptive moment estimation (ADAM) optimizer [49], which was used to minimize the softmax cross entropy cost function.A learn rate of 0.0003 was used for both NNs.The output of the microspheres NN had 13 categories, 1-9 corresponding to 0-8 particles of polystyrene, and 10-13 categories corresponding to 0-3 particles of silicon dioxide, with each category assigned a confidence percentage, with the combined value for all categories for each analysed scattering pattern equalling 100%.The output of the real-time NN was 4 categories with each category assigned a confidence percentage for each tested scattering pattern, with the combined value for all 4 categories equalling 100%.

Particulate mapping
Since marine particle pollution can consist of plastic microspheres, such as polystyrene, the application to the detection of such microspheres is important, and hence is demonstrated here.Experimental scattering patterns from either a single microsphere or a cluster of many microspheres are shown in Fig. 4, with the associated microscope images displayed as an inset to each image.Each image is split in half to emphasise the difference in the scattering patterns for different sample parameters.In general, as the number of particles increased in the clusters, the angle between adjacent interference peaks decreased, owing to interference from multiple particles.4(c) shows the difference between three polystyrene particles that are arranged (left) in a line and (right) in a triangle.In this case, even though the material and the number of particles are the same, the scattering patterns have substantial differences, therefore highlighting the challenge of correctly identifying the number when three or more microspheres are present.
Both training and validation data sets contained identical types of data, namely scattering patterns and the associated material and number of particles.However, the two data sets served completely different purposes.The training data set was processed repeatedly, where during each iteration an automatic optimization process gradually changed the weighting of the neural connections to reduce the error in the NN prediction.The validation data set was used to test the accuracy of the trained NN, as the data set was not used during training and hence acted as unseen data.Here, the validation data set corresponded to two separate 600 µm by 600 µm regions (20 by 20 scattering patterns) on the substrate, corresponding to regions of polystyrene and silicon dioxide microspheres.For each position in the validation regions, the scattering pattern was processed by the NN and the material and number was predicted, and subsequently compared to the known material and number.
Figure 5 shows the predicted sample maps for (a) polystyrene and (b) silicon dioxide microspheres, where the number at each point corresponds to the predicted number of particles.For 100% of the validation scattering patterns, the NN correctly predicted the material type, and hence the predicted material type is not labelled on the sample maps.In cases where the predicted number was incorrect, a red cross covers the number.Squares with no numbers correspond to scattering patterns that the NN correctly predicted as zero particles, i.e. positions where the microscope image of the substrate either showed nothing or debris.The colour map corresponds to the confidence percentage that the NN assigned to each prediction.For the validation data set, which contained 238 unseen scattering patterns, the NN had a prediction accuracy of 97.1% (7 incorrect).The scattering patterns with zero particles had a 100% prediction accuracy.For the polystyrene particles, for one and two particles, there was a prediction accuracy of 100%.For the silicon dioxide particles, for one and two particles, there were prediction accuracies of 100% and 83% respectively.For three or more particles, across both materials, 40% of the scattering patterns were predicted correctly.The reduced accuracy for a higher number of particles is attributed predominantly to the relative rarity of such scattering patterns in the training data set, particularly given the increase in possible permutations (i.e.rotations and arrangements) of clusters for higher numbers of particles.

Real-time sensing
To determine the ability of our approach to work in real-time for sensing, such as for airborne pollution detection, a NN was trained on four different particle types, Narcissus pollen grains, Iva xanthiifolia pollen grains, diesel soot and wood ash.The airborne pollutants were deposited onto separate substrates and placed in the setup described earlier.A total of 238 scattering patterns across the four pollutant types (68 Narcissus, 56 Iva xanthiifolia, 59 diesel soot and 55 wood ash) were recorded and used in the training of the NN, while an additional 39 scattering patterns not used in the training were used in the validation of the NN.
To test the rigorousness of our sensing approach for real-world application, after a time period of over one month the trained NN was used to perform real-time measurements on a new substrate.Each pollutant was deposited onto a quadrant of a single, new substrate, for ease of checking correctness of predictions, which was then moved randomly under the laser light focus.Since the training of the particles was carried out on separate slides for each particle, then there is no weighting given to each of the quadrants on the test sample, hence, as far as the NN is concerned, the particles are randomly dispersed as a mixture on the slide.
Each scattering pattern was recorded and processed by the NN (which took 2.8 seconds to load) in less than 50 milliseconds.Figure 6(a) shows the confidence percentage for each measurement, and whether the prediction was correct or incorrect.Out of 50 measurements taken, the NN was correct 43 times.The average confidence percentage when correctly identifying Narcissus pollen grains, Iva xanthiifolia pollen grains, diesel soot and wood ash, was 86%, 58%, 40% and 54%, respectively.We attribute these differences to the ease of identification of features in the scattering patterns that are associated with specific pollutant structures.If the majority of features that are associated with a specific pollutant type are not identified, then, for example, the scattering from the sharp edges of the wood ash could be misidentified as the scattering from the sulcus from the pollen grains, due to the similarity in the resultant scattering pattern.Hence, this could explain why wood ash has been misidentified as Narcissus and Iva xanthiifolia.The high confidence percentage of the Narcissus pollen grains is likely due to the lack of variation in the pollen grain sizes and similar structure, whereas the smaller confidence percentage for Iva xanthiifolia pollen grains is likely due to the lager variation in size and structure of the pollen grains.Additionally, as discussed, the NN was trained on a slightly higher number of Narcissus pollen grain scattering patterns than any other scattering patterns, which perhaps led to a greater ability for the NN to predict Narcissus.The average confidence percentage was lower for diesel soot, likely due to the variety of pollutant shape, however, the diesel soot predominantly consisted of features not present in the other pollutants (e.g.specifically sized aggregates), and hence was identified correctly 100% of the time.In order to quantify the quality of the NN's prediction ability that can include false positives and false negatives as well as true positives and true negatives, the Matthews correlation coefficient (a measure of the quality for a multiclass classification [50]), was calculated.This was found to be 0.81, compared with the maximum potential value of 1.
To determine what output the real-time NN would give for an unfamiliar object (a sample type that it had not been trained on), we tested the real-time NN on a 5 µm polystyrene microsphere scattering pattern.The real-time NN allocated the following probabilities, 29% to Narcissus, 7% to Iva xanthiifolia, 18% to diesel and 46% to wood ash.This is perhaps understandable due to the fewer higher spatial frequencies present in wood ash and polystyrene scattering patterns, compared with the pollen and diesel particle scattering patterns.Avoiding such false identification could be achieved ensuring a sufficiently high cut-off confidence percentage for correct identification, which could be enabled by increasing the accuracy of the NN and training on more data, as well as through expanding the number of objects trained on and through potentially using multiple NNs [51].
The application of this sensor technique to real-world scenarios would therefore require increasing the number of object types to accommodate the many and various particle pollutants present in the air.Such a scaling up would require robotic automation, and potentially data augmentation to reduce training time [52].Also, the particle scattering patterns would need to be captured when the particles were present and dispersed in air or in water, to simulate real-world scenarios.Exploration of how the accuracy of the NN scales with object type will be necessary to aid in the maintaining of the quality of the NN, which could be achieved by checking the accuracy of the NN as additional particle types are continually added to the network.

Conclusion
In conclusion, a particle pollution sensor that uses a NN as a general solution to the scattering inverse problem was presented.The NN was able to determine the material and number of microspheres from a single scattering pattern, and this approach was used to construct a map of their location on the substrate.Additionally, real-time detection of airborne pollutants was demonstrated.The accuracy of our approach could be improved via use of additional training data and optimization of the NN architectures.This method could lead to applications in biological cellular analysis and quantification of marine and airborne pollution particulates.

Fig. 1 .
Fig. 1.Proposed application of a NN to quantify an object directly from the scattering pattern.A NN, which can approximate any function if provided with appropriate training data has the potential to directly determine specific sample parameters from the associated scattering pattern.

Fig. 2 .
Fig. 2. Collecting the training data set and training the neural network.The schematic shows the collection of scattering patterns and associated microscope images for 568 positions across a substrate, which was used to form the training data set.Each scattering pattern was used as an input for the NN, which then predicted the material and number of particles.The feedback from the comparison function was used to optimize the weighting between the neurons in the NN, via an automatic process known as backpropagation[43], in order to increase the prediction accuracy.

Fig. 3 .
Fig. 3. Diagram of the NN used for the microspheres and real-time experiments.

Fig. 4 .
Fig. 4. Highlighting the differences between scattering patterns for different materials and numbers of microspheres.(a) Contrasts the scattering patterns from a single (left) polystyrene and (right) silicon dioxide microsphere.(b) Shows that two particles of polystyrene for two orientations had similar but rotated scattering patterns.(c) Shows three polystyrene microspheres in a line (left) and in a triangle (right).In all cases, the associated microscope image is inset.

Figure 4 (
Figure 4(a) shows a single particle of (left) polystyrene and (right) silicon dioxide.Whilst the microscope images are almost indistinguishable, the scattering patterns have distinctly different angles for the interference rings.Figure 4(b) shows the scattering pattern for two different orientations of two polystyrene particles.The two scattering patterns are almost identical, except for the relative rotation.The pattern recognition process in the NN therefore had to become rotationally invariant, as here the scattering patterns have a uniform

Figure 4 (
Figure 4(a) shows a single particle of (left) polystyrene and (right) silicon dioxide.Whilst the microscope images are almost indistinguishable, the scattering patterns have distinctly different angles for the interference rings.Figure 4(b) shows the scattering pattern for two different orientations of two polystyrene particles.The two scattering patterns are almost identical, except for the relative rotation.The pattern recognition process in the NN therefore had to become rotationally invariant, as here the scattering patterns have a uniform

Fig. 5 .
Fig. 5. Particle maps created via application of the trained NN to scattering patterns from a range of positions across the substrate.The material and number at each position, as predicted by the NN, was used to form the sample maps.The maps correspond to regions of (a) polystyrene, and (b) silicon dioxide spheres.The colour map corresponds to the NN confidence percentage for each prediction.

Figure 6 (
b), which displays a confusion matrix, illustrates the prediction accuracy for each pollutant type.

Figure 6 (
c) shows examples of scanning electron microscope (SEM) images of, and scattering patterns from, the four types of pollutant.

Fig. 6 .
Fig. 6.Real-time sensing of pollen, diesel and wood ash particulates.(a) Prediction of the pollutant type as a function of measurement number.The y-axis corresponds to the NN confidence percentage for each prediction.(b) Confusion matrix showing the performance of classification.(c) Examples of SEM images of, and scattering patterns from, the four types of pollutant.