Ovulation test paper detection method and device, electronic equipment and storage medium

Through automated image processing and classification technology, the problem of professional knowledge required for ovulation test strip detection is solved, and more accurate and reliable ovulation test strip detection results are achieved.

CN118968480APending Publication Date: 2024-11-15XIAMEN MEET YOU INFORMATION TECH

Patent Information

Application Number
CN202411011720.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Existing ovulation test strips require professional knowledge, and there are errors in the color changes of the test strips due to inaccurate detection.

Method used

By obtaining the target ovulation test strip image, using a preset object detection model for test strip area detection, segmenting the detection area and control area, stitching and classification of images, and reclassifying according to the confidence score to achieve automated detection and accuracy improvement.

Benefits of technology

The accurate detection of ovulation test strips can be achieved without professional knowledge, reduce the difficulty of detection, improve the refined classification results of test strip categories, and enhance the reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968480A_ABST
    Figure CN118968480A_ABST
Patent Text Reader

Abstract

The invention provides an ovulation test paper detection method and device, electronic equipment and a storage medium, and belongs to the technical field of image recognizing.A target ovulation test paper image is obtained, test paper area detection is conducted on the target ovulation test paper image through a preset target detection model, and test paper area detection information is obtained; if the test paper area detection information indicates that the target ovulation test paper image contains a detection area and a contrast area, performing preliminary classification on the target ovulation test paper image according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category, and performing re-classification on the initial test paper category according to the confidence score to obtain a test paper classification result; therefore, the accuracy of ovulation test paper detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to an ovulation test strip detection method and device, an electronic device and a storage medium. Background Art

[0002] Ovulation test strips usually include a test line and a control line. When the ovulation test strip comes into contact with urine, the test line will show a specific color change. By manually comparing the colors of the test line and the control line, the intensity level of luteinizing hormone (LH) in urine can be detected, and the test strip category of the ovulation test strip, such as negative or positive, can be obtained. However, ovulation test strip testing requires certain professional knowledge, and there are usually errors in the manual interpretation of the color change of the test strip. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose an ovulation test paper detection method and device, electronic equipment and storage medium, aiming to improve the accuracy of ovulation test paper detection.

[0004] To achieve the above-mentioned purpose, the first aspect of the embodiment of the present application proposes an ovulation test paper detection method, the method comprising:

[0005] Acquire the target ovulation test strip image;

[0006] Performing test paper area detection on the target ovulation test paper image by using a preset target detection model to obtain test paper area detection information; the test paper area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test paper image;

[0007] If the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area, the target ovulation test paper image is preliminarily classified according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category;

[0008] The initial test paper category is reclassified according to the confidence score to obtain a target test paper category.

[0009] In some embodiments, if the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area, the target ovulation test paper image is preliminarily classified according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category, including:

[0010] If the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area, segmenting the detection area from the target ovulation test paper image according to the test paper area detection information to obtain a detection area sub-image;

[0011] Segment the control area from the target ovulation test paper image according to the test paper area detection information to obtain a control area sub-image;

[0012] Performing image stitching on the detection area sub-image and the control area sub-image to obtain a stitched image;

[0013] The spliced ​​image is preliminarily classified to obtain the initial test paper category and the confidence score.

[0014] In some embodiments, the initial test paper category includes subcategories, the confidence scores include subconfidences of the subcategories, the intensity levels of luteinizing hormone represented by the subcategories increase in sequence, and the initial test paper category is reclassified according to the confidence scores to obtain the target test paper category, including:

[0015] Select the subcategory with the highest sub-confidence from the initial test paper categories to obtain a reference category;

[0016] The reference category is classified again to obtain the target test paper category.

[0017] In some embodiments, the reference category includes a first preset category, a second preset category, or a third preset category, and reclassifying the reference category to obtain the target test paper category includes:

[0018] If the reference category is the first preset category, taking the reference category as the target test paper category;

[0019] If the reference category is the second preset category, then obtaining a subcategory adjacent to the reference category to obtain a first category and a second category; determining the target test paper category according to the first category and the second category; wherein the reference category is located between the first category and the second category;

[0020] If the reference category is the third preset category, the reference category is mapped to a new subcategory to obtain the target test paper category.

[0021] In some embodiments, determining the target test paper category according to the first category and the second category includes:

[0022] Comparing the sub-confidence of the first category with the sub-confidence of the second category to obtain a comparison result;

[0023] A new subcategory is acquired according to the comparison result to obtain the target test paper category; wherein the new subcategory is different from the initial test paper category.

[0024] In some embodiments, after reclassifying the initial test paper category according to the confidence score to obtain the target test paper category, the ovulation test paper detection method further includes:

[0025] Obtaining the test paper usage time of the target ovulation test paper image;

[0026] Arrange the target ovulation test paper images according to the test paper usage time;

[0027] The ovulation time is determined according to the target test paper category and the test paper usage time of the arranged target ovulation test paper image.

[0028] In some embodiments, the preset target detection model is trained by the following steps:

[0029] Acquire a sample ovulation test strip image and an image label of the sample ovulation test strip image; the image label includes an object position label and an object category label;

[0030] Performing feature extraction on the sample ovulation test paper image through a preset detection model to obtain a first feature map, a second feature map, and a third feature map; the feature map sizes of the first feature map, the second feature map, and the third feature map are reduced in sequence;

