Deep Learning‐Assisted Molecular Classification and Concentration Prediction by Imaging of a Large‐Area Metasurface with Spatially Gradient Geometry

Classifying and quantifying small molecules on‐site with a rapid and cost‐effective operation are essential for pharmaceutical manufacturing, healthcare, hazardous risk control, and other applications. However, traditional molecular detection and identification methods like chromatography often involve expensive and bulky equipment and are required to be operated by trained professionals, which severely hinders the further development of small molecule‐based applications. Herein, a novel molecular detection platform is introduced by imaging a spatial gradient metasurface consisting of millions of different unique atoms and following with deep learning modeling to classify and quantify small molecules from mixed solutions accurately. The metasurface has a circular gradient geometry, which changes its transmittance intensity pattern based on the surrounding molecules under narrow‐band illumination. A convolutional neural network trained on the monochromatic images of the metasurface is employed. The results demonstrate a recognition rate of 96.88% for classification and a mean absolute error of 16.23% for quantification. This novel platform enables label‐free, sensitive, and rapid molecular classification and quantification, which opens a new avenue for small molecule classification and quantification and enables possibilities for real‐time, on‐site, and label‐free applications, including environmental monitoring, drug screening, and early diagnosis.


Introduction
Small molecules are organic compounds with a low molecular weight, typically less than 1000 Da.This category includes various chemical compounds and is relevant to numerous applications such as pharmaceutical manufacturing, healthcare, hazardous risk control, and others.Identification and quantification of these molecules are crucial in many disciplines.Traditionally, chromatographic methods have been used for small molecule detection due to their high sensitivity and specificity.However, chromatographic systems are complicated, time-consuming, and produce hazardous wastes in the mobile phase.Therefore, a novel platform is in demand to overcome these limitations for fast and on-site molecular classification and quantification.
Metasurfaces with metallic and dielectric structures [1][2][3][4] have a remarkable capability to confine incident light at the nanoscale and induce collective oscillations of conduction band electrons around the nanostructure, which achieves a high electromagnetic field enhancement.The enhancement concentrates on the space of nanostructures, and the effect is susceptible to the local environment and the geometry of the nanostructure. [5]The dependence between the light scattering spectrum and the local environment near nanostructures allows wide applications in high-sensitive and real-time tasks. [6]Due to these unique properties, metasurface-based plasmonic molecular detection has emerged as an analytic technique in gaseous chemicals, [7][8][9] biomolecules, [10,11] environmental pollutants, [12,13] etc. [14,15] However, achieving the requirements for detecting trace amounts of attached substances with spectroscopic characterization sensors, which rely on spectral changes in resonances caused by the presence of target substances, can be challenging.These analytes demand highly sensitive and high-resolution spectrometers to accurately record the subtle spectral shifts.
[18] Although a low level of detection of 0.0003 RIU for refractometric sensing and 0.6 pM [19,20] of biomolecular detection has been successfully realized using the imaging-based metasurfaces.These platforms only focused on sensing a certain species of the molecule, while still lack the capability for identifying different molecules.
In recent years, deep learning, a very powerful computational data modeling and analysis method, has emerged as an effective tool in nanophotonic molecular detections. [21]Deep learning can effectively model existing knowledge and has a strong capacity to handle high-level nonlinear tasks.The introduction of deep learning in nanophotonic enables many emerging applications, including digital metasurface imager, [22] plasmonic nanostructure design and characterization, [23,24] nanoplasmonic image analysis for medical breath monitoring, [25,26] etc. [27,28] For example, by combining deep learning and metasurfaces, monitoring the dynamics of biomolecules and cancer screening can be achieved with higher efficiency. [29,30]Moreover, many metasurface-based chemical identification techniques have been realized with the help of deep learning based on molecular fingerprints in the infrared range. [31,32]However, these methods usually require additional optical components and expensive infrared photodetectors, which also hinder their practical applications.Additionally, previous studies mainly focus on the detection of the existence of molecules but lack the capability for quantification of detected molecules.A universal platform that can not only classify molecules in a mixture solvent but also quantify the concentration of detected molecules has yet to be fully developed.
Herein, we report an imaging-based molecular sensor platform integrating deep learning and nanophotonic metasurfaces to classify and quantify mixed solution contents.A metasurface with spatially gradient geometry fabricated by nanoimprint lithography (NIL) and gold evaporation was employed as the platform.A monochromatic camera was used to capture the image of the metasurfaces covered with the mixture of aqueous solutions of different molecules under the illumination of a narrow band of light centered at 630 nm.Then, a convolutional neural network (CNN) was applied as a decoder to model the grayscale shifts of the captured image.The position prior module is designed to amplify the differences between characteristic peaks in the image and reduce discrepancy in different radial directions.It also helps in model explanation.The results demonstrate a successful molecular classification, with a recognition rate of 96.88% on the validation and test sets and accurate quantification with a mean absolute error (MAE) of 16.23% on the test set.The randomness of the data was verified on ResNet18.With the excellent and unique capability of molecular concentration prediction and classification, this novel platform has promising potential for developing a wide range of point-of-care testing (POCT) and on-site applications.

