A single-cell drug resistance phenotype rapid discrimination method based on microscopic hyperspectral imaging
By combining microscopic hyperspectral imaging and deep learning models, the problems of long detection cycles and high costs in existing technologies for bacterial drug resistance have been solved. This enables rapid single-cell identification and discrimination of drug-resistant and sensitive bacteria, improving the stability and accuracy of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN INST OF OPTICS & PRECISION MECHANICS CHINESE ACAD OF SCI
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing bacterial resistance detection technologies suffer from problems such as long detection cycles due to high bacterial count requirements and high molecular detection costs. Furthermore, existing hyperspectral technologies have failed to achieve single-cell identification of drug-resistant and susceptible bacteria.
A method based on microscopic hyperspectral imaging was adopted. The raw microscopic hyperspectral data cube was preprocessed to extract single bacterial regions, and a deep learning model was used for identification, including spatial feature extraction, band correlation extraction and classification decision. The final classification result was obtained by combining a voting mechanism.
It enables rapid differentiation between drug-resistant and sensitive bacteria, reduces the dependence of detection on bacterial quantity and culture time, lowers costs, and improves the stability and accuracy of results. It is applicable to the identification of different pathogens and drug-resistant phenotypes.
Smart Images

Figure CN122487348A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for recognizing hyperspectral images, specifically to a method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging. Background Technology
[0002] Antimicrobial resistance has become a significant threat to global public health. The World Health Organization (WHO) states that approximately 4.95 million deaths in recent years have been related to antimicrobial resistance, while about 1.27 million deaths are directly caused by drug-resistant bacteria (World Health Organization. Antimicrobial resistance (Fact sheet, 21 Nov 2023)). This phenomenon is primarily caused by the global overuse of antibiotics, leading to increased microbial resistance. Traditional drug susceptibility testing is too slow, and early empirical medication delays patients' access to optimal treatment.
[0003] Traditional antimicrobial susceptibility testing methods require steps such as sample culture, isolation and purification, pathogen identification, and antimicrobial susceptibility testing. Antimicrobial susceptibility testing can be performed using methods such as microbroth dilution, disk diffusion, or automated antimicrobial susceptibility analysis systems. These methods can directly reflect the phenotypic response of bacteria to antimicrobial drugs, and therefore have long been used as an important basis for clinical drug resistance assessment.
[0004] However, such methods typically require obtaining a sufficient quantity and relatively pure bacterial sample through culture before subsequent drug susceptibility analysis can be performed. The overall time required from a positive blood culture to obtaining complete drug susceptibility results is relatively long, generally 48–96 hours. For clinical scenarios where a decision on anti-infective treatment regimens needs to be made quickly, these methods are significantly insufficient in terms of timeliness.
[0005] Molecular diagnostic methods primarily infer bacterial resistance by detecting resistance-related genes, resistance sites, or resistance molecular markers. Typical methods include PCR, real-time fluorescence PCR, sequencing, and related nucleic acid detection technologies. These methods offer the advantage of rapid detection, significantly shortening the time required for resistance determination in certain scenarios. However, a sufficient quantity of bacteria is still required for detection. Furthermore, these methods typically rely on specialized instrument platforms, reagent systems, and stringent experimental conditions, resulting in higher overall costs and limiting their application in primary healthcare institutions and resource-constrained settings.
[0006] For specific drug resistance-related proteins, rapid detection methods such as immunochromatography and latex agglutination have been developed in existing technologies. For example, for methicillin-related resistance, detection of PBP2a protein can be used as an auxiliary diagnostic method. These methods are relatively simple to operate, have a short detection time, and have certain clinical auxiliary application value.
[0007] However, these methods still require the use of colony or enriched samples and cannot completely eliminate their dependence on the culture process. Therefore, their applicability and detection stability are still limited.
[0008] Hyperspectral imaging can simultaneously acquire spatial and continuous spectral information, offering advantages such as being label-free, non-contact, simple to operate, and inexpensive. Common applications of hyperspectral imaging in microbial detection include bacterial classification at the colony level and single-cell classification using microscopic hyperspectroscopy. However, current technologies have not yet achieved the identification of drug-resistant and susceptible bacteria. Furthermore, existing hyperspectral technologies primarily focus on identifying different pathogen species and genera, rather than distinguishing between "drug-resistant" and "susceptible" bacteria within the same species—tasks where phenotypic differences are smaller and average spectra are more similar. Therefore, current technologies have not yet developed a comprehensive solution for identifying single-cell drug resistance phenotypes. Summary of the Invention
[0009] The purpose of this invention is to address the problems of long detection cycles due to high bacterial count requirements and high molecular detection costs in existing bacterial resistance detection technologies, and to provide a rapid single-cell resistance phenotype identification method based on microscopic hyperspectral imaging.
[0010] To achieve the above objectives, the technical solution provided by this invention is as follows:
[0011] A rapid method for identifying single-cell drug resistance phenotypes based on microscopic hyperspectral imaging, characterized by the following steps:
[0012] Step 1: Collect the raw microscopic hyperspectral data cube of the bacteria in the drug susceptibility test, and preprocess the raw microscopic hyperspectral data cube to obtain the transmittance data cube T;
[0013] Step 2: Extract single bacterial regions from the transmittance data cube T to obtain hyperspectral data of multiple single bacteria;
[0014] Step 3: Decompose the hyperspectral data of each single bacterium along the spectral dimension to obtain a set of two-dimensional single-band images arranged in band order;
[0015] Step 4: Input the two-dimensional single-band images from the two-dimensional single-band image set into the pre-trained deep learning model for recognition, and obtain the corresponding single bacterial classification labels for the two-dimensional single-band images;
[0016] The deep learning model includes a spatial feature extraction module, a band correlation extraction module, a classification head, and a classification decision module arranged sequentially.
[0017] The spatial feature extraction module is used to extract the feature vector of each two-dimensional single-band image in the two-dimensional single-band image set to obtain the feature sequence of a single bacterium.
[0018] The band correlation extraction module is used to extract correlation features from the feature sequences of a single bacterium to obtain sequence features, and to perform pooling operations on the sequence features along the band dimension to obtain a global feature vector.
[0019] The classification head is used to calculate the classification probability vector based on the global feature vector;
[0020] The classification decision module is used to obtain a single bacterial classification label based on the category corresponding to the highest probability in the classification probability vector.
[0021] Step 5: Aggregate all single bacterial classification tags and use a voting mechanism to obtain the final classification result;
[0022] Step 6: Based on the correspondence between the labels and the classification results, output the drug resistance discrimination results to complete the rapid discrimination of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging.
[0023] Furthermore, step 1 specifically includes:
[0024] Step 1.1: Collect raw microscopic hyperspectral data cubes of single cells for drug sensitivity testing. ; Represents the set of real numbers. and These represent the original microscopic hyperspectral data. Height and width, Represents raw microscopic hyperspectral data The total number of bands;
[0025] Step 1.2: Cube the raw microscopic hyperspectral data. By removing low signal-to-noise ratio bands, a hyperspectral data cube is obtained. , , Indicates the total number of valid bands retained;
[0026] Step 1.3: Process the removed hyperspectral data cube Perform radiometric correction to obtain a transmittance data cube. .
[0027] Furthermore, step 1.3 specifically includes:
[0028] Take the cube of hyperspectral data after rejection Up pixel Whiteboards that have been pre-collected and processed Up pixel ,in,( () represents the spatial coordinates of a pixel. express( The band coordinates of the pixel at position ( ); for the pixel and pixels Perform phase division to obtain the pixels on the transmittance data cube. The expression is:
[0029] ;
[0030] Pixels on the cube based on transmittance data Obtain the transmittance data cube T.
[0031] Furthermore, step 2 specifically involves:
[0032] Step 2.1: Generate segmented images based on the bands of the transmittance data cube T, and use Kmeans clustering for unsupervised binary classification to separate the foreground and background regions.
[0033] Step 2.2: Perform connected component analysis on the foreground region to obtain multiple independent candidate regions; sort the number of pixels in the multiple independent candidate regions, retain the connected regions with a pixel count of 5%-95%, and then automatically filter according to the condition that the area of the independent candidate region is between 60-150 pixels to obtain all single bacterial regions.
[0034] Based on the spatial coordinates of each individual bacterial region, hyperspectral images of each individual bacterium are cropped from the transmittance data cube T, where the hyperspectral image of the i-th individual bacterium is... Represented as:
[0035] ;
[0036] in, and For hyperspectral images Height and width, This indicates the number of bacteria in a single cell.
[0037] Furthermore, step 3 specifically involves:
[0038] For adoption Hyperspectral data representing each individual bacterium, for each individual bacterium Decomposition along the spectral dimension yields a set of two-dimensional single-band images arranged in band order, expressed as:
[0039] ;
[0040] in, ;
[0041] This represents the index of a two-dimensional single-band image in a set of two-dimensional single-band images, with a value of [value missing]. .
[0042] Furthermore, in step 4, the spatial feature extraction module consists of multiple levels of cascaded two-dimensional convolutional units and a fully connected layer connected to the end two-dimensional convolutional units; each level of two-dimensional convolutional unit includes a two-dimensional convolutional layer, a batch normalization layer, and a ReLU activation function arranged sequentially.
[0043] The band correlation extraction module includes a TTT-based sequence modeling module and a pooling layer. The TTT-based sequence modeling module includes multiple TTT blocks stacked sequentially. The first TTT block extracts the correlation features between different bands based on the received single bacterial feature sequence and the band position index to obtain sequence features. The remaining TTT blocks receive the sequence features output from the previous layer and extract the correlation features between different bands based on the band position index to obtain updated sequence features. The output of the last TTT block is connected to the pooling layer.
[0044] The classification head includes a global max pooling layer, a fully connected layer, and a Log-Softmax layer arranged sequentially.
[0045] Furthermore, in step 4, the spatial feature extraction module includes three levels of cascaded two-dimensional convolutional units;
[0046] The first-level two-dimensional convolutional unit has 1 input channel, 16 output channels, and a kernel size of [missing value]. Step size is 2, fill size is 1;
[0047] The second-level two-dimensional convolutional unit has 16 input channels, 64 output channels, and a kernel size of [missing information]. Step size is 2, fill size is 1;
[0048] The third-level two-dimensional convolutional unit has 64 input channels, 256 output channels, and a kernel size of [missing information]. Step size is 2, fill size is 1;
[0049] The output of the third-level two-dimensional convolutional unit is connected to a fully connected layer.
[0050] Further, in step 4, the step of inputting the two-dimensional single-band images from the set of two-dimensional single-band images into a pre-trained deep learning model for recognition to obtain the corresponding single bacterial classification labels for the two-dimensional single-band images specifically involves:
[0051] Step 4.1: Extract the two-dimensional single-band images from the two-dimensional single-band image set. Input spatial feature extraction module to obtain corresponding feature vectors The expression is:
[0052] ;
[0053] in, This indicates the spatial representation extraction operation of the spatial feature extraction module, where D represents the feature dimension;
[0054] Step 4.2: Combine the feature vectors of the same single bacterium The characteristic sequence of a single bacterium was obtained by combining the bands in sequence. The expression is:
[0055] ;
[0056] Step 4.3: Extract the characteristic sequence of a single bacterium. The input band correlation extraction module extracts band correlations to obtain sequence features. The expression is:
[0057] ;
[0058] in, This indicates the extraction operation of the band correlation extraction module;
[0059] Sequence features Perform pooling operations along the band dimension to obtain the global feature vector. The expression is:
[0060] ;
[0061] in, Represents the pooling function;
[0062] Step 4.3: Transfer the global feature vector The input classification header is used for classification to obtain the classification probability vector. The expression is:
[0063] ;in, Represents the classification probability vector. This represents the classification operation of the classifier;
[0064] Step 4.4: Convert the classification probability vector Inputting the data into the classification decision module yields the single bacterial classification label q; the expression is:
[0065] .
[0066] Furthermore, step 5 specifically includes:
[0067] Let the i-th single bacterium classification label be denoted as We aggregate the K single bacterial classification labels and use a voting mechanism to obtain the final classification result Y, denoted as:
[0068] ;
[0069] in, Indicates the voting mechanism, .
[0070] Compared with the prior art, the present invention has the following beneficial technical effects:
[0071] 1. The present invention provides a rapid identification method for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging. By preprocessing the original microscopic hyperspectral data cube, extracting single bacterial regions, learning and recognizing them using a deep learning model, and aggregating all single bacterial classification tags, the method achieves rapid identification of drug-resistant and sensitive bacteria, thereby significantly reducing the dependence of drug resistance diagnosis on the number of bacteria and culture time.
[0072] 2. The present invention provides a rapid method for identifying single-cell drug resistance phenotypes based on microscopic hyperspectral imaging. This method standardizes the original microscopic hyperspectral data cube by removing low signal-to-noise ratio bands, performing radiometric correction on pre-acquired and processed whiteboards, extracting single bacterial regions, and decomposing single bacterial hyperspectral data along the spectral dimension. This enables subsequent deep learning models to make judgments based on data with more stable quality and more uniform form, thereby improving the engineering feasibility and result stability of the entire process.
[0073] 3. The present invention provides a method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging. The method organizes each two-dimensional single-band image of a single bacterium into a feature sequence arranged in band order through a spatial feature extraction module, and models the dependency relationship between different bands through a band correlation extraction module, which can extract deeper correlation features, thereby enhancing the ability to distinguish between drug-resistant and sensitive bacteria.
[0074] 4. The present invention provides a rapid identification method for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging. By aggregating the classification results of multiple single bacteria, the final identification result is obtained. This mechanism can alleviate the fluctuations of individual bacteria caused by imaging noise, pose differences, local segmentation errors and biological heterogeneity, thereby improving the stability and accuracy of the overall results.
[0075] 5. The present invention provides a rapid identification method for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging, which can be adapted to different pathogens, different drug resistance phenotype identification tasks and different microscopic hyperspectral imaging conditions, and has good potential for widespread application.
[0076] 6. The present invention provides a rapid identification method for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging. It achieves single-cell drug resistance phenotype screening based on microscopic hyperspectral imaging, without the need for specific molecular detection reagents in the identification process, thus reducing reagent consumption. Attached Figure Description
[0077] Figure 1 This is a flowchart of an embodiment of the method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to the present invention;
[0078] Figure 2 This is a network structure diagram of a deep learning model in an embodiment of a method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to the present invention.
[0079] Figure 3 In an embodiment of the rapid identification method for single-cell drug resistance phenotype based on microscopic hyperspectral imaging of the present invention, the original microscopic hyperspectral data cube of Staphylococcus aureus in the drug susceptibility test in step 1 is shown.
[0080] Among them, (a) is the original microscopic hyperspectral data cube of a large number of bacteria, (b) is the original microscopic hyperspectral data cube of one Staphylococcus aureus, and (c) is the original microscopic hyperspectral data cube of another Staphylococcus aureus.
[0081] Figure 4 This is a flowchart illustrating the rapid identification of drug resistance phenotypes in Staphylococcus aureus in an embodiment of a method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to the present invention.
[0082] Figure 5 These are single-bacterial level confusion matrix diagrams, image level confusion matrix diagrams, and strain level confusion matrix diagrams obtained in an embodiment of a rapid identification method for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to the present invention; wherein, (a) is a single-bacterial level confusion matrix diagram, (b) is an image level confusion matrix diagram, and (c) is a strain level confusion matrix diagram. Detailed Implementation
[0083] To make the objectives, advantages, and features of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Those skilled in the art should understand that these embodiments are merely used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0084] This embodiment provides a rapid method for identifying single-cell drug resistance phenotypes based on microscopic hyperspectral imaging, such as... Figure 1 As shown, it includes the following steps:
[0085] Step 1: Collect raw hyperspectral microscopic data cubes of single bacteria in the drug susceptibility test. These raw hyperspectral microscopic data cubes contain both spatial morphological and spectral information of the single bacterium, serving as the raw data basis for subsequent drug resistance phenotype identification. Preprocess the raw hyperspectral microscopic data cubes to obtain transmittance data cubes T; specifically:
[0086] Step 1.1: Collect raw microscopic hyperspectral data cubes of bacteria used in drug susceptibility testing. ; Represents the set of real numbers. and These represent the original microscopic hyperspectral data. Height and width, Represents raw microscopic hyperspectral data The total number of bands.
[0087] Step 1.2: Because microscopic hyperspectral imaging systems typically suffer from reduced system response, increased noise, and decreased imaging stability at both ends of the spectrum, a cube of the original microscopic hyperspectral data is prepared. Low signal-to-noise ratio (SNR) bands are removed, specifically the first B×0.173 and last B×0.135 bands, while retaining the effective bands with higher SNR in the middle, resulting in the hyperspectral data cube after removal. , , This indicates the total number of valid bands retained.
[0088] This step resulted in the original microscopic hyperspectral data cube. Compression in the spectral dimension, i.e., from the original dimension Become By removing low-quality bands, interference from invalid noise on subsequent radiometric correction, single-bacterial extraction, and model identification can be reduced.
[0089] Step 1.3: Extract the cube of hyperspectral data after rejection. Up pixel Whiteboards that have been pre-collected and processed Up pixel ,in,( () represents the spatial coordinates of a pixel. express( The band coordinates of the pixel at position ( ); for the pixel and pixels Perform phase division to obtain the pixels on the transmittance data cube. The expression is:
[0090] ;
[0091] Pixels on the cube based on transmittance data Obtain the transmittance data cube T.
[0092] Before and after this step, the dimensions of the data cube remain unchanged, still being [dimensions missing]. However, the meaning of the data is transformed from the original imaging response values to standardized transmittance information. This process is radiometric correction, which reduces the impact of inconsistencies in the imaging system response and illumination fluctuations on subsequent model recognition results.
[0093] Step 2: Extract single-bacterial regions from the transmittance data cube T to obtain hyperspectral data of multiple single bacteria; this achieves the conversion from a full-image micrograph to a single-bacterial sample; specifically:
[0094] Step 2.1: Generate segmented images based on the bands of the transmittance data cube T, and use Kmeans clustering for unsupervised binary classification to separate the foreground and background regions.
[0095] Step 2.2: Perform connected component analysis on the foreground region to obtain multiple independent candidate regions; sort the number of pixels in the multiple independent candidate regions, retain the connected regions with a pixel count of 5%-95%, and then automatically filter according to the condition that the area of the independent candidate region is between 60-150 pixels to obtain all single bacterial regions.
[0096] Based on the spatial coordinates of each individual bacterial region, hyperspectral images of each individual bacterium are cropped from the transmittance data cube T, where the hyperspectral image of the i-th individual bacterium is... Represented as:
[0097] ;
[0098] in, and For hyperspectral images Height and width, This indicates the number of bacteria in a single cell.
[0099] This step achieves the transformation of the transmittance data cube T. (Full field of view data) Hyperspectral images of multiple single bacteria The conversion is a key step in this embodiment, which shifts from population-level image processing to single-cell-level phenotypic recognition.
[0100] Step 3: Decompose the hyperspectral data of each single bacterium along the spectral dimension to obtain a set of two-dimensional single-band images arranged in band order; specifically:
[0101] Since the processing procedure for single bacteria is consistent when using deep learning models for identification, the hyperspectral images of single bacteria are processed accordingly. Abbreviated as Hyperspectral data for each single bacterium. Decomposition along the spectral dimension yields a set of two-dimensional single-band images arranged in band order, expressed as:
[0102] ;
[0103] in, ;
[0104] This represents the index of a two-dimensional single-band image in a set of two-dimensional single-band images, with a value of [value missing]. .
[0105] This step transforms the representation of a single bacterial sample into a three-dimensional data cube. Convert to length of The technical idea behind this embodiment in this step is: instead of directly using the entire three-dimensional cube as an indivisible whole input, it organizes it into a two-dimensional single-band image sequence arranged in band order, thereby explicitly preserving the order relationship between bands and providing an input basis for subsequent cross-band correlation modeling.
[0106] Step 4: Input the two-dimensional single-band images from the set of two-dimensional single-band images into a pre-trained deep learning model for recognition, and obtain the corresponding single-bacterial classification labels for the two-dimensional single-band images; the deep learning model, such as... Figure 2 As shown, it includes a spatial feature extraction module, a band correlation extraction module, a classification head, and a classification decision module arranged sequentially.
[0107] The spatial feature extraction module consists of multiple levels of cascaded two-dimensional convolutional units and a fully connected layer connected to the end of the two-dimensional convolutional units; each level of two-dimensional convolutional unit includes a two-dimensional convolutional layer, a batch normalization layer and a ReLU activation function arranged in sequence.
[0108] Two-dimensional single-band images from a collection of two-dimensional single-band images Input spatial feature extraction module to obtain corresponding feature vectors The expression is:
[0109] ;
[0110] in, This indicates the spatial representation extraction operation of the spatial feature extraction module, which is used to extract spatial representation features for each two-dimensional single-band image.
[0111] The feature vector of the same single bacterium The characteristic sequence of a single bacterium was obtained by combining the bands in sequence. The expression is:
[0112] .
[0113] In this embodiment, as Figure 2 As shown, the spatial feature extraction module includes three levels of cascaded two-dimensional convolutional units; the feature dimension D=224.
[0114] The first-level two-dimensional convolutional unit has 1 input channel, 16 output channels, and a kernel size of [missing value]. Step size is 2, fill size is 1;
[0115] The second-level two-dimensional convolutional unit has 16 input channels, 64 output channels, and a kernel size of [missing information]. Step size is 2, fill size is 1;
[0116] The third-level two-dimensional convolutional unit has 64 input channels, 256 output channels, and a kernel size of [missing information]. Step size is 2, fill size is 1;
[0117] The output of the third-level two-dimensional convolutional unit is connected to a fully connected layer.
[0118] The band correlation extraction module includes a TTT-based sequence modeling module and a pooling layer; such as Figure 2 The sequence modeling module based on TTT shown includes three TTT blocks stacked in sequence. The first TTT block extracts the correlation features between different bands based on the received single bacterial feature sequence and the band position index to obtain sequence features. The remaining two TTT blocks receive the sequence features output from the previous layer and extract the correlation features between different bands based on the band position index to obtain updated sequence features. The output of the last TTT block is connected to the pooling layer.
[0119] Characteristic sequences of single bacteria The input band correlation extraction module extracts band correlations to obtain sequence features. The expression is:
[0120] ;
[0121] in, This indicates the extraction operation of the band correlation extraction module;
[0122] Sequence features Perform pooling operations along the band dimension to obtain the global feature vector. The expression is:
[0123] ;
[0124] in, This represents the pooling function.
[0125] In this embodiment, the band correlation extraction module includes a 3-layer cascaded TTT block with a feature dimension D=224 and a corresponding band sequence length of 180. The band position index is constructed according to the band order and is input into the band correlation extraction module together with the input feature sequence to enhance the ability to represent band order information and inter-band dependencies.
[0126] The classification header consists of a global max pooling layer, a fully connected layer, and a Log-Softmax layer, set sequentially.
[0127] global feature vectors The input classification header is used for classification to obtain the classification probability vector. The expression is:
[0128] ;
[0129] in, Represents the classification probability vector. This indicates the classification operation of the classifier.
[0130] Classification probability vector Inputting the data into the classification decision module yields the single bacterial classification label q; the expression is:
[0131] .
[0132] To address the issue that drug-resistant and susceptible bacteria do not differ significantly in average spectral intensity and are difficult to distinguish directly using single-band intensity or shallow features, this embodiment decomposes the hyperspectral data of a single bacterium along the spectral dimension to obtain a set of two-dimensional single-band images arranged in band order. Then, the two-dimensional single-band images of the single bacteria are represented as a feature sequence arranged in band order through a spatial feature extraction module, and the dependence between different bands is modeled through a band correlation extraction module, thereby extracting deep discriminative features related to drug resistance phenotypes.
[0133] Step 5: Since single bacterial samples may be affected by imaging noise, segmentation errors, pose differences, and biological heterogeneity, this embodiment represents the i-th single bacterial classification label as follows: The K single bacterial classification tags are aggregated, and a voting mechanism is used to obtain the final classification result Y, which is the single-cell drug resistance phenotype discrimination result; represented as:
[0134] ;
[0135] in, This indicates a voting mechanism, where the category that appears most frequently is used as the final judgment. .
[0136] Step 6: Based on the correspondence between labels and classification results, output the drug resistance discrimination results, such as: When, it is determined to be a sensitive bacterium; when At that point, it was determined to be a drug-resistant bacterium. Thus, a rapid screening process for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging was completed.
[0137] The following experiments were conducted to investigate a rapid single-cell drug resistance phenotype identification method based on microscopic hyperspectral imaging, as described in this embodiment:
[0138] Experimental data were derived from clinical Staphylococcus aureus microscopic hyperspectral imaging data. Samples included methicillin-resistant Staphylococcus aureus (MRSA) and methicillin-sensitive Staphylococcus aureus (MSSA), with MRSA corresponding to resistant bacteria and MSSA to sensitive bacteria. Resistance categories were independently determined using standard hospital drug susceptibility testing methods and used as the reference standard in this embodiment. The deep learning model was trained using the training set in Table 1 and tested using the test set to obtain a pre-trained deep learning model.
[0139] Table 1
[0140]
[0141] In Table 1, the experimental datasets are divided into training and testing sets according to the strain level. That is, all single bacterial samples corresponding to the same strain are only included in either the training or testing set, so as to avoid information leakage caused by data from the same strain participating in both training and testing at the same time.
[0142] Following steps 1-6 in this embodiment, the original microscopic hyperspectral data cube of Staphylococcus aureus collected in the drug sensitivity test is shown below. Figure 3 As shown, (a) is the original hyperspectral microscopy data cube of Staphylococcus aureus in the drug susceptibility test; (b) is the original hyperspectral microscopy data cube of one Staphylococcus aureus; and (c) is the original hyperspectral microscopy data cube of another Staphylococcus aureus.
[0143] like Figure 4 The diagram shows a flowchart for rapid identification of drug resistance phenotypes in Staphylococcus aureus.
[0144] (a) Validation of single bacterial drug resistance identification algorithm.
[0145] This embodiment uses hyperspectral data of a single bacterium as the basic input. The raw microscopic hyperspectral data cube of each single bacterium is preprocessed and represented as a 12×12×180 transmittance data cube, where 180 represents the number of retained effective bands. Simultaneously, a pre-trained deep learning model outputs a single-bacterial classification label for each bacterium, corresponding to either drug-resistant or susceptible bacteria.
[0146] The pre-trained deep learning model in this embodiment was used for identification, and the results were verified in real-world scenarios, as shown in Table 2.
[0147] Table 2
[0148]
[0149] As shown in Table 2, the method of this embodiment achieved a specificity of 96.86%, a sensitivity of 96.45%, and an accuracy of 96.66% on independent test data, indicating that the method of this embodiment can effectively distinguish between drug-resistant and sensitive bacteria. Table 2 also shows that the method of this embodiment can extract drug resistance phenotypic discrimination information from the raw microscopic hyperspectral data cubes of bacteria in drug susceptibility testing. Furthermore, the method of this embodiment does not require waiting for the growth reaction of a large bacterial population as in traditional drug susceptibility testing, and can obtain effective classification criteria at the single-bacterial level.
[0150] (ii) Verification of the stability of the final classification results through the voting mechanism.
[0151] To verify the effect of the voting mechanism on improving classification stability, this embodiment constructs single-bacterial level confusion matrices, image-level confusion matrices, and strain-level confusion matrices, as follows: Figure 5 As shown.
[0152] Figure 5 In the middle (a), there is a single-bacterial level confusion matrix, which means that each single-bacterial hyperspectral data is classified separately and the single-bacterial classification label is compared with the true category. Figure 5 In the middle (b), the image-level confusion matrix is obtained by majority voting on multiple single bacterial classification labels in the same microscopic hyperspectral image, and then the classification results of the image are statistically analyzed. Figure 5 In the middle (c), there is a strain-level confusion matrix, which is obtained by majority voting on the classification results of multiple microscopic hyperspectral images corresponding to the same strain, and then statistical analysis is performed.
[0153] exist Figure 5 In the confusion matrix (a)-(c), the horizontal predicted values are the discrimination results, and the vertical true values are the real classification results. The diagonal lines represent correctly classified results, and the off-diagonal lines represent incorrectly classified results; the higher the proportion of diagonal lines, the more accurate the classification result.
[0154] according to Figure 5 As shown in (a)-(c), the single-bacterial level confusion matrix is already capable of effectively distinguishing between drug-resistant and susceptible bacteria. After image-level voting and strain-level voting, the misclassification rate is further reduced, and the final classification result is more stable. This result proves that this embodiment, by aggregating the classification labels of multiple single bacteria and adopting a voting mechanism, can reduce the impact of individual bacterial classification fluctuations on the final result and improve the reliability of drug resistance discrimination results.
[0155] (iii) Validation of low bacterial count requirements, short detection cycle and low reagent cost.
[0156] Using single bacteria as the experimental analysis object, each single bacterium can be cropped into independent hyperspectral data and input into a pre-trained deep learning model to obtain a single bacterial classification label; the final result is obtained by voting on multiple single bacterial classification labels, and the time and reagent consumption are shown in Table 3; the discrimination criteria, bacterial quantity requirements, detection cycle and additional reagent consumption of the method in this embodiment are compared with common drug resistance detection methods in Table 4.
[0157] Table 3
[0158]
[0159] It should be noted that the 3–5 minutes in Table 3 refers to the discrimination process time after obtaining an imageable single bacterial sample, including microscopic hyperspectral image acquisition, single bacterial region extraction, deep learning model inference, and voting mechanism output, but does not include the time required for clinical sample pretreatment or routine isolation and culture. This description is more consistent with the technical feature of this invention: "rapidly identifying drug resistance phenotypes at the single bacterial level."
[0160] Table 4
[0161]
[0162] As shown in Table 4, traditional drug susceptibility testing relies on the growth reaction of large bacterial populations, requiring high bacterial counts and long detection cycles. While molecular detection methods such as PCR / sequencing can shorten the detection cycle, they require specialized reagents and instrument platforms for nucleic acid extraction, amplification, or sequencing. The method in this embodiment uses raw microscopic hyperspectral data cubes of single bacteria as the analysis object. After obtaining an imageable single bacterial sample, it can quickly output drug resistance discrimination results through single-bacterial region extraction, pre-trained deep learning model recognition, and voting mechanisms. Furthermore, it eliminates the need for specific molecular detection reagents such as PCR, sequencing, antibodies, or probes, thus offering advantages such as low bacterial count requirements, short detection cycles, and lower costs.
[0163] As shown in Tables 3 and 4, the method in this embodiment does not require waiting for a large number of bacteria to form a significant population growth reaction as in traditional drug susceptibility testing. Instead, it directly performs drug resistance determination after obtaining an imageable single bacterial sample.
[0164] (iv) Validation of results using deep learning models with and without band correlation extraction modules (Hybrid-TTT) and deep learning models without band correlation extraction modules (BI-Net, Buffer-Net, 1D-CNN, Fusion-Net, ResNet, 3D-CNN).
[0165] Hybrid-TTT (the method in this embodiment), along with BI-Net, Buffer-Net, 1D-CNN, Fusion-Net, ResNet, and 3D-CNN, all take a single-bacterial two-dimensional single-band image as input and output the classification results of drug-resistant / susceptible bacteria as shown in Table 5.
[0166] Table 5
[0167]
[0168] As shown in Table 5, among the various comparison algorithms, the accuracies of BI-Net, Buffer-Net, 1D-CNN, Fusion-Net, ResNet, and 3D-CNN are 92.24%, 90.22%, 89.98%, 86.04%, 58.78%, and 91.87%, respectively, all lower than Hybrid-TTT's 96.66%. Specifically, 1D-CNN mainly relies on conventional spectral features and does not show modeling the dependencies between different bands; while 3D-CNN processes both spatial and spectral information simultaneously, it does not employ a band-order feature sequence construction and band correlation extraction method.
[0169] The above results demonstrate that the effective difference between drug-resistant and susceptible bacteria is not merely reflected in the intensity of a single band or simple spatial-spectral features, but requires modeling the dependencies between different bands through a band correlation extraction module. Further verification proves that the band correlation extraction module in this embodiment is a key technical feature for improving the discrimination effect of single bacterial drug resistance.
[0170] The above verification demonstrates that the rapid identification method for single-cell drug resistance phenotypes based on microscopic hyperspectral imaging in this embodiment can achieve the following:
[0171] (1) The output of drug-resistant / susceptible bacterial classification labels based on microscopic hyperspectral data of single bacteria indicates that the hyperspectral data of single bacteria contains effective information that can be used to identify drug resistance phenotypes.
[0172] (2) By aggregating multiple single bacterial classification tags and adopting a voting mechanism, the classification results can be gradually stabilized from the single bacterial level to the image level and strain level, thereby improving the reliability of the final drug resistance discrimination results.
[0173] (3) After obtaining an imageable single bacterial sample, only the original microscopic hyperspectral data cube acquisition, single bacterial region extraction, deep learning model inference and voting output need to be completed. The discrimination time is about 3-5 minutes. It does not require specific molecular detection reagents such as PCR, real-time fluorescent PCR, sequencing, antibodies, and fluorescent probes, thereby reducing the dependence on the number of bacteria and long growth reaction, shortening the detection cycle, and reducing the cost of molecular detection reagents.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the present invention.
Claims
1. A rapid method for identifying single-cell drug resistance phenotypes based on microscopic hyperspectral imaging, characterized in that, Includes the following steps: Step 1: Collect the raw microscopic hyperspectral data cube of the bacteria in the drug susceptibility test, and preprocess the raw microscopic hyperspectral data cube to obtain the transmittance data cube T; Step 2: Extract single bacterial regions from the transmittance data cube T to obtain hyperspectral data of multiple single bacteria; Step 3: Decompose the hyperspectral data of each single bacterium along the spectral dimension to obtain a set of two-dimensional single-band images arranged in band order; Step 4: Input the two-dimensional single-band images from the two-dimensional single-band image set into the pre-trained deep learning model for recognition, and obtain the corresponding single bacterial classification labels for the two-dimensional single-band images; The deep learning model includes a spatial feature extraction module, a band correlation extraction module, a classification head, and a classification decision module arranged sequentially. The spatial feature extraction module is used to extract the feature vector of each two-dimensional single-band image in the two-dimensional single-band image set to obtain the feature sequence of a single bacterium. The band correlation extraction module is used to extract correlation features from the feature sequences of a single bacterium to obtain sequence features, and to perform pooling operations on the sequence features along the band dimension to obtain a global feature vector. The classification head is used to calculate the classification probability vector based on the global feature vector; The classification decision module is used to obtain a single bacterial classification label based on the category corresponding to the highest probability in the classification probability vector. Step 5: Aggregate all single bacterial classification tags and use a voting mechanism to obtain the final classification result; Step 6: Based on the correspondence between the labels and the classification results, output the drug resistance discrimination results to complete the rapid discrimination of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging.
2. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 1, characterized in that, Step 1 is as follows: Step 1.1: Collect raw microscopic hyperspectral data cubes of single cells for drug sensitivity testing. ; Represents the set of real numbers. and These represent the original microscopic hyperspectral data. Height and width, Represents raw microscopic hyperspectral data The total number of bands; Step 1.2: Cube the raw microscopic hyperspectral data. By removing low signal-to-noise ratio bands, a hyperspectral data cube is obtained. , , Indicates the total number of valid bands retained; Step 1.3: Process the removed hyperspectral data cube Perform radiometric correction to obtain a transmittance data cube. .
3. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 2, characterized in that, Step 1.3 specifically involves: Take the cube of hyperspectral data after rejection Up pixel Whiteboards that have been pre-collected and processed Up pixel ,in,( () represents the spatial coordinates of a pixel. express( The band coordinates of the pixel at position ( ); for the pixel and pixels Perform phase division to obtain the pixels on the transmittance data cube. The expression is: ; Pixels on the cube based on transmittance data Obtain the transmittance data cube T.
4. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 2, characterized in that, Step 2 is as follows: Step 2.1: Generate segmented images based on the bands of the transmittance data cube T, and use Kmeans clustering for unsupervised binary classification to separate the foreground and background regions. Step 2.2: Perform connected component analysis on the foreground region to obtain multiple independent candidate regions; sort the number of pixels in the multiple independent candidate regions, retain the connected regions with a pixel count of 5%-95%, and then automatically filter according to the condition that the area of the independent candidate region is between 60-150 pixels to obtain all single bacterial regions. Based on the spatial coordinates of each individual bacterial region, hyperspectral images of each individual bacterium are cropped from the transmittance data cube T, where the hyperspectral image of the i-th individual bacterium is... Represented as: ; in, and For hyperspectral images Height and width, This indicates the number of bacteria in a single cell.
5. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 4, characterized in that, Step 3 specifically involves: For adoption Hyperspectral data representing each individual bacterium, for each individual bacterium Decomposition along the spectral dimension yields a set of two-dimensional single-band images arranged in band order, expressed as: ; in, ; This represents the index of a two-dimensional single-band image in a set of two-dimensional single-band images, with a value of [value missing]. .
6. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 5, characterized in that, In step 4, the spatial feature extraction module consists of multiple levels of cascaded two-dimensional convolutional units and a fully connected layer connected to the end two-dimensional convolutional units; each level of two-dimensional convolutional unit includes a two-dimensional convolutional layer, a batch normalization layer and a ReLU activation function arranged in sequence. The band correlation extraction module includes a TTT-based sequence modeling module and a pooling layer. The TTT-based sequence modeling module includes multiple TTT blocks stacked sequentially. The first TTT block extracts the correlation features between different bands based on the received single bacterial feature sequence and the band position index to obtain sequence features. The remaining TTT blocks receive the sequence features output from the previous layer and extract the correlation features between different bands based on the band position index to obtain updated sequence features. The output of the last TTT block is connected to the pooling layer. The classification head includes a global max pooling layer, a fully connected layer, and a Log-Softmax layer arranged sequentially.
7. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 6, characterized in that, In step 4, the spatial feature extraction module includes three levels of cascaded two-dimensional convolutional units; The first-level two-dimensional convolutional unit has 1 input channel, 16 output channels, and a kernel size of [missing value]. Step size is 2, fill size is 1; The second-level two-dimensional convolutional unit has 16 input channels, 64 output channels, and a kernel size of [missing information]. Step size is 2, fill size is 1; The third-level two-dimensional convolutional unit has 64 input channels, 256 output channels, and a kernel size of [missing information]. Step size is 2, fill size is 1; The output of the third-level two-dimensional convolutional unit is connected to a fully connected layer.
8. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 6, characterized in that, In step 4, the step of inputting the two-dimensional single-band images from the set of two-dimensional single-band images into the pre-trained deep learning model for recognition to obtain the corresponding single bacterial classification labels for the two-dimensional single-band images specifically involves: Step 4.1: Extract the two-dimensional single-band images from the two-dimensional single-band image set. Input spatial feature extraction module to obtain corresponding feature vectors The expression is: ; in, This indicates the spatial representation extraction operation of the spatial feature extraction module, where D represents the feature dimension; Step 4.2: Combine the feature vectors of the same single bacterium The characteristic sequence of a single bacterium was obtained by combining the bands in sequence. The expression is: ; Step 4.3: Extract the characteristic sequence of a single bacterium. The input band correlation extraction module extracts band correlations to obtain sequence features. The expression is: ; in, This indicates the extraction operation of the band correlation extraction module; Sequence features Perform pooling operations along the band dimension to obtain the global feature vector. The expression is: ; in, Represents the pooling function; Step 4.3: Transfer the global feature vector The input classification header is used for classification to obtain the classification probability vector. The expression is: ;in, Represents the classification probability vector. This represents the classification operation of the classifier; Step 4.4: Convert the classification probability vector Inputting the data into the classification decision module yields the single bacterial classification label q; the expression is: 。 9. The method for rapid identification of single-cell drug resistance phenotypes based on microscopic hyperspectral imaging according to claim 1, characterized in that, Step 5 specifically involves: Let the i-th single bacterium classification label be denoted as We aggregate the K single bacterial classification labels and use a voting mechanism to obtain the final classification result Y, denoted as: ; in, Indicates the voting mechanism, .