[0031] Upsampling the third feature map to obtain a fourth feature map; the fourth feature map has the same feature map size as the second feature map;

[0032] Upsampling the second feature map to obtain a fifth feature map; the fifth feature map has the same feature map size as the first feature map;

[0033] Performing feature fusion on the second feature map and the fourth feature map to obtain a first fused feature; performing feature fusion on the first feature map and the fifth feature map to obtain a second fused feature;

[0034] According to the third feature map, the first fusion feature and the second fusion feature, the test strip area of ​​the sample ovulation test strip image is predicted to obtain a predicted object position and a predicted object category;

[0035] Calculate the loss based on the object position label, the object category label, the predicted object position, and the predicted object category to obtain a target loss;

[0036] The model parameters of the preset detection model are adjusted according to the target loss to obtain the preset target detection model.

[0037] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application proposes an ovulation test strip detection device, the device comprising:

[0038] An acquisition module, used for acquiring a target ovulation test strip image;

[0039] A detection module, used to perform test paper area detection on the target ovulation test paper image through a preset target detection model to obtain test paper area detection information; the test paper area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test paper image;

[0040] A first classification module is used for preliminarily classifying the target ovulation test paper image according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category if the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area;

[0041] The second classification module is used to reclassify the initial test paper category according to the confidence score to obtain a target test paper category.

[0042] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the ovulation test paper detection method of the above-mentioned first aspect when executing the computer program.

[0043] To achieve the above-mentioned purpose, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the ovulation test paper detection method of the above-mentioned first aspect is implemented.

[0044] The ovulation test paper detection method, ovulation test paper detection device, electronic device and computer-readable storage medium proposed in the present application obtain the target ovulation test paper image, perform test paper area detection on the target ovulation test paper image through a preset target detection model, and obtain test paper area detection information, so as to perform different processing steps on the target ovulation test paper image according to the test paper area detection information, and extract the region of interest in the target ovulation test paper image. If the test paper area detection information indicates that the target ovulation test paper image contains a detection area and a control area, the target ovulation test paper image is preliminarily classified according to the test paper area detection information, and the initial test paper category and the confidence score of the initial test paper category are obtained, so as to realize automated ovulation test paper detection, without the need for professional knowledge, and reduce the difficulty of ovulation test paper detection. The initial test paper category is reclassified according to the confidence score to determine a more refined test paper category, obtain the target test paper category, and improve the accuracy of ovulation test paper detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of the ovulation test paper detection method provided in an embodiment of the present application;

[0046] Figure 2 is a flowchart of the training process of the preset target detection model provided in the embodiment of the present application;

[0047] Figure 3 yes Figure 1 Flow chart of step S130 in FIG.

[0048] Figure 4 yes Figure 1 Flow chart of step S140 in FIG.

[0049] Figure 5 yes Figure 4 Flow chart of step S420 in FIG.

[0050] Figure 6 yes Figure 5 Flow chart of step S520 in FIG.

[0051] Figure 7 is another flow chart of the ovulation test paper detection method provided in the embodiment of the present application;

[0052] Figure 8 It is a structural schematic diagram of the ovulation test strip detection device provided in an embodiment of the present application;

[0053] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] Ovulation test strips usually include a test line and a control line. When the ovulation test strip comes into contact with urine, the test line will show a specific color change. By manually comparing the colors of the test line and the control line, the intensity level of luteinizing hormone in urine can be detected, and the test strip category of the ovulation test strip, such as negative or positive, can be obtained. However, ovulation test strip testing requires certain professional knowledge, and there are usually errors in the manual interpretation of the color change of the test strip.

[0058] Based on this, the embodiments of the present application provide an ovulation test paper detection method, an ovulation test paper detection device, an electronic device and a computer-readable storage medium, aiming to improve the accuracy of ovulation test paper detection.

[0059] The ovulation test paper detection method, ovulation test paper detection device, electronic device and computer-readable storage medium provided in the embodiments of the present application are specifically illustrated by the following embodiments. First, the ovulation test paper detection method in the embodiments of the present application is described.

[0060] The ovulation test strip detection method provided in the embodiment of the present application relates to the field of fault detection technology. The ovulation test strip detection method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. Cloud servers; software can be applications that implement ovulation test strip detection methods, etc., but are not limited to the above forms.

[0061] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0062] Figure 1 This is an optional flow chart of an ovulation test paper detection method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S140.

[0063] Step S110, obtaining a target ovulation test paper image;

[0064] Step S120, performing test paper area detection on the target ovulation test paper image by using a preset target detection model to obtain test paper area detection information; the test paper area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test paper image;

[0065] Step S130, if the test paper area detection information indicates that the target ovulation test paper image includes a detection area and a control area, the target ovulation test paper image is preliminarily classified according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category;

[0066] Step S140, reclassifying the initial test paper category according to the confidence score to obtain the target test paper category.

[0067] In step S110 of some embodiments, the target ovulation test paper image is an ovulation test paper image to be tested by the ovulation test paper, which can be obtained by photographing the terminal device. The ovulation test paper usually includes a detection line (detection area, T line), a control line (control area, C line) and a max line. The detection line is closer to the max line, and the control line is farther from the max line. By comparing the colors of the detection line and the control line, the intensity level of luteinizing hormone in urine can be obtained, and then the ovulation period and the safe period of the menstrual cycle can be determined. Therefore, the detection line and the control line play a very important role in the test results of the ovulation test paper.