Results and Discussion
In the sensing scheme, a plasmonic metasurface with continuously varying gradient geometry is employed to map spectral information to the transmittance intensity pattern and captured by a monochrome camera, enabling an imaging-based quantitative analyte detection platform.A filter with a center wavelength at near 630 nm was used to generate a narrow band light source from a light emitting diode (LED) panel to illuminate the metasurface and analyte, and then the transmission light was captured by the monochrome complementary metal oxide semiconductor (CMOS) installed with a macrolens (Figure 1a).Randomly mixed aqueous solutions of three small molecules, including glucose, urea, and glycerol, with mass concentrations ranging from 2.5-50%, 2.5-50%, and 5-100%, respectively, were used as analytes (Figure 1b).The surrounding environment influences the scattering properties of metasurfaces, causing changes in their diffraction patterns.Variations in the local refractive index of metasurfaces, resulting from different analytes in the concentration of components and hydrogen bonding, [33] can alter the transmission spectrum of the nanostructures.The change in the local environment, in turn, affects the intensity of the transmittance image captured by CMOS.Then, a CNN was used to establish the relationship between the transmittance intensity and the species and concentration of the solute molecules (Figure 1c).Since a fixed number of output nodes can generate unavoidable errors in predicting the concentration of nonexistent components, a combination of component existence and concentration prediction was also used to reduce this error (Figure 1d).
The metasurface was fabricated through an ultraviolet NIL process following a 50 nm-thickness gold evaporation using a flexible cyclic olefin copolymer (COC, grade 6013) template.The template was replicated from a silicon mater template fabricated by interference lithography and reactive ion etching (RIE).The fabrication flowchart is shown in Figure S1, Supporting Information.Details about fabrication can be seen in the Experimental Section.The nanostructures are unique along the radial direction of the gradient metasurface, which enables the capability of the metasurface to record the small changes of the surrounding medium in the intensity of the transmissive images.The photos of the metasurface and SEM images of five representative different positions from center to edge of the metasurface are shown in Figure 2a, which shows that the metasurface exhibits a gradient geometry.The structures change from the nanopillar to the nanohole along the radial direction from center to edge, thus making the metasurface a concentric intensity model.The top-view electric field distributions of the representative structures in Figure 2a are presented in Figure 2b at the corresponding resonance λ A-E in Figure 2c with n = 1.0 obtained by finite-difference time-domain (FDTD) simulations.The models and cross-sectional views of the electric field distribution of different positions corresponding to Figure 2a are summarized in Figure S2, Supporting Information.These simulations show that the electric field is highly confined to the external volume around the structure, which overlaps with the adsorbed or attached molecules and enables molecular detection.
The transmission spectra of the metasurface at different positions with varying nanostructures along the radial direction in air were measured and displayed in Figure 2c.The resonance wavelengths of the metasurface structures at point A to point E are 637.9,632.4,620.2, 579.2, and 570.7 nm, respectively.The results show that the resonance of the structures blueshifts along the radial direction from center to edge due to the changes in geometry.Transmission spectra of the metasurface at Point D with surrounding medium refractive index ranging from 1.345 to 1.398 are shown in Figure 2d.The resonance peak redshifted with the refractive index increase, and the refractometric sensitivity of the structures at Point D was calculated to be 367.6 nm/RIU.The relationship between the resonance wavelengths and environmental refractive index for the structures at Position A to E was illustrated in Figure 2e.The calculated refractometric sensitivities of the metasurface range from 285.0 to 403.8 nm/RIU, respectively.The results show that the refractometric sensitivity of the structures at the edge of the metasurface is higher, which is attributed to the more concentrated electric field enhancement at edge structures (Figure 2b).
The adsorbed molecules on the metasurface alter the refractive index in the vicinity of the nanostructure, which induces redshift in the transmittance spectrum.As displayed in the inset Figure 3a, A, B, and C are three typical structures extracted from the metasurface from center to edge.When the environmental refractive index changes, the resonances of the three structures experience redshifts (Figure 3a-i).Once illuminated with narrowband light (highlighted as a red stripe in Figure 3a-i), the transmittance intensity of C increases while that of A and B decreases, which modifies the matching relationship between the narrowband light and the peaks of the different structures, causing the maxima of the intensity-position curve shifts from A to C (Figure 3a-ii).Hence, the intensity of the transmission image is correlated with the position, and the intensity-position curve can be used to detect the environmental refractive index changes.The transmittance intensity-position curves of the metasurface with environmental refractive indices ranging from 1.345 to 1.398 using glycerol aqueous solution with calculated concentration were measured and plotted in Figure 3b.The inset of Figure 3b suggests that the maxima of the intensity-position curve shifted to the edge of the metasurface when the environmental refractive index increased.The relationship between the position of the maxima and environmental refractive index was further analyzed and summarized in Figure 3c.By employing a linear fitting, the imaging-based refractometric sensitivity is then calculated to be 447 pixels/RIU.Lastly, the transmittance intensity curves of glucose solution and glucoseglycerol mixture solution with varying mixing ratios have also been investigated (Figure 3d).The results indicate that the location of the transmittance intensity maxima also shifts with the concentration and mixing ratios of the solution.However, it is difficult to establish a direct correlation between the intensity curve and the composition of the mixture solution.To model the implied relationship between the transmittance intensity pattern and composition of the mixture solution, we applied an end-to-end CNN to analyze the data with the captured images of the metasurface.
CNN can extract abstract features from images based on convolution operations, which make it an excellent candidate for performing data modeling with little-to-none preprocessing. [34]In this research, both specifically designed CNN and ResNet are used as feature extraction tools as part of deep learning structure because of their simple structure and powerful performance, which have also been widely used in many other applications that include classification and regression prediction of image labels.As demonstrated in Figure 1c, a simple network (small CNN) that includes four conv blocks was employed, each containing a convolution layer, a batch normalization layer, a LeakyRelu layer, and a Maxpool layer.Finally, a linear layer connects the feature extraction and outputs.ResNet18 contains a convolutional block for encoding, a max-pooling layer, 16 residual blocks, an average pooling layer, and a fully connected layer.In the implementation, a coding method with three nodes assigned to detect the presence of three substances was used to increase the anti-anomalous substance interference ability.For the experiments using ResNet18, a network of shared weights was employed to establish a common solution space between the contents and their quantification, which introduces constraints on potential expressions in the model.The classification and regression tasks may produce a mismatch between their values, which make the optimization of weights in multitask deep learning complex. [35]Here, a value-balance loss (in pre-experiment and its effect performed well in both separate tasks in small CNN), an Affine-mean square error (MSE) loss (in ResNet18 and small CNN with Pos prior module), and accuracy requirements and batch or single sample value average weight were introduced to improve the performance.Meanwhile, comparative experiments were conducted on the network parameters and optimized the parameters to obtain better predictions.The output probability value is rounded and multiplied by the concentration predictions to reduce the error in prediction.
The platform was first utilized for concentration prediction in various glycerol aqueous solutions.The images of the metasurface exposed to 20 different mass concentrations of glycerol solutions were captured and segmented into 54 pieces.An average concentration prediction of 9.97% was measured for the test set (54 segmented images) with a label value of 10.00% (Figure 4a).The prediction accuracy of edge structures is higher than that of center structures, consistent with previous refractometric sensing experiments.The results indicate that the alteration of the metasurface image caused by the local refractive index change due to the varying concentrations of glycerol solutions can be efficiently recognized by the algorithm.
Next, solutions of three different molecules (glycerol, glucose, and sucrose) with 20 mass concentrations were prepared.Each solution contained only one type of molecule, and one concentration of each of the three solutions was taken as the test set for molecular classification and concentration prediction.The results show convergences of model loss (Figure S3, Supporting Information), and the three molecules were correctly classified with minor predicted concentration errors of 2.03%, 0.51%, and 2.99%, respectively (Figure 4b), which demonstrate the feasibility of the platform to classify and quantify small molecules in solution.
Based on the transmission intensity analysis and deep learning training results obtained from previous experiments, the sensitive region is mainly located at the edge ring of the metasurface.Therefore, we designed a module to introduce the sampling and position encoding at the highly sensitive sensing region as prior knowledge to improve the effectiveness and reduce the computation time of the model.The specific composition of the positional prior module with the sensitive area is demonstrated in Figure 5.We sampled the transmittance intensity pattern between radial 1200 and 1800 pixels at every 30°in the circumferential direction to obtain 12 sampled barcodes (Figure 5a).Then, we applied a sine function to encode the region and obtain the fingerprint under each sample.By using the symmetric sampling and the encoding of the fingerprint spectrum, the influence caused by structural asymmetry or uneven light can be restrained (Figure 5b).At the same time, the consistency of different radial variations can be obtained by observation.The introduction of positional coding can reduce the radial noise under different solutions and amplify the peak differences at the susceptible region (Figure 5a), making the whole learning process more in line with the expectations of our previous experimental analysis.After a learnable linear layer, the positional coding was mapped to the image's width, added as a barcode below the image, and integrated into the CNN for joint training (Figure 5c).The minimum MAE of concentration prediction, obtained by the network introduced the position prior, achieved as low as 13.3% in the validation set (Figure S4b, Supporting Information) without affecting the classification accuracy in the task of simultaneous classification and concentration prediction (Figure S4a, Supporting Information).The MAE of this method is 9% lower than the same CNN trained in the original method (Figure S5d, Supporting Information), which fully proves the improvement of the network performance by introducing position prior.
Two hundred seventy-four images of different analytes imaged on the metasurface were obtained as a dataset to train   the CNN.Based on 10-fold cross-validation, the dataset was split into a train set, a validation set (20 samples), and a test set (12 samples).The validation set and test set, which are not included during the training process, are used to evaluate the performance of CNN.To gain insight into the effect of the loss function, curves of different loss functions on recognition rate and MAE of concentration prediction were recorded.It can be observed that the value-balanced loss function converges more smoothly on the training set, and the best recognition rate in the validation set is higher than the result trained by binary cross-entropy loss (Figure S5a,b, Supporting Information).The best MAE of concentration prediction is also lower than the result of trained by MSE loss (Figure S5c,d, Supporting Information), and these models were trained separately with three output nodes.Next, the strength of the model performance is examined in the test set.The confusion matrix shows the result of the best model to identify the images of metasurface with different mixed solutions.The diagonal of the matrix indicates the correct recognition rate of different categories with an average of 96.4% (Figure 6a), higher than the performance of small CNN with 95.2% (Figure S6a, Supporting Information).Few errors were found when predicting the presence or absence of glucose and urea.Since the probability output of the model for each test sample also reflects the modeling effect, we plot the probability of three solutions to a three-dimensional space.Different colored ellipses were marked in different categories of mixed solutions, and the correct and incorrect predictions were labeled with dots and stars, respectively (Figure 6b).The visible boundaries of the distribution of spots and ellipses show the platform's ability to classify small molecules' content in mixed solutions successfully.Starred results represent the misclassified data in Figure 6a, and the visual classification boundary shows that these two categories are adjacent.Therefore, prediction mismatch might be attributed to the similarity in these mixed solutions' local refractive index and hydrogen bonding strength.The scatter plot of the concentration prediction of three molecules of mixed solution results in Figure 6c shows that the prediction of molecular type and concentration of mixed solutions with the presence of all three molecules is highly accurate.Statistics of MAE of concentration prediction for a single type of molecule solutions, two types of molecules, and all three types of molecules mixed solutions are shown in Figure 6d.The average error of each mixed sample is indicated in the figure, which is 5.34% for a single solute solution sample, 18.85% for the two solute mixed samples, and 24.77% for the mixed three substances.In the 2-mix set and 3-mix set, the error mainly occurs in the combination of glucose and urea, which might induce differences in the physicochemical properties of those molecules.We then calculated the combined MAE for the validation sets (17.39%, Figure S4b, Supporting Information) and test sets (16.23%).An average error of 16.98% showed a more uniform pattern, which was a significant improvement on the large gap between the test (10.64%, Figure S6b, Supporting Information) and validation sets (22.30%, Figure S5d, Supporting Information) in the small CNN with an average error of 18.02%.To validate the application of this platform in varying substance concentrations, we randomly selected three test sets that contain samples in different concentration ranges for modeling.The results are summarized in Figure 6e.Among them, the medium concentration (12.5-22.5%/20-60%)condition model achieves 100% prediction for the test set, as well as the high (22.5-42.5%/42.5-90%), low (2.5-10%/5-10%), and random concentration sets, are all above 90% accuracy, which indicates that the method achieves excellent prediction accuracy in the whole concentration range.
After that, ResNet18 was introduced to verify the randomness of the small sample data.The results show that the model fits well (Figure S7a,b, Supporting Information) when the classification and regression tasks are done simultaneously with an Affine-MSE loss function, reaching a recognition rate of 100% (Figure S7c, Supporting Information) in the validation set and an MAE of concentration prediction of 26.90% (Figure S7d, Supporting Information) indicates that the data we obtained has a good modeling capability, and illustrates the reliability of the platform.

