Reagent card quantitative analysis system and method based on multi-task deep learning
By using a multi-task deep learning system, combined with image preprocessing and a multi-task network, the problems of low accuracy and weak generalization ability in reagent card quantitative analysis are solved, and high-precision and stable quantitative detection is achieved on ordinary smart terminals.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN TAILORED MEDICAL LTD
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-17
AI Technical Summary
Existing deep learning solutions suffer from low accuracy, poor repeatability, susceptibility to light and background interference, and weak generalization ability in reagent card quantitative analysis, making it difficult to achieve high-precision and stable quantitative detection without the need for dedicated imaging equipment.
A system based on multi-task deep learning is adopted, including image acquisition, key point detection and correction, color region extraction and multi-task deep learning prediction modules. Through standardized image preprocessing and multi-task network collaborative design, illumination and background interference are eliminated, and the model's ability to focus on key regions is improved.
It enables high-precision and robust quantitative analysis of reagent cards on ordinary smart terminals, adapts to complex lighting conditions, reduces dependence on equipment, and improves the generalization ability of the model and the reliability of the test results.
Smart Images

Figure CN121883386A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a reagent card quantitative analysis system and method based on multi-task deep learning, belonging to the technical field of point-of-care testing (POCT). Background Technology
[0002] In the field of in vitro diagnostics, lateral flow immunochromatographic assay (LFIA) is a core method for point-of-care testing (POCT). Its advantages, including low cost, ease of operation, and rapid response, have led to its widespread application in clinical diagnosis, food safety, and environmental monitoring. However, the quantitative interpretation of LFIA test cards has long been limited by subjective colorimetric analysis, resulting in low accuracy and poor repeatability, making it difficult to meet the reliability requirements of clinical quantitative results.
[0003] To improve the objectivity of interpretation, researchers have gradually introduced deep learning technology to conduct quantitative analysis. Existing methods mainly follow two technical paths: one is the "segmentation first, analysis later" paradigm, typically described in the patent "An Immunochromatographic Concentration Detection Method and System Based on Machine Learning" (application number: 202010928137.9), which extracts the color regions of T-line and C-line through semantic segmentation, and then performs concentration regression or positive / negative classification based on pixel statistics or shallow models. Although this type of method attempts to focus on key areas, it faces two major bottlenecks: (1) the segmentation accuracy decreases significantly under weak color development conditions, leading to the failure of subsequent analysis; (2) ignoring the asymmetric influence of uneven illumination on the signal intensity of T / C lines easily introduces systematic bias. The second is the "end-to-end direct prediction" strategy, such as the convolutional neural network (CNN) regression model proposed by Davis et al. (Anne M Davis, Asahi Tomitaka. Machine Learning-BasedQuantification of Lateral Flow Assay Using Smartphone-Captured Images[J].Biosensors (Basel), 2025, 15(1):19), which directly maps the entire reagent card image to the concentration output. Although this method avoids the complexity of explicit segmentation, it introduces new problems: (1) It is highly dependent on the standardized imaging environment (such as fixed light source, mobile phone stand), which limits the flexibility of actual deployment; (2) Because the color area accounts for a very small proportion of the whole image, the model is easily affected by background texture, edge interference and shooting angle changes, and its robustness is insufficient; (3) It lacks modeling of LFIA structural priors (such as the relative position of T / C lines, strip morphology, etc.), which leads to the model needing to rely on large-scale high-quality labeled data to converge, and the generalization ability degrades significantly in small sample or cross-device scenarios.
[0004] In summary, existing deep learning solutions either lose crucial context due to oversimplification of input information or reduce signal-to-noise ratio by blindly introducing redundant background information. Neither achieves an effective balance between eliminating the need for dedicated imaging equipment, adapting to real-world lighting conditions, and balancing accuracy and generalization. To address these challenges, this invention proposes a reagent card quantitative analysis method based on multi-task deep learning. Through standardized image preprocessing and a structure-aware multi-task network collaborative design, it effectively removes noise while retaining real-world lighting scene information for training. This enables high-precision, robust, and low-dependency LFIA quantitative interpretation on general-purpose smart terminals, overcoming the bottlenecks of existing technologies in terms of adaptability, stability, and practicality. Summary of the Invention
[0005] To address the problems of existing technologies relying on standardized equipment, being susceptible to background / lighting interference, and having weak generalization ability of prediction models, this invention provides a reagent card quantitative analysis system and method based on multi-task deep learning. Its purpose is to achieve high-precision and robust quantitative analysis of reagent card detection results on a smart terminal through the collaborative design of "standardized image preprocessing + multi-task deep learning".
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A reagent card quantitative analysis system based on multi-task deep learning is characterized by comprising an image acquisition module, a key point detection and image correction module, a colorimetric region extraction module, and a multi-task deep learning prediction module.
[0008] The image acquisition module is used to acquire the original image of the reagent card to be tested through the camera of the smart terminal, and transmit the original image to the key point detection and image correction module;
[0009] The key point detection and image correction module is used to perform key point detection and geometric transformation on the original image and output a standardized corrected image.
[0010] The color development region extraction module is used to extract a sub-image of the color development region containing the reagent card control line (C line) and the detection line (T line) from the corrected image using a predefined fixed-position mask;
[0011] The multi-task deep learning prediction module is used to receive sub-images of colored regions, perform semantic segmentation and concentration regression prediction tasks in parallel, and output the concentration prediction results of the target object.
[0012] Furthermore, the key point detection and image correction module includes a key point detection unit and an affine transformation unit.
[0013] The key point detection unit uses a regression model based on a convolutional neural network (CNN) to detect the pixel coordinates of the four corner points (top left, top right, bottom right, and bottom left) of the contour in the original image of the test kit card.
[0014] The affine transformation unit calculates the affine transformation matrix based on the pixel coordinates of the four corner points, and uses this matrix to perform a geometric transformation on the original image to obtain a corrected image with a fixed aspect ratio.
[0015] Furthermore, the multi-task deep learning prediction module adopts a "shared feature encoder + semantic segmentation task decoder + regression predictor" architecture.
[0016] The shared feature encoder consists of convolutional layers and pooling layers, and is used to extract shared feature maps of the color region sub-images from low level, medium level to high level layer by layer;
[0017] Preferably, the shared feature encoder may employ a ResNet or VGG backbone network;
[0018] The semantic segmentation task decoder consists of convolutional layers and upsampling layers. It receives multi-level shared feature maps and outputs pixel-level segmentation masks, labeling the background, T-line region and C-line region.
[0019] The regression predictor consists of convolutional layers, global average pooling layers, and fully connected layers. It receives guidance information from the shared feature map and the semantic segmentation task decoder and outputs continuous numerical values of target concentration.
[0020] Specifically, the regression predictor receives guidance information from the semantic segmentation task decoder through feature splicing or attention mechanisms, and integrates the T-line / C-line position information of the segmentation and recognition into the concentration prediction, thereby improving the model's ability to focus attention on key color regions.
[0021] The semantic segmentation task decoder and the regression predictor are respectively connected after the shared feature encoder.
[0022] This invention also provides a reagent card quantitative analysis method based on multi-task deep learning, comprising the following steps:
[0023] (1) Image acquisition and uploading: The user takes a picture of the test reagent card through the built-in camera of the smart terminal (such as a mobile phone) to obtain the original image; then, the terminal uploads the image to the remote server through the network for subsequent processing modules to call.
[0024] (2) Key point detection and image correction: After receiving the original image, the server inputs it into the pre-trained and deployed key point detection model to automatically predict the pixel coordinates of the four corner points of the reagent card; based on these coordinates, the affine transformation matrix is calculated, and geometric correction is performed on the original image to output the corrected image after the viewpoint is normalized, effectively eliminating the interference caused by tilt shooting or cluttered background.
[0025] (3) Color region extraction: Apply a predefined fixed position mask to the corrected image to extract the color region sub-image containing the C line and T line, eliminate irrelevant background interference such as test paper card casing, and ensure that the model only processes key features.
[0026] (4) Multi-task deep learning prediction: Input the sub-image of the color region into the trained multi-task deep learning model. The model performs semantic segmentation task and concentration regression prediction task in parallel. The semantic segmentation task serves as a regularization constraint, forcing the model to focus on key regions. The concentration regression prediction task outputs the concentration prediction result of the target object based on effective features.
[0027] (5) Result return: The server transmits the target concentration results predicted by the model to the smart terminal interface for display, and the user can intuitively obtain the quantitative detection results.
[0028] Furthermore, in step (1), the smart terminal of the image acquisition module includes a mobile phone or a tablet. The acquisition process does not rely on a standardized light box or fixed bracket, and supports free shooting under normal lighting conditions.
[0029] Furthermore, in step (2), the training process of the key point detection model includes: constructing a dataset of reagent card images containing different shooting angles and backgrounds, labeling the four corner points of the reagent cards in the images, using a CNN regression model to learn the corner point coordinate mapping relationship, and optimizing the model parameters through the mean square error loss function.
[0030] Furthermore, in step (4), the execution process of the semantic segmentation task includes: the semantic segmentation task decoder receives the multi-level feature map output by the shared feature encoder, and performs upsampling and decoding to obtain a segmentation mask, wherein the segmentation mask marks the reaction area of the T line, the reaction area of the C line and the background area of the color region sub-image.
[0031] Specifically, the shared feature encoder is forced to learn more generalized feature representations that are beneficial for both segmentation and regression. The semantic segmentation decoder outputs pixel-level T-line / C-line segmentation masks to guide the model in understanding the colorimetric structure of the reagent card, thereby significantly improving the accuracy and robustness of the concentration regression prediction task.
[0032] Furthermore, in step (4), the execution process of the concentration regression prediction task includes: based on the obtained multi-level feature map, a one-dimensional feature is obtained through a convolutional layer and a global average pooling layer; further, the fused high-level feature is mapped into a single continuous value through a fully connected layer, that is, the predicted target concentration value.
[0033] Furthermore, in step (4), the training process of the multi-task deep learning model includes:
[0034] A. Construct a segmentation loss function based on the semantic segmentation task. Lseg Construct a regression loss function based on the regression prediction task. Lreg By combining the loss weight coefficients α and β, the joint loss function is obtained by weighted summation of the segmentation loss function and the regression loss function. Ltotal= α Lseg+ β Lreg .
[0035] B. The multi-task deep learning model is trained end-to-end using the joint loss function to obtain a trained multi-task deep learning model.
[0036] Specifically, the segmentation loss is the cross-entropy loss, and the regression loss is the mean squared error loss.
[0037] Specifically, during model training, the semantic segmentation task and the regression prediction jointly optimize the shared feature encoder, while during model inference, it is only necessary to return to the regression prediction task to obtain the predicted value of the target object.
[0038] Furthermore, in step (5), the server deployment architecture is a client (mobile application / mini-program) - server architecture. The client is only responsible for image acquisition and result presentation, while the server undertakes the calculation of all complex models.
[0039] The server is deployed in a client (mobile application / mini-program)-server architecture. The client is only responsible for image acquisition and result presentation, while the server handles all the calculations for complex models. This innovative architecture allows users to obtain professional-grade quantitative analysis results using only a regular smartphone, without the need for expensive professional equipment, achieving a balance between convenience and accuracy.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0041] 1. Significantly improved accuracy and robustness.
[0042] By correcting key points to eliminate angle deviations, mask extraction to eliminate background interference, and multi-task learning to guide the model to focus on T-lines / C-lines, the segmentation task compensates for the effects of uneven lighting, enabling the model to learn the essential relationship between color rendering and concentration, avoiding reliance on "shortcut features," and maintaining high accuracy even in complex scenes.
[0043] 2. No standardized shooting equipment or conditions are required.
[0044] The elimination of interference from uneven local lighting and shadow in images is achieved through algorithms. Users only need to use ordinary smart terminals to take pictures freely, without the need for auxiliary equipment such as light boxes or tripods. It is suitable for uncontrolled scenarios such as home and outdoors, fully demonstrating the advantages of POCT technology.
[0045] 3. The model has strong generalization ability and high interpretability.
[0046] By introducing semantic segmentation tasks, prior knowledge of reagent card structure is injected into the model, reducing the model's dependence on the amount of training data and enabling stable adaptation to reagent cards of different batches and brands. Visualization of segmentation results can verify the model's accuracy in identifying key regions, thereby increasing users' trust in the detection results.
[0047] 4. Flexible deployment, enabling convenient and universal quantitative analysis using reagent cards.
[0048] All the technical improvements in this invention are focused on the algorithm model on the server side, supporting a client-server architecture (the server carries the computation, and the terminal is only responsible for data collection and display). The lightweight model can also be deployed locally on the terminal (without network dependence) or on edge devices to adapt to different application scenarios and realize the convenience and universality of reagent card quantitative analysis.
[0049] 5. This invention is universal and applicable to the quantitative result determination of immunochromatographic reagent cards of different specifications and detection types. This method can also achieve semi-quantitative detection and has good versatility and practicality. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the architecture and workflow of a reagent card quantitative analysis system.
[0051] Figure 2 The calibration curve is used to map the t / c value of the reagent card to the Hcy concentration.
[0052] Figure 3 This is a schematic diagram of a multi-task deep learning model framework.
[0053] Figure 4 This is a schematic diagram of an immunochromatographic reagent card.
[0054] Figure 5 The images show a comparison of the original image before and after processing. Image a is the original image taken by the user at random, images b and c are the images after key point detection and correction, and image d is the extracted color region sub-image.
[0055] Figure 6 This is a diagram showing the interface of a smart terminal. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0057] like Figure 1 As shown, this invention provides a reagent card quantitative analysis method based on multi-task deep learning, comprising the following steps:
[0058] (1) Image acquisition: The original image is captured by the built-in camera of the smart terminal and transmitted to the key point detection and image correction module;
[0059] (2) Key point detection and image correction: Input the original image into the trained key point detection model to obtain the pixel coordinates of the four corner points of the reagent card outline; calculate the affine transformation matrix based on the corner coordinates, perform geometric transformation on the original image, output the corrected image, and eliminate shooting angle deviation and background interference.
[0060] (3) Color region extraction: Apply a predefined fixed position mask to the corrected image to extract the color region sub-image containing the C line and T line, eliminate irrelevant background interference such as test paper card casing, and ensure that the model only processes key features.
[0061] (4) Multi-task deep learning prediction: Input the sub-image of the color region into the trained multi-task deep learning model. The model performs semantic segmentation task and concentration regression prediction task in parallel. The semantic segmentation task serves as a regularization constraint, forcing the model to focus on key regions. The concentration regression prediction task outputs the concentration prediction result of the target object based on effective features.
[0062] (5) Result return: The server transmits the target concentration results predicted by the model to the smart terminal interface for display, and the user can intuitively obtain the quantitative detection results.
[0063] This embodiment describes in detail the reagent card quantitative analysis method based on multi-task deep learning in this invention by using a latex immunochromatographic reagent card for quantitative analysis.
[0064] I. Construction of the original image dataset
[0065] (a) Preparation of reagent cards and actual labels
[0066] Forty-one latex immunochromatographic reagent cards covering multiple concentration gradients were prepared. Each reagent card was measured using an immunochromatographic analyzer. The colorimetric value t of the detection line (T line) and the colorimetric value c of the control line (C line) were recorded. The colorimetric ratio t / c was defined as the true label value of the reagent card, with a value range of (0-1), as a true reference for concentration prediction.
[0067] like Figure 2 As shown, an Hcy concentration mapping calibration curve is plotted with the Hcy concentration detected by the biochemical analyzer as the ordinate and the reagent card t / c value as the abscissa. The corresponding Hcy concentration is calculated using the reagent card t / c value. The calculation formula is as follows:
[0068] Hcy =
[0069] Where A=1.2005, B=1.3989, C=12.2963, D=-0.05188.
[0070] (II) Acquisition of the original image dataset
[0071] Using multiple smartphones, tablets, and other smart terminals, and in conventional scenarios without standardized light boxes or fixed supports, we simulated different usage environments such as home, outdoors, and laboratories. Under various lighting conditions, including natural light and indoor lighting, and multiple shooting angles from 0° to 45°, we collected 20-50 original images for each reagent card. Finally, we constructed an original dataset containing 17,928 images to ensure that the dataset covers complex shooting scenarios in real-world applications.
[0072] (III) Dataset Partitioning
[0073] The original dataset was divided based on the individual dimensions of the reagent cards, and the training set, validation set, and test set were allocated in a ratio of 7:1:2. The number of images in each part was as follows: 12,523 images for model training, 1,776 images for model validation, and 3,629 images for model testing, to ensure the consistency of data distribution and the objectivity of evaluation results.
[0074] II. Keypoint Detection Model Training and Image Preprocessing
[0075] (a) Key point annotation and model training
[0076] The LabelMe annotation tool was used to manually annotate all images in the original dataset, accurately marking the pixel coordinates of the four key corner points of the reagent card outline (top left, top right, bottom right, and bottom left) to form a key point annotation dataset. A dedicated corner detection model was built based on the YOLO11-Pose model as the base network, and the model training was completed.
[0077] (II) Image Correction Processing
[0078] The original image is input into the trained keypoint detection model, which outputs the predicted coordinates of the four corner points of the reagent card. Based on these coordinates, an affine transformation matrix is calculated to perform a geometric transformation on the cropped reagent card image to eliminate image distortion caused by shooting angle deviation. The corrected image is then uniformly scaled to a fixed size of 400 pixels wide × 2000 pixels high to ensure the consistency of data input to subsequent models.
[0079] (III) Extraction of the colorimetric region
[0080] Based on the fixed physical distribution characteristics of the T and C lines of the immunochromatographic reagent card, a predefined fixed-position mask is designed. A region cropping operation is performed on the corrected image to accurately capture the sub-image of the color development area that completely covers the T and C lines, completely eliminating interference from irrelevant backgrounds such as reagent card casings and edge impurities, and ensuring that the model focuses only on the key color development feature areas.
[0081] III. Construction of Semantic Segmentation Dataset
[0082] The LabelMe tool is used to perform pixel-level fine annotation on the cropped color region sub-images. The annotation categories are divided into T-line reaction region, C-line reaction region and background region. Pixel-level semantic segmentation annotation masks are generated to construct a dedicated dataset for semantic segmentation tasks. This provides accurate supervision information for the semantic segmentation branch of the multi-task model and guides the model to learn the features of the line region.
[0083] IV. Construction and Training of Multi-Task Deep Learning Models
[0084] (I) Model Architecture Design
[0085] like Figure 3 As shown, the architecture adopts a "shared feature encoder + semantic segmentation task decoder + regression predictor", and the functions of each module are as follows:
[0086] 1. Shared Feature Encoder: ResNet convolutional neural network is selected as the backbone network, which consists of convolutional layers, pooling layers and skip connections. It extracts hierarchical visual features from low-level (texture, edge), mid-level (local features) to high-level (semantic features) of the sub-image of the color region layer by layer. Through skip connections, the feature maps of different levels are output to the semantic segmentation decoder to achieve the fusion of shallow detail features and deep semantic features.
[0087] 2. Semantic segmentation task decoder: It consists of convolutional layers and upsampling layers. It receives the fused features output by the shared feature encoder, completes pixel-level classification through layer-by-layer feature recovery, and finally outputs segmentation masks that label the T-line region, C-line region and background region to guide the model to clarify the location of key color regions.
[0088] 3. Regression Predictor: Composed of convolutional layers, global average pooling layers, and fully connected layers, it receives deep semantic features from the shared feature encoder and guidance information from the semantic segmentation decoder through a feature concatenation mechanism. It incorporates the T-line / C-line position information into the concentration prediction, improving the model's ability to focus attention on key regions. Finally, it outputs continuous numerical values of target concentration through feature compression and dimension mapping.
[0089] (II) Model Training Strategy
[0090] 1. Data Augmentation: Perform augmentation operations such as random elastic transformation, random horizontal flipping, Gaussian noise addition, and random cropping within 20 pixels of image edges on the training set images to expand the diversity of training data and improve the generalization ability of the model; after augmentation, the images are uniformly scaled to 320×320 pixels and the pixel values are normalized to the [0,1] interval.
[0091] 2. Loss Function Design: Constructing the Joint Loss Function Ltotal= α Lseg+ β Lreg ,in Lseg For the loss of semantic segmentation task, Lreg The loss for the concentration regression task is represented by α and β, which are the loss weight coefficients (α=0.5 and β=0.5 in this embodiment). The two tasks are optimized by weighted summation.
[0092] 3. Training Parameter Settings: The total number of training epochs is 200. An early stopping strategy is adopted, using the mean absolute error (MAE) of the regression task on the validation set as the monitoring metric. Training is terminated when the metric shows no improvement for 10 consecutive epochs to avoid overfitting. The initial learning rate is set to 0.001. A learning rate warm-up strategy is used for the first 20 epochs. After the warm-up, the learning rate is dynamically adjusted using a cosine annealing strategy to balance the model's convergence speed and accuracy. The Adam optimizer is selected to minimize the joint loss function. A random dropout mechanism (dropout rate = 0.2) is introduced into the fully connected layer of the regression predictor to randomly disconnect some parameter connections during training to suppress overfitting.
[0093] V. Model Reasoning and Result Output
[0094] (a) Reasoning process
[0095] 1. Image Acquisition: Users can freely photograph the test reagent card under normal lighting conditions using the built-in camera of a smartphone, tablet, or other smart device, without relying on standardized imaging equipment, to acquire the original image (e.g., ...). Figure 5 (as shown), and then transmitted to the server.
[0096] 2. Preprocessing and Feature Extraction: The server inputs the original image into the keypoint detection model, obtains the coordinates of the four corner points, and performs image correction and size standardization (e.g., ...). Figure 5 As shown); the colored region sub-image is obtained by cropping using a predefined fixed-position mask (e.g. Figure 4 As shown in the figure, the data is transmitted to a multi-task deep learning model.
[0097] 3. Multi-task prediction: The model executes semantic segmentation and concentration regression prediction tasks in parallel. The semantic segmentation task outputs segmentation masks for the T-line and C-line, while the regression prediction task outputs predicted target concentration values based on fused features (e.g., ...). Figure 6 (As shown).
[0098] 4. Result return: The server transmits the concentration prediction results to the smart terminal interface, which displays them intuitively in numerical form, completing the quantitative analysis of the reagent card.
[0099] (ii) Deployment Architecture
[0100] This embodiment adopts a client-server (mobile application / mini-program-server) architecture. The client is only responsible for image acquisition and result presentation, while the server carries out the complex calculations of the key point detection model and the multi-task deep learning model. There is no need to deploy heavy models on the terminal, which reduces the requirements for terminal hardware performance. At the same time, it supports the deployment of lightweight models locally on the terminal to achieve rapid detection in scenarios without network dependence and adapt to different application needs.
[0101] VI. Experimental Results and Verification
[0102] To verify the accuracy and stability of the method of this invention in predicting the concentration values of target analytes on latex immunochromatographic reagent cards, a single-task regression model without semantic segmentation branches was used as a control group. The results were evaluated on the test set from two dimensions: prediction accuracy and prediction stability. The results are as follows:
[0103] (a) Prediction accuracy
[0104] The method of this invention has a mean absolute error (MAE) of 0.0213 on the test set, while the MAE of the control group model is 0.0251, representing a reduction of 15.14%. This indicates that the introduction of semantic segmentation significantly improves the accuracy of concentration prediction.
[0105] (ii) Predicted stability
[0106] The coefficient of variation (CV) was used to measure the fluctuation of predicted values for different images of the same reagent card. The average CV of the method of this invention was 8.47%, while that of the control group was 9.25%, which proves that the method can effectively resist the interference of environmental factors such as lighting and shooting angle, and improve the stability of prediction results.
[0107] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A reagent card quantitative analysis system based on multi-task deep learning, characterized in that, It includes an image acquisition module, a key point detection and image correction module, a color region extraction module, and a multi-task deep learning prediction module; The image acquisition module is used to acquire the original image of the reagent card to be tested through the camera of the smart terminal, and transmit the original image to the key point detection and image correction module; The key point detection and image correction module is used to perform key point detection and geometric transformation on the original image and output a standardized corrected image. The color development region extraction module is used to extract a sub-image of the color development region containing the reagent card control line (C line) and the detection line (T line) from the corrected image using a predefined fixed-position mask; The multi-task deep learning prediction module is used to receive sub-images of colored regions, perform semantic segmentation and concentration regression prediction tasks in parallel, and output the concentration prediction results of the target object.
2. The reagent card quantitative analysis system based on multi-task deep learning according to claim 1, characterized in that: The key point detection and image correction module includes a key point detection unit and an affine transformation unit; The key point detection unit uses a regression model based on a convolutional neural network (CNN) to detect the pixel coordinates of the four corner points (top left, top right, bottom right, and bottom left) of the contour in the original image of the test kit card. The affine transformation unit calculates the affine transformation matrix based on the pixel coordinates of the four corner points, and uses this matrix to perform a geometric transformation on the original image to obtain a corrected image with a fixed aspect ratio.
3. The reagent card quantitative analysis system based on multi-task deep learning according to claim 1, characterized in that: The multi-task deep learning prediction module adopts a "shared feature encoder + semantic segmentation task decoder + regression predictor" architecture. The shared feature encoder consists of convolutional layers and pooling layers, and is used to extract shared feature maps of the color region sub-images from low level, medium level to high level layer by layer; The semantic segmentation task decoder consists of convolutional layers and upsampling layers. It receives multi-level shared feature maps and outputs pixel-level segmentation masks, labeling the background, T-line region and C-line region. The regression predictor consists of convolutional layers, global average pooling layers, and fully connected layers. It receives guidance information from the shared feature map and the semantic segmentation task decoder and outputs continuous numerical values of target concentration. The semantic segmentation task decoder and the regression predictor are respectively connected after the shared feature encoder.
4. A reagent card quantitative analysis method based on multi-task deep learning, characterized in that: This method employs the reagent card quantitative analysis system based on multi-task deep learning as described in any one of claims 1-3, and includes the following steps: Step 1, Image Acquisition and Upload: The user takes a picture of the test reagent card using the built-in camera of a smart terminal (such as a mobile phone) to obtain the original image. Then, the terminal uploads the image to a remote server via the network for subsequent processing modules to use. Step 2: After receiving the original image, the server inputs it into a pre-trained and deployed key point detection model to automatically predict the pixel coordinates of the four corner points of the reagent card; based on these coordinates, the affine transformation matrix is calculated, and geometric correction is performed on the original image to output a corrected image with normalized viewpoint, effectively eliminating interference caused by tilted shooting or cluttered background. Step 3, color region extraction: Apply a predefined fixed-position mask to the corrected image to extract the color region sub-image containing the C-line and T-line, and eliminate irrelevant background interference; Step 4, Multi-task deep learning prediction: Input the sub-image of the colored region into the trained multi-task deep learning model. The model performs semantic segmentation and concentration regression prediction tasks in parallel and outputs the concentration prediction results of the target object. Step 5, Result Return: The server transmits the target concentration results predicted by the model to the smart terminal interface for display, completing the quantitative analysis of the reagent card.
5. The reagent card quantitative analysis method based on multi-task deep learning according to claim 4, characterized in that: In step one, the smart terminal of the image acquisition module includes a mobile phone or tablet. The acquisition process does not rely on a standardized light box or fixed bracket and supports free shooting under normal lighting conditions.
6. The multi-task deep learning method for quantitative analysis of reagent cards according to claim 4, characterized in that: In step two, the training process of the key point detection model includes: constructing a dataset of reagent card images containing different shooting angles and backgrounds, labeling the four corner points of the reagent cards in the images, using a CNN regression model to learn the corner point coordinate mapping relationship, and optimizing the model parameters through the mean squared error loss function.
7. The multi-task deep learning method for quantitative analysis of reagent cards according to claim 4, characterized in that: In step four, the execution process of the semantic segmentation task includes: the semantic segmentation task decoder receives the multi-level feature map output by the shared feature encoder, and performs upsampling and decoding to obtain a segmentation mask, wherein the segmentation mask marks the reaction area of the T-line, the reaction area of the C-line, and the background area of the color region sub-image. The execution process of the concentration regression prediction task includes: based on the obtained multi-level feature map, a one-dimensional feature is obtained through a convolutional layer and a global average pooling layer. Furthermore, the fused high-level feature is mapped to a single continuous value through a fully connected layer, which is the predicted target concentration value. The training process of the multi-task deep learning model includes: A. Constructing a segmentation loss function based on the semantic segmentation task. Lseg Construct a regression loss function based on the regression prediction task. Lreg By combining the loss weight coefficients α and β, the joint loss function is obtained by weighted summation of the segmentation loss function and the regression loss function. Ltotal= α Lseg+ β Lreg B. The multi-task deep learning model is trained end-to-end using the joint loss function to obtain a trained multi-task deep learning model.
8. A reagent card quantitative analysis device based on multi-task deep learning, characterized in that, include: Memory, used to store programs; A processor for implementing the reagent card quantitative analysis system and analysis method based on multi-task deep learning as described in any one of claims 1-8 by executing a program stored in the memory.
9. The reagent card quantitative analysis method based on multi-task deep learning according to claim 4, characterized in that: The reagent cards are latex immunochromatographic reagent cards, colloidal gold immunochromatographic reagent cards, or magnetic microparticle immunochromatographic reagent cards.
Citation Information
Patent Citations
Immunochromatography concentration detection method and system based on machine learning
CN112071423A