[0068] In step S120 of some embodiments, in the related art, a regularized image processing technique is usually used to extract the detection line and the control line in the ovulation test paper image, and the extraction effect is easily affected by conditions such as illumination, blur, and different brands of test paper. In order to extract the regions of interest such as the detection area, the control area, etc. of the target ovulation test paper image, and improve the extraction effect of the detection area and the control area, the target ovulation test paper image is subjected to test paper area detection by a preset target detection model to obtain test paper area detection information. The preset target detection model is a pre-trained target detection model, such as a model of the R-CNN series, a model of the YOLO series, etc. The preset target detection model is used to locate and identify one or more target objects in the target ovulation test paper image. The test paper area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test paper image, and the inclusion status is divided into the following four situations: the target ovulation test paper image includes the detection area and the control area, the target ovulation test paper image only includes the detection area and does not include the control area, the target ovulation test paper image only includes the control area and does not include the detection area, and the target ovulation test paper image does not include the detection area and the control area.

[0069] See also Figure 2 In some embodiments, the training process of the preset target detection model may include but is not limited to steps S210 to S280:

[0070] Step S210, obtaining a sample ovulation test paper image and an image label of the sample ovulation test paper image; the image label includes an object position label and an object category label;

[0071] Step S220, extracting features from the sample ovulation test paper image by using a preset detection model to obtain a first feature map, a second feature map, and a third feature map; the feature map sizes of the first feature map, the second feature map, and the third feature map are reduced in sequence;

[0072] Step S230, upsampling the third feature map to obtain a fourth feature map; the fourth feature map has the same feature map size as the second feature map;

[0073] Step S240, upsampling the second feature map to obtain a fifth feature map; the fifth feature map has the same feature map size as the first feature map;

[0074] Step S250, performing feature fusion on the second feature map and the fourth feature map to obtain a first fused feature; performing feature fusion on the first feature map and the fifth feature map to obtain a second fused feature;

[0075] Step S260, predicting the test strip area of ​​the sample ovulation test strip image according to the third feature map, the first fusion feature, and the second fusion feature, to obtain the predicted object position and the predicted object category;

[0076] Step S270, performing loss calculation according to the object position label, the object category label, the predicted object position and the predicted object category to obtain a target loss;

[0077] Step S280, adjusting the model parameters of the preset detection model according to the target loss to obtain the preset target detection model.

[0078] In step S210 of some embodiments, a sample ovulation test strip image and an image label of the sample ovulation test strip image are obtained from a training data set. The sample ovulation test strip image is an ovulation test strip image used to train a preset target detection model. The image label is a label annotated on the sample ovulation test strip image, and the image label includes an object position label and an object category label. The object position label is used to reflect the coordinate position of the target object on the image, and the object category label is used to reflect the category of the target object. The target object includes a detection area and a control area.

[0079] To avoid the extraction effect of different brands of test strips on the region of interest, the sample ovulation test strip images can cover the test strip images of different brands and different color changes (such as red, blue, and black) of the test line and the control line. In order to enable the preset target detection model to cope with scenes such as lighting and blur and improve the robustness of the model, random blur, random contrast, random brightness, random flip, Mosaic, Mixup and other methods are used to enhance the data of the sample ovulation test strip images. For example, random blur refers to randomly extracting a certain proportion of sample ovulation test strip images from the training data set for Gaussian blur, so that the model can adapt to T and C line detection in blurry scenes. Random contrast refers to randomly extracting a certain proportion of sample ovulation test strip images from the training data set for image contrast adjustment, and random brightness refers to randomly extracting a certain proportion of sample ovulation test strip images from the training data set for image brightness adjustment, so that the model can adapt to T and C line detection in lighting scenes. Random flip refers to randomly extracting a certain proportion of sample ovulation test strip images from the training data set for horizontal or vertical flipping, so that the model can adapt to scenes where the relative positions of T and C lines change. A certain proportion can be set according to the actual situation, such as 10%. Mosaic refers to randomly selecting a preset number of sample ovulation test strip images from the training data set and splicing them together to form a new picture to increase the diversity of training data and improve the generalization ability of the model. The preset number of images can be set according to the actual situation, such as four. Mixup refers to randomly selecting two different images from the training data set and mixing and overlapping them in a certain proportion to generate a new picture, making the model more robust.