Conclusion
In conclusion, we introduce an approach that combines nanophotonic metasurface with spatially gradient geometry and deep learning for molecular classification and concentration prediction in solution with the presence of multiple molecules.
A transmittance intensity pattern of the metasurface under narrow-band illumination was captured and analyzed by both imaging-based methods and neural networks.Moreover, the computation complexity can be reduced by introducing a position prior, in which the same radial of different samples highlighted the peak location feature by a position encoding, and different radial of the same samples formed the specific barcode by sampling.The proposed network shows a high recognition rate (above 96.88% accuracy) and low MAE in the concentration prediction (below 16.23%).This platform is expected to work with biomolecular detection, which is helpful for rapid and cost-effective early diagnosis and POCT.Many biomedical applications, including health monitoring and drug screening, will benefit from the label-free sensing and costeffective fabrications.

Experimental Section
Fabrication of Flexible COC Template: The COC film (TOPAS, Germany) was first cut into 3 Â 3 cm 2 pieces and covered with a silicon template fabricated through interference lithography and RIE, [36,37] then the stack was thermally imprinted at 150 °C and 0.3 tons of force for 5 min.After cooling to room temperature, the nanoimprinted COC film was manually separated from the silicon template.Before UV NIL, the COC template was treated with 1H,1H,2H,2H-perfluorodecyltrichlorosilane (FDTS) in a vacuum chamber at 95 °C for 15 min to form an antiadhesive monomolecular layer on its surface.
Fabrication of Metasurface: A 30 Â 30 mm 2 glass (Guluo, China) was first cleaned using an ultrasonic cleaning method with anhydrous ethanol, acetone, and isopropanol for 30 min each.Then, the samples were treated with oxygen plasma (Tonson Tech, China) for 5 min and spin-coated with a thin layer of ormoprime (Micro Resist Technology, Germany) at 4000 rpm for 1 min.Then, a small amount of ormostamp (Micro Resist Technology, Germany) was added dropwise to the flexible COC template.The glass coated with ormoprime was then placed onto the COC template and left to level for 5 min.Afterward, the stack was illuminated under a UV light (Uvitron system, USA) for 300 s at 230 mW and separated from COC template to complete the fabrication process.
Morphological Characterizations: The morphology of the samples was characterized using an Auriga scanning electron microscope (Zeiss, Germany).A layer of platinum was sputtered at 5 mA for 180 s with a fully automated high vacuum coating system (Quorum, UK) to enhance the surface conductivity of the samples.
Optical Measurements: The transmission spectra of the samples were collected using a USB2000þ compact spectrometer (Ocean Optics, USA) under the illumination of a halogen lamp (HL-2000, Ocean Optics, USA).
Image-Based Sensing and Data Processing: Transmission images of the gradient metasurface were captured using a commercial monochromatic CMOS image sensor equipped with a cooling system (QHY183M, China).A macro lens (Micro-Nikkor 55 mm F/2.8, Nikon, Japan) was applied in the optical path.The exposure time of each image was 30 ms.A monochromatic uniform light source was generated by an LED panel (50 Â 50 mm 2 ) together with a narrowband optical filter with a 630 nm central wavelength and a 16 nm full width at half maximum.Intensityposition curves were extracted from transmission images by an algorithm.Specifically, each point in the curve was calculated by averaging all pixels of equal radius, and then, curve smoothing was applied to reduce the effect of sample defects.Python (v3.7.13) was used for image processing.Origin (OriginLab, USA) was used for data analysis.
FDTD Simulations: Numerical analysis of the transmission spectra and electric field distribution was performed using the commercially available software FDTD Solutions (Lumerical Solutions Inc., USA).The geometric parameters at each position were determined from the corresponding SEM images, and the simulation results were produced by treating the localized nanostructures as uniform using periodic boundary conditions along the x-and y-axes.Perfect matching layers were applied to eliminate any reflection in the top and bottom boundaries.A nonuniform mesh with a maximum mesh step of 1 nm was applied.The material parameters used for gold in the vis-near infrared (NIR) region were from the CRC model.
Training of the CNN: The CNN structure was implemented using Python (v3.7.13) and Pytorch (v1.2.0, Amazon Inc.) on a server(GeForce RTX A5000 graphical processing unit (GPU, Nvidia Inc., USA) and Intel Corei5-7500 CPU @3.4 GHz central processing unit (CPU, Intel Inc., USA) with 12 GB of RAM, running the Windows 10 operating system (Microsoft Inc., USA).Each network was trained using a value-balanced loss function and Affine-MSE loss function, and the loss function can be found in Note S1, Supporting Information.Three output nodes were used for the original network, and six output nodes were used for shared weights networks.The small CNN structure can be seen in Figure S8, Supporting Information.Datasets are from CMOS images with a size of 3216 Â 3168 pixels and a training batch size of 5 and a learning rate of 2eÀ5.The penalty term k in the loss function is 1 in classification and 1.1 in regression, and one-sample averaging is chosen for regression and batch averaging for classification, with precision acc of 0.1 and 0.05 (Note S1, Supporting Information), respectively.Each model trained 120-2000 epochs.

Figure 1 .
Figure 1.Scheme of deep learning-assisted molecular classification and concentration prediction by imaging of a large-area metasurface with spatially gradient geometry.a) The light path of the molecule sensor system.The metasurface is transmitted under a narrow band of illumination filtered from a white illumination plane and captured by a monochromatic CMOS.b) Composition of analyte (Glu-glucose, Gly-glycerol, single solution contains a single solute, 2-mix solution contains two solutes, 3-mix solution contains all the above solutes).c) CNN structure for analyte classification and quantification, and position prior module for generating sample barcodes and refining error reduction and model interpretation.d) Model output processing.Palettes indicate different mixing states, and the probability of the existence of the three substances is rounded and multiplied by the concentration prediction to obtain the final result.