[0080] In step S220 of some embodiments, the preset detection model can adopt the YOLOX model, and the YOLOX model includes a backbone network, a feature pyramid network (FPN) and three decoupling heads. In order to simplify the YOLOX model and make the YOLOX model portable to terminal devices such as mobile phones and tablet computers, the original CSPDarkNet is replaced by a lightweight shuffleNetv2 as the backbone network. The sample ovulation test paper image is uniformly scaled to a preset size such as 224*224, and the sample ovulation test paper image is feature extracted by the shuffleNetv2 backbone network to obtain an initial feature map. The initial feature map includes color features, texture features, object morphological features, spatial features, etc. of the image. The feature pyramid network includes three parts: a bottom-up path, a top-down path, and a lateral connection. The bottom-up path adopts the shuffleNetv2 network. During the forward propagation process, each layer of the network can output feature maps of different sizes. The deeper the number of layers, the smaller the feature map output, and the richer the image semantic information it contains, which can help roughly detect the target. In order to improve the extraction accuracy of the test line and the control line and reduce the redundant pixel information in the extraction result, the initial feature map is extracted by the shuffleNetv2 network to obtain the first feature map, the second feature map and the third feature map to meet the detection requirements of targets of different scales. The first feature map, the second feature map and the third feature map are feature maps output by different network layers. The depth of the network layer increases successively, and the feature map sizes of the first feature map, the second feature map and the third feature map decrease successively. The first feature map is a feature map of 28*28 size, the second feature map is a feature map of 14*14 size, and the third feature map is a feature map of 7*7 size. It should be noted that the first feature map is the output of the shallow network, which contains less semantic information and has a higher resolution. It can be used for the detection of small-scale targets and helps to accurately detect the location of the target. The second feature map is the output of the middle-layer network and can be used for the detection of middle-scale targets. The third feature map is the output of the deep network, which contains richer semantic information and can be used for the detection of large-scale targets.

[0081] In step S230 of some embodiments, based on the top-down path, the third feature map can be upsampled by an interpolation algorithm to obtain a fourth feature map. The interpolation algorithm can be nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, etc. The fourth feature map has the same feature map size as the second feature map, that is, the feature map of 7*7 size is upsampled to 14*14.

[0082] In step S240 of some embodiments, based on the top-down path, the second feature map may be upsampled by an interpolation algorithm to obtain a fifth feature map. The fifth feature map has the same feature map size as the first feature map, that is, the feature map of size 14*14 is upsampled to 28*28.

[0083] In step S250 of some embodiments, feature fusion is performed on feature maps of the same size based on lateral connections, so that deep semantic information can be transferred to shallow layers and fused, thereby improving the overall target detection effect. Specifically, the second feature map and the fourth feature map are feature fused to obtain a first fused feature. The first fused feature has the same feature map size as the second feature map and the fourth feature map. If the second feature map output by the bottom-up path is represented by F bottom-up,1 , the sampling feature map output from the top-down path, i.e., the fourth feature map, is represented as F top-down,1 , then the first fusion feature is expressed as F1=F bottom-up,1 +F top-down,1 The first feature map and the fifth feature map are fused to obtain the second fused feature. The second fused feature has the same feature map size as the first feature map and the fifth feature map. Considering that most detection lines and control lines are small targets, the feature map of 28*28 size is suitable for the detection of small targets, so the feature fusion formula is improved to F2=F bottom-up,2 +αF top-down,2 , so that the 28*28 feature map can obtain more deep semantic information to reduce the missed detection rate of T and C lines. Among them, F2 represents the second fusion feature, F bottom-up,2 represents the first feature map, F top-down,2 Represents the fifth feature map, α is a constant greater than 1, which is used to amplify deep semantic information.

[0084] In step S260 of some embodiments, the third feature map is input to the first decoupling head for large-scale target prediction, and the first bounding box, the first category and the first confidence of the first bounding box are obtained. The first bounding box is the bounding box predicted by the first decoupling head, the first category is the object category predicted by the first decoupling head, such as the detection area, the control area, etc., and the first confidence indicates the probability of the first bounding box containing the object. The first fused feature is input to the second decoupling head for medium-scale target prediction, and the second bounding box, the second category and the second confidence of the second bounding box are obtained. The second bounding box is the bounding box predicted by the second decoupling head, the second category is the object category predicted by the second decoupling head, and the second confidence indicates the probability of the second bounding box containing the object. The second fused feature is input to the third decoupling head for small-scale target prediction, and the third bounding box, the third category and the third confidence of the third bounding box are obtained. The third bounding box, the third category and the third confidence respectively indicate the probability of the bounding box, the object category and the third bounding box predicted by the third decoupling head. The first bounding box, the second bounding box, and the third bounding box are processed respectively by a non-maximum suppression algorithm to remove overlapping bounding boxes, and the categories and confidences corresponding to the bounding boxes are removed. The prediction results with low confidence are filtered out by a threshold filtering method. The first bounding box, the first category, the second bounding box, the second category, the third bounding box, and the third category obtained after filtering are integrated to obtain a predicted object position and a predicted object category. The predicted object position is the bounding box obtained after integration. The predicted object category is the category obtained after integration. The predicted object position has a target confidence, and the target confidence is the confidence of the bounding box obtained after integration, including the first confidence, the second confidence, or the third confidence.

[0085] In step S270 of some embodiments, the object position label has a true confidence, and the true confidence is used to characterize whether the bounding box represented by the object position label contains the object. The positioning loss is calculated based on the object position label and the predicted object position to obtain the positioning loss. The classification loss is calculated based on the object category label and the predicted object category to obtain the classification loss. The confidence loss is calculated based on the true confidence and the target confidence to obtain the confidence loss. The positioning loss, classification loss and confidence loss are summed to obtain the target loss. The target loss is calculated as follows:

[0086] L=L cls +L obj +λL reg ,

[0087] Where L is the target loss; L cls represents the classification loss; L obj is the confidence loss; L reg is the positioning loss; λ is the balance coefficient of the positioning loss.

[0088] L cls and L obj Both use the binary cross entropy loss function, which is defined as:

[0089]

[0090] Where N is the number of samples; i represents the i-th sample; y represents the true value, which can be the true confidence or the object category label; x represents the predicted value, which can be the target confidence or the predicted object category.

[0091] The calculation method of positioning loss is as follows:

[0092]

[0093] Among them, A is the intersection of the predicted target box (predicted object position) and the real box (object position label); B is the union of the predicted target box and the real box; D is the Euclidean distance between the center of the predicted target box and the center of the real box; Dc is the diagonal distance of the minimum enclosing rectangle formed by the predicted target box and the real box.

[0094] In step S280 of some embodiments, the model parameters of the preset detection model are adjusted by minimizing the target loss to obtain the preset target detection model.

[0095] Through the above steps S210 to S280, a preset target detection model that can cope with the influence of illumination, blur, and different brands of test papers can be obtained, so as to improve the extraction accuracy of the test line and the control line based on the preset target detection model.

[0096] See also Figure 3 In some embodiments, step S130 may include but is not limited to steps S310 to S340:

[0097] Step S310, if the test paper area detection information indicates that the target ovulation test paper image includes a detection area and a control area, the detection area is segmented from the target ovulation test paper image according to the test paper area detection information to obtain a detection area sub-image;

[0098] Step S320, segmenting a control area from the target ovulation test paper image according to the test paper area detection information to obtain a control area sub-image;

[0099] Step S330, stitching the detection area sub-image and the control area sub-image to obtain a stitched image;

[0100] Step S340 , preliminarily classify the spliced ​​image to obtain an initial test paper category and a confidence score.

[0101] In step S310 of some embodiments, if the test paper area detection information indicates that the target ovulation test paper image includes a detection area and a control area, a first position of the detection area and a second position of the control area are obtained from the test paper area detection information. The detection area is segmented from the target ovulation test paper image according to the first position to obtain a detection area sub-image. The detection area sub-image is an image of the detection area.

[0102] If the test strip area detection information indicates that the target ovulation test strip image only includes the detection area but not the control area, or the target ovulation test strip image does not include the detection area and the control area, it means that the target ovulation test strip image is an invalid test strip, and the subsequent recognition process of the target ovulation test strip image is not performed. If the test strip area detection information indicates that the target ovulation test strip image only includes the control area but not the detection area, the target test strip category of the target ovulation test strip image is determined to be negative.

[0103] In step S320 of some embodiments, a control area is segmented from the target ovulation test paper image according to the second position to obtain a control area sub-image. The control area sub-image is an image of the control area. There may be patterns such as flowers in the middle of the T and C lines of different brands of test papers. In order to avoid these patterns interfering with the identification of the test paper category, the detection area and the control area are cropped separately to filter the redundant information in the middle area of ​​the test paper.

[0104] In step S330 of some embodiments, the detection area sub-image and the control area sub-image are spliced, and the middle pixels are supplemented with white pixels with a pixel value of 255, and finally an image to be identified is synthesized to obtain a spliced ​​image. The size of the white pixel is W*H, W is the width of the white pixel, and H is the height of the detection area and the control area. In order to facilitate the subsequent identification of the ovulation test strip, the spliced ​​image is grayed.

[0105] In step S340 of some embodiments, the spliced ​​image is roughly classified by a preset classification model to obtain an initial test paper category and a confidence score. The preset classification model can be Effi cientNetV2, and the initial test paper category is the test paper category predicted by the preset classification model, including five subcategories: negative, weak positive light, weak positive heavy, positive, and strong positive. The confidence score is the probability of the initial test paper category, and the confidence score includes the sub-confidence of the subcategory, and the sub-confidence is the probability of the subcategory output by the preset classification model. The intensity levels of luteinizing hormone represented by these five subcategories increase in sequence.

[0106] The preset classification model is trained according to the following process: collect test strip images containing test lines and control lines of different brands and different color changes (such as red, blue, and black); according to the coordinate information annotated when training the YOLOX model, crop the test lines and control lines respectively to filter out the redundant information in the middle, splice the two and fill the middle pixels with white pixels to obtain a spliced ​​image; grayscale the spliced ​​image to obtain a training sample; divide the obtained training samples into five categories from small to large, namely, Yin, weak positive light, weak positive heavy, Yang, and strong positive, according to the size of the color difference between the test line and the control line, and annotate them to obtain the test strip category. Apply data enhancement methods such as random blur, random contrast, and random brightness to the training samples so that the model can cope with scenes such as lighting and blur, and improve the robustness of the model. Input the training samples into the EfficientNetV2 model for training to obtain the confidence scores of each category. Calculate the loss function based on the confidence score and the deviation of the annotated category. Minimize the loss function and adjust the model parameters of the EfficientNetV2 model so that the model can continuously fit and learn the color difference between the test line and the control line to accurately output the pre-set category and obtain the preset classification model.

[0107] The structure of the EfficientNetV2 model is shown in Table 1. Stage 0 to Stage 6 extract features from the input image, and Stage 7 uses the extracted features to predict the confidence scores of the five test strip strength categories.

[0108] stage operate Step Length Number of channels Number of layers 0 Conv3x3 2 24 1 1 Fused-MBConv1,k3x3 1 24 2 2 Fused-MBConv4,k3x3 2 48 4 3 Fused-MBConv4,k3x3 2 64 4 4 MBConv4,k3x3,SE0.25 2 128 6 5 MBConv6,k3x3,SE0.25 1 160 9 6 MBConv6,k3x3,SE0.25 2 256 15 7 Conv1x1&Pooling&FC 1 1280 1