Figure 2 .
Figure 2. Morphological and optical characterization of the metasurface.a) SEM characterization of the gradient metasurface from center to edge.The inset shows the image of the metasurface.b) Top views of electrical distribution of different structures labeled in (a).The structures are extracted from corresponding SEM images.c) Transmission spectra at five locations in the air.The inset is a normalization at the resonance wavelength.d) Transmission spectra under different refractive index environments of the structure at Point D. Inset: normalized spectra at resonance wavelength.e) Refractometric sensitivity of the structures at different positions.Scale bar: SEM: 1 μm; Electric filed simulation images: 10 nm.

Figure 3 .
Figure 3. Imaging-based refractometric sensing using the monochromatic images of the metasurface.a) The principle of imaging-based sensing scheme.(i) Transmittance spectra at Points A-C (solid line).When the environmental refractive index increases, the spectra exhibit redshifts (dashed line), and the spectral peak at Point C after redshift matches the narrowband light.(ii) Radial pixel-intensity curves of the metasurface.Analysis of peak positions of transmission intensity after imaging a wide area of the metasurface when the environmental refractive index increases.(inset) A typical image of the metasurface labeling the locations of A-C points.b) Transmittance intensity change of different refractive index environments along the radial direction.c) Plot of the transmittance intensity maxima position and the environmental refractive index, the calculated sensitivity is 447 pixels/RIU.d) Variation of transmittance intensity of different mixed solutions.