[0109] Table 1

[0110] Among them, Conv3x3 represents a 3x3 convolution operation, 1 and 4 after the Fused-MBConv module represent the expansion rate, k3x3 represents a 3×3 convolution kernel size, 4 and 6 after the MBConv module represent the expansion rate, and SE represents the SE module. 0.25 means that the number of nodes in the first fully connected layer in the SE module is 1 / 4 of the number of channels of the feature matrix input to the MBConv module. Pooing means pooling the feature map, and FC is a fully connected layer used to output the confidence scores of each category.

[0111] It should be noted that the classification standards for the five test paper strength categories, namely, negative, weak positive light, weak positive heavy, positive, and strong positive, are as follows:

[0112] Negative: T line has no color;

[0113] Weak Yang: The color depth of T line is less than or equal to 1 / 4 of the color depth of C line;

[0114] Weak positive: The color depth of T line is greater than 1 / 4 of the color depth of C line, and less than or equal to 1 / 2 of the color depth of C line;

[0115] Yang: The color depth of T line is greater than 1 / 2 of the color depth of C line, and less than or equal to the color depth of C line;

[0116] Strong Yang: The color depth of T line is greater than the color depth of C line.

[0117] The EfficientNetV2 model has different degrees of difficulty in learning the five strong and weak categories. The boundaries of Yin and Strong Yang are clear and easy to learn, while the boundaries of Weak Yang Light, Weak Yang Heavy, and Yang overlap and are ambiguous, making them difficult to learn. In order to make the model pay more attention to the learning of difficult categories, an improved binary cross entropy loss function is used. The binary cross entropy loss function is defined as follows:

[0118]

[0119] Among them, n represents the nth category; y n is the true value of the nth category, usually 0 or 1; x n is the confidence score predicted for the nth category; α is a weight factor greater than 1.

[0120] In the above steps S310 to S340, by cutting the detection area and the control area respectively, the influence of irrelevant interference of different brands on the test strip category recognition results can be avoided, and the versatility of test strip recognition is improved, so that the ovulation test strip detection method is applicable to test strips of different brands. By preliminarily classifying the spliced ​​images, a rough and objective test strip classification result can be obtained without the need for professional knowledge, avoiding the subjectivity brought by manual interpretation and improving the accuracy of test strip recognition.

[0121] When the test strip recognition result is divided into fewer categories, it is difficult to intuitively display the changes in luteinizing hormone. In order to obtain more detailed test strip recognition results and facilitate users to judge the ovulation period, the embodiment of the present application continues to divide the rough initial test strip categories.

[0122] See also Figure 4 In some embodiments, step S140 may include but is not limited to steps S410 to S420:

[0123] Step S410, selecting a subcategory with the highest confidence from the initial test paper categories to obtain a reference category;

[0124] Step S420, reclassify the reference category to obtain the target test paper category.

[0125] In step S410 of some embodiments, a subcategory with the highest confidence level is selected from the initial test paper category and used as a reference category. The reference category includes a first preset category, a second preset category, or a third preset category, the first preset category is Yin, the second preset category is Weak Yang Light, Weak Yang Heavy, Yang, and the third preset category is Strong Yang.

[0126] In step S420 of some embodiments, in order to obtain a more fine-grained classification result, the reference category is reclassified to map the five categories into eight categories to obtain the target test strip category. The eight categories include negative, weak positive 1, weak positive 2, weak positive 3, weak positive 4, positive, strong positive 1, and strong positive 2. The target test strip category is the final classification result of the ovulation test strip test, which is one of the eight categories.

[0127] Through the above steps S410 to S420, a more fine-grained test strip classification result can be obtained, which improves the accuracy of ovulation test strip detection. As the ovulation test strip recognition results are subdivided into categories, the differences between categories are getting smaller and smaller, and the difficulty of manual labeling is getting greater and greater, which can easily lead to mislabeling and affect the learning effect of the model. By mapping five categories to eight categories, the subdivision of the recognition results is achieved and the problem of difficult labeling is solved.

[0128] See also Figure 5 In some embodiments, step S420 may include but is not limited to step S510, step S520 or step S530:

[0129] Step S510, if the reference category is the first preset category, the reference category is used as the target test paper category;

[0130] Step S520, if the reference category is the second preset category, obtain the subcategory adjacent to the reference category to obtain the first category and the second category; determine the target test paper category according to the first category and the second category; wherein the reference category is located between the first category and the second category;

[0131] Step S530: If the reference category is the third preset category, the reference category is mapped to a new subcategory to obtain a target test paper category.

[0132] In step S510 of some embodiments, if the reference category is negative, the reference category is used as the target test paper category, and the target test paper category is negative.

[0133] In step S520 of some embodiments, if the reference category is weak positive light, a subcategory adjacent to the reference category is obtained, and the first category is Yin and the second category is weak positive heavy. If the reference category is weak positive heavy, a subcategory adjacent to the reference category is obtained, and the first category is weak positive light and the second category is positive. If the reference category is positive, a subcategory adjacent to the reference category is obtained, and the first category is weak positive heavy and the second category is strong positive. The reference category is between the first category and the second category. A new subcategory is obtained based on the first category and the second category to obtain the target test paper category.