Figure 4 .
Figure 4. Single solute solutions classification and quantification via CNN.a) Imaging sensing-based prediction of glycerol concentration by deep learning (CMOS images were segmented into 6 Â 9 to expand the dataset) and real label for all split blocks is 10.0.b) Predicted results of three solution types and concentrations of CMOS images based on deep learning.Gly was labeled 2, Glu was labeled 3, sucrose was labeled 4, the real label was marked green in the histogram, predicted results were marked buff in the histogram and type marked orange, and concentration was marked pink in the CMOS image.

Figure 5 .
Figure 5. Position prior module details. a) The sensitive ring (indicated by the red arrow) in the image of the metasurface and the pixel-intensity curves before and after applying position encoding.Sampling is performed every 30°in the circumferential direction, resulting in 12 barcodes.b) Twelve barcodes correspond to the fingerprints of the mixed solution.c) Calculation flow of the position prior module, including the down-sampling and positional encoding.

Figure 6 .
Figure 6.Molecular classification and concentration prediction using neural network.a) Confusion matrix of analyte contents sensor, including test set and validation sets.b) Three-dimensional prediction result distribution of the platform.Different categories are marked with colored ellipses.c) Scatter plot of the concentration prediction for the test set.d) MAE of concentration on different mixing methods, excluding the incorrect prediction set.e) Classification effects at different concentration ranges, including a random test set and low/mid/high concentrations, were re-randomly selected for testing.