[0134] In step S530 of some embodiments, if the reference category is strong positive, the reference category is mapped to a new subcategory, the new subcategory is strong positive 2, and the target test paper category is strong positive 2.

[0135] Through the above steps S510 to S530, the test paper recognition results can be subdivided into categories, so that the intensity change of luteinizing hormone can be easily checked, thereby improving the accuracy of ovulation test paper detection.

[0136] See also Figure 6 In some embodiments, step S520 may include but is not limited to steps S610 to S620:

[0137] Step S610, comparing the sub-confidence of the first category with the sub-confidence of the second category to obtain a comparison result;

[0138] Step S620, obtaining a new subcategory according to the comparison result to obtain a target test paper category; wherein the new subcategory is different from the initial test paper category.

[0139] In step S610 of some embodiments, the sub-confidence of the first category is compared with the sub-confidence of the second category to obtain a comparison result, and the comparison result is used to characterize the size relationship between the sub-confidence of the first category and the sub-confidence of the second category. The comparison result includes that the sub-confidence of the first category is greater than the sub-confidence of the second category, and the sub-confidence of the first category is less than or equal to the sub-confidence of the second category.

[0140] In step S620 of some embodiments, when the first category is negative and the second category is weak positive or heavy, if the sub-confidence of the first category is greater than the sub-confidence of the second category, the new sub-category is weak positive 1, and the target test paper category is weak positive 1; if the sub-confidence of the first category (negative) is less than or equal to the sub-confidence of the second category (weak positive or heavy), the new sub-category is weak positive 2, and the target test paper category is weak positive 2.

[0141] When the first category is weak positive light and the second category is positive, if the sub-confidence of the first category is greater than the sub-confidence of the second category, the new sub-category is weak positive 3, and the target test paper category is weak positive 3; if the sub-confidence of the first category (weak positive light) is less than or equal to the sub-confidence of the second category (positive), the new sub-category is weak positive 4, and the target test paper category is weak positive 4.

[0142] When the first category is weak positive and heavy, and the second category is strong positive, if the sub-confidence of the first category is greater than the sub-confidence of the second category, the new sub-category is positive, and the target test paper category is positive; if the sub-confidence of the first category (weak positive and heavy) is less than or equal to the sub-confidence of the second category (strong positive), the new sub-category is strong positive 1, and the target test paper category is strong positive 1.

[0143] Through the above steps S610 to S620, the original subcategories are mapped to new subcategories, so that fine-grained division of the test paper recognition results can be achieved.

[0144] See also Figure 7 In some embodiments, after step S140, the ovulation test strip detection method may also include but is not limited to steps S710 to S730:

[0145] Step S710, obtaining the test paper usage time of the target ovulation test paper image;

[0146] Step S720, arranging the target ovulation test paper images according to the test paper usage time;

[0147] Step S730, determining the ovulation time according to the target test paper category and the test paper usage time of the arranged target ovulation test paper image.

[0148] In step S710 of some embodiments, the test paper usage time of the target ovulation test paper image is obtained. The test paper usage time is the time when the user uses the ovulation test paper. The shooting time of the target ovulation test paper image can be used. The shooting needs to be performed in the order of the time when the ovulation test paper is used.

[0149] In step S720 of some embodiments, on the result display page, the target ovulation test paper images are arranged from morning to night in the order of the test paper usage time, and the target ovulation test paper images are aligned from top to bottom according to the horizontal axis (x) coordinate of the control line to facilitate viewing and comparing the changes in the luteinizing hormone intensity level, and then determine the ovulation day.

[0150] In step S730 of some embodiments, the ovulation time is the time when the luteinizing hormone changes from strong to weak. If the target test paper category of the current target ovulation test paper image after arrangement is one of strong positive 2, strong positive 1, and positive, and the target test paper category of the next target ovulation test paper image is one of negative, weak positive 1, weak positive 2, weak positive 3, and weak positive 4, the test paper use time of the current target ovulation test paper image is used as the ovulation time.

[0151] The above steps S710 to S730 can quickly, accurately and intuitively determine the ovulation time through sub-classification of test paper categories.

[0152] See also Figure 8 The embodiment of the present application also provides an ovulation test strip detection device, which can implement the above-mentioned ovulation test strip detection method, and the ovulation test strip detection device includes:

[0153] An acquisition module 810 is used to acquire a target ovulation test paper image;

[0154] The detection module 820 is used to perform test strip area detection on the target ovulation test strip image through a preset target detection model to obtain test strip area detection information; the test strip area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test strip image;

[0155] A first classification module 830 is used to perform preliminary classification of the target ovulation test paper image according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category if the test paper area detection information indicates that the target ovulation test paper image includes a detection area and a control area;

[0156] The second classification module 840 is used to reclassify the initial test paper category according to the confidence score to obtain the target test paper category.

[0157] The specific implementation of the ovulation test paper detection device is basically the same as the specific embodiment of the above-mentioned ovulation test paper detection method, and will not be repeated here.

[0158] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above ovulation test strip detection method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.

[0159] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0160] The processor 910 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0161] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the ovulation test strip detection method of the embodiment of this application;

[0162] Input / output interface 930, used to implement information input and output;

[0163] Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0164] bus 950 , which transmits information between the various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );

[0165] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .

[0166] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned ovulation test paper detection method is implemented.

[0167] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0168] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0169] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0170] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0171] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0172] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0173] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0174] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0175] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0176] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0177] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0178] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. An ovulation test paper detection method, characterized in that: The method comprises: Acquire the target ovulation test strip image; Performing test paper area detection on the target ovulation test paper image by using a preset target detection model to obtain test paper area detection information; the test paper area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test paper image; If the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area, the target ovulation test paper image is preliminarily classified according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category; The initial test paper category is reclassified according to the confidence score to obtain a target test paper category.

2. The ovulation test paper detection method according to claim 1, characterized in that: If the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area, the target ovulation test paper image is preliminarily classified according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category, including: If the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area, segmenting the detection area from the target ovulation test paper image according to the test paper area detection information to obtain a detection area sub-image; Segment the control area from the target ovulation test paper image according to the test paper area detection information to obtain a control area sub-image; Performing image stitching on the detection area sub-image and the control area sub-image to obtain a stitched image; The spliced ​​image is preliminarily classified to obtain the initial test paper category and the confidence score.

3. The ovulation test paper detection method according to claim 1, characterized in that: The initial test paper category includes subcategories, the confidence scores include subconfidences of the subcategories, the intensity levels of luteinizing hormone represented by the subcategories increase in sequence, and the initial test paper category is reclassified according to the confidence scores to obtain the target test paper category, including: Select the subcategory with the highest sub-confidence from the initial test paper categories to obtain a reference category; The reference category is classified again to obtain the target test paper category.

4. The ovulation test paper detection method according to claim 3, characterized in that: The reference category includes a first preset category, a second preset category or a third preset category, and the reclassifying the reference category to obtain the target test paper category includes: If the reference category is the first preset category, taking the reference category as the target test paper category; If the reference category is the second preset category, then obtaining a subcategory adjacent to the reference category to obtain a first category and a second category; determining the target test paper category according to the first category and the second category; wherein the reference category is located between the first category and the second category; If the reference category is the third preset category, the reference category is mapped to a new subcategory to obtain the target test paper category.

5. The ovulation test paper detection method according to claim 4, characterized in that: The step of determining the target test paper category according to the first category and the second category includes: Comparing the sub-confidence of the first category with the sub-confidence of the second category to obtain a comparison result; A new subcategory is acquired according to the comparison result to obtain the target test paper category; wherein the new subcategory is different from the initial test paper category.

6. The ovulation test paper detection method according to any one of claims 1 to 5, characterized in that: After the initial test paper category is reclassified according to the confidence score to obtain the target test paper category, the ovulation test paper detection method further includes: Obtaining the test paper usage time of the target ovulation test paper image; Arrange the target ovulation test paper images according to the test paper usage time; The ovulation time is determined according to the target test paper category and the test paper usage time of the arranged target ovulation test paper image.

7. The ovulation test paper detection method according to any one of claims 1 to 5, characterized in that: The preset target detection model is trained by the following steps: Acquire a sample ovulation test strip image and an image label of the sample ovulation test strip image; the image label includes an object position label and an object category label; Performing feature extraction on the sample ovulation test paper image through a preset detection model to obtain a first feature map, a second feature map, and a third feature map; the feature map sizes of the first feature map, the second feature map, and the third feature map are reduced in sequence; Upsampling the third feature map to obtain a fourth feature map; the fourth feature map has the same feature map size as the second feature map; Upsampling the second feature map to obtain a fifth feature map; The fifth feature map has the same feature map size as the first feature map; Performing feature fusion on the second feature map and the fourth feature map to obtain a first fused feature; Performing feature fusion on the first feature map and the fifth feature map to obtain a second fused feature; According to the third feature map, the first fusion feature and the second fusion feature, the test strip area of ​​the sample ovulation test strip image is predicted to obtain a predicted object position and a predicted object category; Calculate the loss based on the object position label, the object category label, the predicted object position, and the predicted object category to obtain a target loss; The model parameters of the preset detection model are adjusted according to the target loss to obtain the preset target detection model.

8. An ovulation test strip detection device, characterized in that: The device comprises: An acquisition module, used for acquiring a target ovulation test strip image; A detection module, used to perform test paper area detection on the target ovulation test paper image through a preset target detection model to obtain test paper area detection information; the test paper area detection information is used to indicate the inclusion status of the detection area and the control area in the target ovulation test paper image; A first classification module is used for preliminarily classifying the target ovulation test paper image according to the test paper area detection information to obtain an initial test paper category and a confidence score of the initial test paper category if the test paper area detection information indicates that the target ovulation test paper image includes the detection area and the control area; The second classification module is used to reclassify the initial test paper category according to the confidence score to obtain a target test paper category.

9. An electronic device, characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the ovulation test paper detection method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the ovulation test paper detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Unmanned aerial vehicle aerial video track high-precision extraction method based on deep learning

    CN110751099A

  • Coarse and fine classification combined image target detection method and related device

    CN113780256A

  • Multi-modal document classification method and system, computer equipment and storage medium

    CN116434245A

  • TICI grading analysis system and method based on intracranial artery positive position image

    CN118096714A

  • Method for evaluation and stabilization over time of classification results

    US20070036428A1

Cited By

  • Method and device for improving positive and negative recognition accuracy of test strip and storage medium

    CN119559624A