A trichomonas detection device, method, apparatus and computer readable storage medium
The trichomonas detection method combining deep convolutional neural networks and optical flow algorithms solves the problems of low efficiency and low accuracy in trichomoniasis detection in gynecological samples, and achieves efficient and accurate trichomonas identification.
Patent Information
- Application Number
- CN202310535055.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-05-12
AI Technical Summary
Existing technologies for trichomoniasis detection are inefficient and inaccurate, especially in gynecological samples where inaccurate background modeling during trichomoniasis motility leads to misidentification and missed identification.
A deep convolutional neural network model combined with an optical flow algorithm was used to detect gynecological endoscopic sample image sequences through a trichomonas detection network model. The optical flow data was used to identify moving trichomonas targets, and the results were fused with static recognition results to improve the accuracy of identification.
It improves the efficiency and accuracy of trichomonas detection, reduces the probability of missed detection, and enhances the accuracy of trichomonas identification by fusing static and moving trichomonas identification results.
Smart Images

Figure CN116503374B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a trichomonad detection device, method, equipment and computer readable storage medium. BACKGROUND
[0002] Trichomonas is a key indicator for judging whether a gynecological sample is pathological. Since trichomonas is similar in appearance to leukocytes and small round epithelial cells, and due to different activity levels, the movement state of trichomonas is irregular, some are stationary, some rotate in place, and some can move a long distance, so trichomonas recognition has always been a research difficulty in automatic gynecological microscopy. The current methods for detecting trichomonas mainly include staining method, culture method, immunological method, etc.
[0003] The above methods are all manually detected by medical personnel, without intelligent processing, and high-efficiency and accurate detection is not achieved. In the existing detection technology, the work efficiency is low, the accuracy is not high, and there is a great influence on further diagnosis in medicine. Using a traditional image background modeling method to recognize trichomonas in a gynecological sample, since the gynecological sample has a certain viscosity, the trichomonas will move with the surrounding substances when moving, thereby causing the foreground area modeled by the background modeling method to be inaccurate, leading to misrecognition of trichomonas; and the background modeling method cannot detect static targets, so low-activity trichomonas is missed. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a trichomonad detection device, method, equipment and computer readable storage medium, which solves the technical problems of low detection efficiency and low accuracy of trichomonas in the prior art.
[0005] To solve the above technical problems, the present application provides a trichomonad detection device, comprising:
[0006] A gynecological microscopy sample image sequence acquisition module is configured to acquire a gynecological microscopy sample image sequence to be detected.
[0007] A moving trichomonad target determination module is configured to detect the gynecological microscopy sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscopy training pictures with trichomonad labels.
[0008] An optical flow data determination module is configured to process the gynecological microscopy sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image.
[0009] A moving trichomonad recognition result determination module is configured to determine a moving trichomonad recognition result according to the target recognition result of each frame of image and the optical flow data of each frame of image.
[0010] Optionally, the trichomonad detection device further comprises:
[0011] The static recognition result acquisition module is configured to acquire a last frame of static recognition result of the microscopy.
[0012] The final trichomonad recognition result determination module is configured to perform fusion processing on the last frame of static recognition result of the microscopy and the motion trichomonad recognition result to obtain a final trichomonad recognition result.
[0013] Optionally, the final trichomonad recognition result determination module comprises:
[0014] The target trichomonad intersection-over-union determination sub-module is configured to determine a target trichomonad intersection-over-union of each motion trichomonad target corresponding to the motion trichomonad recognition result and each static trichomonad target corresponding to the last frame of static recognition result.
[0015] The final trichomonad recognition result determination sub-module is configured to correct the last frame of static recognition result of the microscopy according to the target trichomonad intersection-over-union to obtain the final trichomonad recognition result.
[0016] Optionally, the trichomonad detection device further comprises:
[0017] The gynecological microscopy training picture acquisition module is configured to acquire a gynecological microscopy training picture.
[0018] The gynecological microscopy training picture labeling module is configured to label the gynecological microscopy training picture according to shape features and motion features of trichomonads to obtain the gynecological microscopy training picture with a trichomonad label.
[0019] The trichomonad detection network model training module is configured to train the deep convolutional neural network model according to the gynecological microscopy training picture with a trichomonad label and a gynecological microscopy training picture without a trichomonad label to obtain the trichomonad detection network model.
[0020] Optionally, the trichomonad detection device further comprises:
[0021] The target tracking trajectory determination module is configured to process target recognition results of each frame of image by using a multi-target tracking algorithm to obtain a target tracking trajectory.
[0022] Correspondingly, the motion trichomonad recognition result determination module comprises:
[0023] The motion trichomonad recognition result determination sub-module is configured to determine the motion trichomonad recognition result according to the target tracking trajectory and optical flow data of each frame of image.
[0024] Optionally, the motion trichomonad recognition result determination sub-module comprises:
[0025] The trichomonad motion rule acquisition unit is configured to acquire a trichomonad motion rule, wherein the trichomonad motion rule comprises a motion amplitude and a motion trajectory length.
[0026] The moving trichomonad recognition result determination unit is configured to determine the moving trichomonad recognition result according to the trichomonad motion rule, the optical flow data of each frame of image and the target tracking trajectory.
[0027] Optionally, the moving trichomonad recognition result determination unit comprises:
[0028] The optical flow data determination subunit is configured to determine the optical flow data of the background region and the optical flow data of the target region according to the target tracking trajectory and the optical flow data of each frame of image.
[0029] The motion amplitude determination subunit is configured to determine the target relative motion amplitude according to the difference between the optical flow data of the background region and the optical flow data of the target region.
[0030] The motion count determination subunit is configured to obtain the motion count of the target by using the target motion amplitude and the preset motion amplitude threshold value.
[0031] The moving trichomonad recognition result determination subunit is configured to determine the moving trichomonad recognition result by using the motion count of the target, the target motion trajectory length and a preset ratio threshold value.
[0032] The present application further provides a trichomonad detection method, comprising:
[0033] Acquiring a gynecological microscopy sample image sequence to be detected;
[0034] Detecting the gynecological microscopy sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image, wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscopy training pictures with trichomonad labels;
[0035] Processing the gynecological microscopy sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image;
[0036] Determining a moving trichomonad recognition result according to the target recognition result of each frame of image and the optical flow data of each frame of image.
[0037] The present application further provides a trichomonad detection device, comprising:
[0038] A memory configured to store a computer program;
[0039] A processor configured to implement the steps of the trichomonad detection method described above when executing the computer program.
[0040] The application further provides a computer readable storage medium, wherein computer executable instructions are stored in the computer readable storage medium, and when the computer executable instructions are loaded and executed by a processor, the steps of the trichomonad detection method are implemented.
[0041] It can be seen that the gynecological microscopy sample image sequence to be detected is acquired by the gynecological microscopy sample image sequence to be detected acquisition module; the trichomonad detection network model is used to detect the gynecological microscopy sample image sequence to be detected, so that the target recognition result of each frame of image is obtained; the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscopy training pictures with trichomonad labels; the optical flow algorithm is used to process the gynecological microscopy sample image sequence to be detected, so that the optical flow data of each frame of image is obtained; and the motion trichomonad recognition result is determined according to the target recognition result of each frame of image and the optical flow data of each frame of image. Compared with the current manual medical detection method such as staining method, culture method and immunological method for trichomonad detection, the motion trichomonad target is determined by intelligently detecting the trichomonad by using the trichomonad detection network model, and the optical flow data is determined by combining the optical flow algorithm; the motion trichomonad is detected in multiple aspects according to the motion trichomonad target and the optical flow data, so that the probability of trichomonad missed recognition is reduced.
[0042] In addition, the application further provides a trichomonad detection method, device and computer readable storage medium, which also have the beneficial effects described above. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0044] Figure 1 A structure schematic diagram of a trichomonad detection device provided for an embodiment of the present application;
[0045] Figure 2 A structure schematic diagram of another trichomonad detection device provided for an embodiment of the present application;
[0046] Figure 3 A flowchart of a trichomonad detection method provided for an embodiment of the present application;
[0047] Figure 4A flowchart of another trichomonad detection method provided for an embodiment of the present application is shown in FIG. 6.
[0048] Figure 5 A flowchart of a trichomonad detection model training method provided for an embodiment of the present application is shown in FIG. 7.
[0049] Figure 6 A flowchart of a trichomonad detection method provided for an embodiment of the present application is shown in FIG. 8.
[0050] Figure 7 A structural schematic diagram of a trichomonad detection device provided for an embodiment of the present application is shown in FIG. 9. DETAILED DESCRIPTION
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0052] Reference is made to Figure 1 , Figure 1 A structural schematic diagram of a trichomonad detection device provided for an embodiment of the present application is shown in FIG. 9. The method can include:
[0053] The gynecological microscopy sample image sequence to be detected acquisition module 100 is configured to acquire a gynecological microscopy sample image sequence to be detected.
[0054] The embodiment is not limited to a specific gynecological microscopy sample image sequence to be detected. The gynecological microscopy sample image sequence to be detected in the embodiment can be a continuous image sequence under the same background; or the gynecological microscopy sample image sequence to be detected in the embodiment can be an image sequence within one tracking period.
[0055] The moving trichomonad target determination module 200 is configured to detect the gynecological microscopy sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscopy training pictures with trichomonad labels.
[0056] The embodiment can detect the gynecological microscopy sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image. It can be understood that the trichomonad detection model can detect whether there is a target trichomonad in each frame of image.
[0057] The optical flow data determination module 300 is configured to process the gynecological sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image.
[0058] In this embodiment, the optical flow algorithm can be used to process the gynecological sample image sequence to be detected to obtain optical flow data of each frame of image. In this embodiment, the essence of the optical flow algorithm is the change of pixel brightness in the projection of the movement of objects in a 3D scene to a 2D image plane. Optical flow calculation is to estimate the movement of objects from image data. This embodiment does not limit the specific optical flow algorithm. For example, the optical flow algorithm can be a variational optical flow estimation model, and the objective function of the model is the minimization of an energy function including a data item and a smoothing item. The data item is mainly based on the brightness conservation assumption, that is, the brightness (gray value) of the same pixel point remains unchanged in adjacent two frames of image. Alternatively, the optical flow algorithm can also be an improved Lucas-Kanade algorithm (pyramid layering algorithm) for affine transformation.
[0059] The moving trichomonas identification result determination module 400 is configured to determine a moving trichomonas identification result according to the target identification result of each frame of image and the optical flow data of each frame of image.
[0060] In this embodiment, the optical flow data can be used to determine the movement result of the target subject in each frame of image, and then determine the moving trichomonas identification result. It can be understood that the optical flow data of the target region and the non-target region in each frame of image is different, and the identification result of the moving trichomonas can be determined according to the difference.
[0061] Further, in order to improve the comprehensiveness of trichomonas detection, the above trichomonas detection device can further comprise:
[0062] The static identification result acquisition module is configured to acquire a last frame of static identification result of the microscopy.
[0063] The final trichomonas identification result determination module is configured to perform fusion processing on the last frame of static identification result of the microscopy and the moving trichomonas identification result to obtain a final trichomonas identification result.
[0064] In this embodiment, the last frame of the microscopy image is acquired as the static recognition result. The last frame of the microscopy static recognition result and the motion trichomonad recognition result are fused to obtain the final trichomonad recognition result. It can be understood that there may be uncertain conditions (suspected trichomonads) in the static recognition result. The motion trichomonad recognition result can be fused to the static recognition result to find all trichomonads. Since this method can not only find static trichomonads but also find motion trichomonads, the accuracy of trichomonad recognition is improved. This embodiment does not limit the specific fusion method. For example, the static recognition result can be deleted and added according to the motion trichomonad recognition result; or the motion trichomonad recognition result and the static trichomonad recognition result are directly added, and the total trichomonads are taken as the final trichomonad recognition result.
[0065] Further, in order to improve the accuracy of trichomonad fusion, the final trichomonad recognition result determination module 400 can include:
[0066] a target trichomonad intersection ratio determination sub-module, configured to determine a target trichomonad intersection ratio of each motion trichomonad target corresponding to the motion trichomonad recognition result and each static trichomonad target corresponding to the last frame of the static recognition result;
[0067] a final trichomonad recognition result determination sub-module, configured to correct the last frame of the microscopy static recognition result according to the target trichomonad intersection ratio to obtain the final trichomonad recognition result.
[0068] According to the intersection-over-union of each moving trichomonad target corresponding to the trichomonad recognition result and each static trichomonad target corresponding to the last frame of static recognition result, the last frame of static recognition result of the microscopy is corrected according to the intersection-over-union of the target trichomonad, and the final trichomonad recognition result is obtained. It can be understood that for each moving trichomonad target, the intersection-over-union value of the target trichomonad and the last frame of static recognition target is calculated, if the intersection-over-union value is greater than the first preset threshold and the target category is not trichomonad, the target category is corrected to trichomonad; if the intersection-over-union is less than the first preset threshold, the moving trichomonad recognition result is added to the static recognition target set, and finally the target with the category of trichomonad is taken as the total trichomonad recognition output result. The first preset threshold in the embodiment can be designed according to the actual situation, for example, the first preset threshold can be 0.5; or the first preset threshold can be 0.4. It should be noted that the fusion according to the intersection-over-union is only one of the fusion methods, and the moving trichomonad recognition result and the static trichomonad recognition result can also be directly added together as the final trichomonad recognition result. It should be noted that the appearance of trichomonad is similar to that of white blood cells and small round epithelial cells, which often leads to misidentification of trichomonad as white blood cells or small round epithelial cells in static recognition. However, the latter two are static, so the moving trichomonad can correct the static recognition result, correct the trichomonad misidentified as white blood cells or small round epithelial cells, and further improve the recognition accuracy of trichomonad.
[0069] Further, in order to improve the detection effect of the trichomonad detection network model, the trichomonad detection device described above further comprises:
[0070] A gynecological microscopy training picture acquisition module is configured to acquire gynecological microscopy training pictures.
[0071] A gynecological microscopy training picture labeling module is configured to label the gynecological microscopy training pictures according to the shape features and motion features of trichomonads, so as to obtain the gynecological microscopy training pictures with trichomonad labels.
[0072] A trichomonad detection network model training module is configured to train the deep convolutional neural network model according to the gynecological microscopy training pictures with trichomonad labels and the gynecological microscopy training pictures without trichomonad labels, so as to obtain the trichomonad detection network model.
[0073] The embodiment is not limited to specific gynecological microscopy training pictures, and the gynecological microscopy training pictures are a certain number of gynecological microscopy pictures. For example, the gynecological microscopy pictures are clinical gynecological microscopy pictures containing trichomonads; or the gynecological microscopy pictures are clinical gynecological microscopy pictures containing part of trichomonads.
[0074] It should be noted that the order of the modules and units in the trichomonad detection device described above can be changed without affecting the logic.
[0075] The trichomonad detection device provided by the embodiment of the present application comprises: a gynecological microscope sample image sequence to be detected acquisition module 100, which is configured to acquire a gynecological microscope sample image sequence to be detected; a moving trichomonad target determination module 200, which is configured to detect the gynecological microscope sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscope training pictures with trichomonad labels; a light flow data determination module 300, which is configured to process the gynecological microscope sample image sequence to be detected by using a light flow algorithm to obtain light flow data of each frame of image; and a moving trichomonad recognition result determination module 400, which is configured to determine a moving trichomonad recognition result according to the target recognition result of each frame of image and the light flow data of each frame of image. It can be seen that, compared with the current manual medical detection method for trichomonad detection, such as staining method, culture method and immunological method, the present application uses the trichomonad detection network model to intelligently detect the trichomonad to determine the trichomonad moving target, and combines the light flow algorithm to determine the light flow data; according to the trichomonad moving target and the light flow data, the moving trichomonad is detected, the trichomonad can be detected in multiple aspects, and the probability of trichomonad missed recognition is reduced. Moreover, the static recognition result of the last frame and the moving trichomonad are fused together as the overall trichomonad target, the recognition accuracy of the trichomonad is improved; and the trichomonad is determined according to the intersection over union, the accuracy of trichomonad recognition is improved; and the gynecological microscope training pictures are labeled according to the shape feature and the motion feature of the trichomonad, the deep convolutional neural network model is trained according to the labeled pictures, since the shape feature and the motion feature of the trichomonad are used for labeling, the labeling accuracy is improved, and then the accuracy of model training is improved.
[0076] In order to make the present application more convenient to understand, please refer to the specific description Figure 2 , Figure 2 The structure diagram of another trichomonad detection device provided by the embodiment of the present application can specifically comprise:
[0077] The gynecological microscope sample image sequence to be detected acquisition module 500 is configured to acquire a gynecological microscope sample image sequence to be detected.
[0078] The embodiment takes the gynecological microscope sample image to be checked as the gynecological microscope sample image sequence to be detected.
[0079] The moving trichomonad target determination module 600 is configured to detect the gynecological microscope sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscope training pictures with trichomonad labels.
[0080] The trichomonad detection network model obtained by training a deep convolutional neural network model according to the gynecological microscopy training pictures with trichomonad labels is used to detect the gynecological microscopy sample image sequence to be detected, and the target recognition result of each frame of image is obtained. The embodiment does not limit the specific labeling manner of the gynecological microscopy training picture with trichomonad labels. For example, a machine can be used to attach labels (trichomonads or non-trichomonads) to the gynecological microscopy training pictures; or a person can manually attach labels to the gynecological microscopy training pictures; or the trichomonads and suspected trichomonad targets in the gynecological microscopy training pictures are manually labeled to obtain trichomonad labels.
[0081] The target tracking trajectory determination module 700 is configured to process the target recognition result of each frame of image by using a multi-target tracking algorithm to obtain a target tracking trajectory.
[0082] The multi-target tracking algorithm in the embodiment assigns a name to each target object in each frame of image, and obtains the behavior trajectory of each name. The embodiment does not limit the specific multi-target tracking algorithm. For example, the multi-target tracking algorithm can be a model-free method, the core idea of which is to give an initial detection box in the first frame and track these boxes in subsequent frames; or the multi-target tracking algorithm can also be a tracking by detection (offline learning) method, which generates short trajectories by comparing the similarity between adjacent frames, and then combines the short trajectories into long trajectories. It can be understood that the trichomonad detection network model can be used to determine the target in each frame of image, and then the multi-target tracking algorithm can be used to accurately determine the motion trajectory of the target.
[0083] The optical flow data determination module 800 is configured to process the gynecological microscopy sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image.
[0084] The embodiment processes the gynecological microscopy sample image sequence to be detected by using the optical flow algorithm to obtain the optical flow data of each frame of image.
[0085] The moving trichomonad recognition result determination module 900 is configured to determine the moving trichomonad recognition result according to the target tracking trajectory and the optical flow data of each frame of image.
[0086] The embodiment analyzes the motion state of each target (trichomonad recognized by the deep convolutional model) in the tracking period based on the optical flow data and the target tracking trajectory to obtain the moving trichomonad.
[0087] Further, in order to improve the accuracy of the trichomonad motion recognition result, the above-mentioned moving trichomonad recognition result determination module 900 can include:
[0088] The trichomonad motion rule acquisition unit is configured to acquire a trichomonad motion rule, wherein the trichomonad motion rule comprises a motion amplitude and a motion trajectory length.
[0089] The moving trichomonad recognition result determination unit is configured to determine the moving trichomonad recognition result according to the trichomonad motion rule, the optical flow data of each frame of image, and the target tracking trajectory.
[0090] In this embodiment, the specific trichomonad motion rule is not limited, as long as it comprises a motion amplitude and a motion trajectory length. For example, the motion amplitude can be 0.5, and the motion trajectory length can be 1; or the motion amplitude can be 0.7, and the motion trajectory length can be 5.
[0091] Further, in order to improve the accuracy of the moving trichomonad recognition result, the moving trichomonad recognition result determination unit can comprise:
[0092] The optical flow data determination subunit is configured to determine the optical flow data of the background region and the optical flow data of the target region according to the target tracking trajectory and the optical flow data of each frame of image.
[0093] The motion amplitude determination subunit is configured to determine the target relative motion amplitude according to the difference between the optical flow data of the background region and the optical flow data of the target region.
[0094] The motion count determination subunit is configured to obtain the motion count of the target by using the target motion amplitude and the preset motion amplitude threshold value.
[0095] The moving trichomonad recognition result determination subunit is configured to determine the moving trichomonad recognition result by using the motion count of the target, the target motion trajectory length, and the preset ratio threshold value.
[0096] The embodiment determines the optical flow data of the background region and the optical flow data of the target region according to the target tracking trajectory and the optical flow data of each frame of image, determines the target relative motion amplitude according to the difference between the optical flow data of the background region and the optical flow data of the target region, obtains the target motion count by using the target motion amplitude and a preset motion amplitude threshold, and determines the motion trichomonad recognition result by using the target motion count, the target motion trajectory length and a preset ratio threshold. The embodiment does not limit the specific preset motion amplitude threshold, for example, the preset motion amplitude threshold can be 0.7; or the preset motion amplitude threshold can also be 0.5. The preset ratio threshold in the embodiment refers to the ratio of the motion count to the motion trajectory length, which can be set according to requirements. It can be understood that, for example, the optical flow data of the background (non-target region) and each target region in each frame of image is counted; for each target region, the difference between the optical flow data thereof and the background optical flow data is calculated to obtain the relative motion amplitude of the target; when the relative motion amplitude is greater than a threshold t1, the current frame motion count is set to 1, the motion count of the target in the tracking period is counted, and if the ratio of the count to the trajectory length is greater than a threshold t2, the target is determined as a motion trichomonad. According to the measured data, t1 and t2 are respectively set to 0.7 and 0.5. t1 and t2 in the embodiment can be set according to the actual motion state of the current trichomonad.
[0097] It should be noted that the order of the modules and units in the trichomonad detection device described above can be changed without affecting the logic.
[0098] The trichomonad detection device provided by the embodiment includes: a gynecological microscope sample image sequence to be detected acquisition module 500, configured to acquire a gynecological microscope sample image sequence to be detected; a motion trichomonad target determination module 600, configured to detect the gynecological microscope sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscope training pictures with trichomonad labels; a target tracking trajectory determination module 700, configured to process the target recognition result of each frame of image by using a multi-target tracking algorithm to obtain a target tracking trajectory; an optical flow data determination module 800, configured to process the gynecological microscope sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image; and a motion trichomonad recognition result determination module 900, configured to determine the motion trichomonad recognition result according to the target tracking trajectory and the optical flow data of each frame of image. It can be seen that, compared with the current detection of trichomonads only by artificial medical methods, the multi-target tracking algorithm is used to process the recognition result of each frame in the present application, so that the tracking trajectory of all targets can be accurately obtained, and the accuracy of determining the motion trichomonad recognition result according to the optical flow data and the target tracking trajectory is improved; and the detection accuracy is improved according to the motion rules of trichomonads in multiple aspects.
[0099] The following describes a trichomonad detection method provided by an embodiment of the present application. The trichomonad detection method described below can be used in conjunction with the trichomonad detection device described above.
[0100] For a better understanding of the present application, reference will be made to the following detailed description of embodiments of the present application. Figure 3 , Figure 3 A flowchart of the trichomonad detection method provided by an embodiment of the present application can include the following steps.
[0101] S300, obtaining a trichomonad detection image sequence of a gynecological sample.
[0102] S301, detecting the trichomonad detection image sequence of the gynecological sample using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model using gynecological examination training pictures with trichomonad labels.
[0103] S302, processing the trichomonad detection image sequence of the gynecological sample using an optical flow algorithm to obtain optical flow data of each frame of image.
[0104] S303, determining a moving trichomonad recognition result according to the target recognition result of each frame of image and the optical flow data of each frame of image.
[0105] Further, in order to improve the comprehensiveness of trichomonad recognition, after determining the moving trichomonad recognition result according to the target recognition result of each frame of image and the optical flow data of each frame of image, the method can further include:
[0106] obtaining a last frame of static recognition result of the gynecological examination;
[0107] performing fusion processing on the last frame of static recognition result of the gynecological examination and the moving trichomonad recognition result to obtain a final trichomonad recognition result.
[0108] Further, in order to improve the accuracy of trichomonad recognition, the fusion processing on the last frame of static recognition result of the gynecological examination and the moving trichomonad recognition result to obtain a final trichomonad recognition result can include:
[0109] a target trichomonad intersection-over-union ratio of each moving trichomonad target corresponding to the moving trichomonad recognition result and each static trichomonad target corresponding to the last frame of static recognition result of the gynecological examination;
[0110] correcting the last frame of static recognition result of the gynecological examination according to the target trichomonad intersection-over-union ratio to obtain a final trichomonad recognition result.
[0111] Further, in order to improve the accuracy of the trichomonad detection network model training, before the trichomonad detection network model is used to detect the gynecological microscope sample image sequence to be detected, the target recognition result of each frame image is obtained, it can also include:
[0112] Obtain gynecological microscope training pictures;
[0113] According to the shape feature and motion feature of the trichomonad, the gynecological microscope training pictures are labeled to obtain gynecological microscope training pictures with trichomonad labels;
[0114] According to the gynecological microscope training pictures with trichomonad labels and the gynecological microscope training pictures without trichomonad labels, the deep convolutional neural network model is trained to obtain the trichomonad detection network model.
[0115] The trichomonad detection method provided by the embodiment of the application comprises the following steps: obtaining a gynecological microscope sample image sequence to be detected; using a trichomonad detection network model to detect the gynecological microscope sample image sequence to be detected, and obtaining a target recognition result of each frame image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscope training pictures with trichomonad labels; using an optical flow algorithm to process the gynecological microscope sample image sequence to be detected, and obtaining optical flow data of each frame image; and determining a motion trichomonad recognition result according to the target recognition result of each frame image and the optical flow data of each frame image. Compared with the trichomonad detection by using the current staining method, culture method, immunological method and other artificial medical detection methods, the trichomonad detection network model is used to intelligently detect the trichomonad motion target, the optical flow algorithm is combined to determine the optical flow data, the motion trichomonad is detected from multiple aspects according to the trichomonad motion target and the optical flow data, and the probability of trichomonad missed recognition is reduced. Moreover, the static recognition result of the last frame and the motion trichomonad are fused together as the overall trichomonad target, the recognition accuracy of the trichomonad is improved, the trichomonad is determined according to the intersection over union, the accuracy of the trichomonad recognition is improved, the gynecological microscope training pictures are labeled according to the shape feature and motion feature of the trichomonad, the deep convolutional neural network model is trained according to the labeled pictures, the labeling accuracy is improved due to the labeling according to the shape feature and motion feature of the trichomonad, and the model training accuracy is improved.
[0116] In order to make the application more convenient to understand, please refer to Figure 4 , Figure 4 The flowchart of another trichomonad detection method provided by the embodiment of the application can specifically include the following steps:
[0117] S400, obtaining a gynecological microscope sample image sequence to be detected.
[0118] S401, detecting the gynecological examination sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to a gynecological examination training picture with a trichomonad label.
[0119] S402, processing the target recognition result of each frame of image by using a multi-target tracking algorithm to obtain a target tracking trajectory.
[0120] S403, processing the gynecological examination sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image.
[0121] S404, determining a moving trichomonad recognition result according to the target tracking trajectory and the optical flow data of each frame of image.
[0122] Further, in order to improve the accuracy of trichomonad recognition, the above-mentioned determining a moving trichomonad recognition result according to the target tracking trajectory and the optical flow data of each frame of image can include:
[0123] obtaining a trichomonad motion rule; wherein the trichomonad motion rule includes a motion amplitude and a motion trajectory length;
[0124] determining a moving trichomonad recognition result according to the trichomonad motion rule, the optical flow data of each frame of image and the target tracking trajectory.
[0125] Further, in order to improve the comprehensiveness of moving trichomonad recognition, the above-mentioned determining a moving trichomonad recognition result according to the trichomonad motion rule, the optical flow data of each frame of image and the target tracking trajectory can include:
[0126] determining optical flow data of a background region and optical flow data of a target region according to the target tracking trajectory and the optical flow data of each frame of image;
[0127] determining a target relative motion amplitude according to a difference between the optical flow data of the background region and the optical flow data of the target region;
[0128] obtaining a target motion count by using the target motion amplitude and a preset motion amplitude threshold;
[0129] determining a moving trichomonad recognition result by using the target motion count, a target motion trajectory length and a preset ratio threshold.
[0130] Compared with the current method of detecting trichomonads only by artificial medical methods, the trichomonad detection method provided by the embodiment of the application can accurately obtain the tracking trajectories of all targets by processing the recognition result of each frame by using a multi-target tracking algorithm, thereby improving the accuracy of determining a moving trichomonad recognition result according to optical flow data and a target tracking trajectory; and the detection accuracy is improved by detecting according to the motion rules of trichomonads in multiple aspects.
[0131] For the sake of better understanding the present application, please refer to the Figure 5 , Figure 5 A flowchart of an example of a method for training a model for detecting motile trichomonas according to an embodiment of the present application is shown in FIG. 2, which can include the following steps:
[0132] S500, obtaining sample data; wherein the sample data is a clinical gynecological microscopy picture containing trichomonas.
[0133] S501, performing trichomonas labeling on the sample data to obtain labeled sample data; the trichomonas labeling includes labeling trichomonas and suspected trichomonas targets.
[0134] In this embodiment, trichomonas and suspected trichomonas in the clinical gynecological microscopy picture are labeled.
[0135] S502, training a deep convolutional neural network model using the labeled sample data to obtain a model for detecting motile trichomonas.
[0136] For the sake of better understanding the present application, please refer to the Figure 6 , Figure 6 A flowchart of an example of a method for detecting trichomonas according to an embodiment of the present application is shown in FIG. 3, which can include the following steps:
[0137] S600, detecting each frame of image in a gynecological microscopy sample to be detected using the model for detecting motile trichomonas to obtain an initial motile trichomonas detection result.
[0138] S601, processing the initial motile trichomonas detection result using a multi-target tracking algorithm to obtain target tracking trajectories of all trichomonas targets.
[0139] S602, processing each frame of image in the gynecological microscopy sample to be detected using an optical flow algorithm to obtain optical flow data of each frame.
[0140] S603, based on the optical flow data and the target tracking trajectories, analyzing the motion state of each target in a tracking period to determine a motile trichomonas identification result.
[0141] In this embodiment, the motile trichomonas is obtained by counting the motion of the target in the tracking period. The specific steps are as follows: counting the optical flow data of the background (non-target region) and each target region in each frame of image; for each target region, calculating the difference between the optical flow data of the target region and the background optical flow data to obtain the relative motion amplitude of the target; when the relative motion amplitude is greater than a threshold t1, the motion count of the current frame is set to 1, the motion count of the target in the tracking period is counted, and if the ratio of the count to the length of the trajectory is greater than a threshold t2, the target is determined to be a motile trichomonas. In this embodiment, t1 and t2 are set to 0.7 and 0.5 respectively according to the measured data.
[0142] S604, acquire the last frame static trichomonad recognition result on the microscope instrument.
[0143] The embodiment considers that the microscope instrument displays the overall recognition result of the trichomonad on the last frame, and thus acquires the last frame static trichomonad recognition result on the microscope instrument.
[0144] S605, determine the final trichomonad recognition result according to the intersection-over-union of the moving trichomonad recognition result and the last frame static trichomonad recognition result.
[0145] The embodiment calculates the intersection-over-union of each moving trichomonad target and the trichomonad target recognized in the last frame, and if the intersection-over-union is greater than 0.5 and the category of the trichomonad target is not trichomonad, the category of the trichomonad target is corrected to trichomonad; if the intersection-over-union is less than 0.5, the trichomonad target is added to the static recognition target set; and finally, the target with the category of trichomonad is taken as the overall trichomonad recognition output result.
[0146] It can be understood that the last frame static recognition result and the moving trichomonad are fused together as the overall trichomonad target, mainly considering two aspects: first, the trichomonad has a moving behavior based on the multi-frame information of the optical flow and the tracking trajectory; and second, the appearance of the trichomonad is similar to that of the white blood cell and the small round epithelial cell, which leads to the frequent misrecognition of the trichomonad as the white blood cell or the small round epithelial cell in the static recognition, but the latter two are static, and thus the moving trichomonad can correct the static recognition result, correct the trichomonad misrecognized as the white blood cell or the small round epithelial cell, and further improve the recognition accuracy of the trichomonad.
[0147] Next, a trichomonad detection device provided by the embodiment of the present application is described, and the trichomonad detection device described below can be correspondingly referred to the trichomonad detection device described above.
[0148] Please refer to Figure 7 , Figure 7 The structure diagram of the trichomonad detection device provided by the embodiment of the present application can include:
[0149] The memory 10 is used to store the computer program;
[0150] The processor 20 is used to execute the computer program to realize the trichomonad detection method described above.
[0151] The memory 10, the processor 20 and the communication interface 30 all complete the communication among each other through the communication bus 40.
[0152] In the embodiment of the present application, the memory 10 is used to store one or more programs, and the program can include the program code including the computer operation instruction. In the embodiment of the present application, the memory 10 can store the program used to realize the following functions:
[0153] obtain a gynecological microscope sample image sequence to be detected;
[0154] detect the gynecological microscope sample image sequence to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to a gynecological microscope training picture with a trichomonad label;
[0155] process the gynecological microscope sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image;
[0156] determine a moving trichomonad recognition result according to the target recognition result of each frame of image and the optical flow data of each frame of image.
[0157] In a possible implementation, the memory 10 can include a program storage area and a data storage area, wherein the program storage area can store an operating system, and application programs required by at least one function, etc.; and the data storage area can store data created in the use process.
[0158] In addition, the memory 10 can include a read-only memory and a random access memory, and provide instructions and data for the processor. A part of the memory can also include an NVRAM. The memory stores an operating system and operation instructions, executable modules or data structures, or a subset of them, or an extended set of them, wherein the operation instructions can include various operation instructions for implementing various operations. The operating system can include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0159] The processor 20 can be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, and the processor 20 can be a microprocessor or any conventional processor, etc. The processor 20 can invoke the program stored in the memory 10.
[0160] The communication interface 30 can be an interface of a communication module, used for connecting with other devices or systems.
[0161] Of course, it should be noted that, Figure 7 The structures shown do not constitute a limitation on the trichomonad detection device in the embodiments of the present application, and in actual applications, the trichomonad detection device can include more or fewer components than Figure 7 those shown, or combine certain components.
[0162] The computer readable storage medium provided by the embodiments of the present application is introduced as follows, and the computer readable storage medium described below can be mutually corresponding with the trichomonad detection method described above.
[0163] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the trichomonas detection method.
[0164] The computer readable storage medium can include a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
[0165] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0166] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized by hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0167] Finally, it should be noted that in this paper, relationships such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device.
[0168] The trichomonas detection device, method, equipment and computer readable storage medium provided by the application are described in detail above, the principles and implementation manners of the application are described by applying specific examples in this paper, and the above example description is only used to help understand the method of the application and the core idea thereof; meanwhile, for those skilled in the art, according to the idea of the application, the specific implementation manners and application ranges will be changed, and the above description should not be understood as the limitation of the application.
Claims
1. A trichomonas detection device, characterized by, The method comprises the following steps: An image sequence of a gynecological sample to be detected is obtained; A motion trichomonad target determination module is used to detect the image sequence of the gynecological sample to be detected by using a trichomonad detection network model to obtain a target recognition result of each frame of image; wherein the trichomonad detection network model is a model obtained by training a deep convolutional neural network model according to gynecological examination training pictures with a trichomonad label; the trichomonad detection model is a model for detecting trichomonads in each frame of image; An optical flow data determination module is used to process the image sequence of the gynecological sample to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image; the optical flow algorithm is a variational optical flow estimation model; A target tracking trajectory determination module is used to process the target recognition result of each frame of image by using a multi-target tracking algorithm to obtain a target tracking trajectory; A motion trichomonad recognition result determination module is used to obtain a trichomonad motion rule; wherein the trichomonad motion rule comprises a motion amplitude and a motion trajectory length; the motion trichomonad recognition result is determined according to the trichomonad motion rule, the optical flow data of each frame of image and the target tracking trajectory.
2. The trichomonad detection device of claim 1, wherein The above-mentioned trichomonad detection device further comprises: A static recognition result acquisition module is used to obtain a last frame of static recognition result of the gynecological examination; A final trichomonad recognition result determination module is used to perform fusion processing on the last frame of static recognition result of the gynecological examination and the motion trichomonad recognition result to obtain a final trichomonad recognition result.
3. The trichomonad detection device of claim 2, wherein, The final trichomonad recognition result determination module comprises: A target trichomonad intersection-over-union determination sub-module is used to determine a target trichomonad intersection-over-union of each motion trichomonad target corresponding to the motion trichomonad recognition result and each static trichomonad target corresponding to the last frame of static recognition result of the gynecological examination; A final trichomonad recognition result determination sub-module is used to correct the last frame of static recognition result of the gynecological examination according to the target trichomonad intersection-over-union to obtain the final trichomonad recognition result.
4. The trichomonad detection device of claim 1, wherein The above-mentioned trichomonad detection device further comprises: A gynecological examination training picture acquisition module is used to obtain gynecological examination training pictures; A gynecological examination training picture labeling module is used to label the gynecological examination training pictures according to the shape features and motion features of trichomonads to obtain the gynecological examination training pictures with a trichomonad label; A trichomonad detection network model training module is used to train the deep convolutional neural network model according to the gynecological examination training pictures with a trichomonad label and gynecological examination training pictures without a trichomonad label to obtain the trichomonad detection network model.
5. The trichomonad detection device of claim 1, wherein The motion trichomonad recognition result determination unit comprises: An optical flow data determination sub-unit is used to determine the optical flow data of a background region and the optical flow data of a target region according to the target tracking trajectory and the optical flow data of each frame of image; A motion amplitude determination sub-unit is used to determine a target relative motion amplitude according to the difference between the optical flow data of the background region and the optical flow data of the target region; A motion count determination sub-unit is used to obtain the motion count of the target by using the target motion amplitude and a preset motion amplitude threshold value; The motion trichomonas recognition result determination subunit is configured to determine the motion trichomonas recognition result by using the target motion count, the target motion trajectory length, and a preset ratio threshold.
6. A method of trichomonad detection, characterized by, The method comprises: obtaining a gynecological microscope sample image sequence to be detected; detecting the gynecological microscope sample image sequence to be detected by using a trichomonas detection network model to obtain a target recognition result of each frame of image; wherein the trichomonas detection network model is a model obtained by training a deep convolutional neural network model according to gynecological microscope training pictures with trichomonas labels; and the trichomonas detection model is a model for detecting trichomonas in each frame of image; processing the gynecological microscope sample image sequence to be detected by using an optical flow algorithm to obtain optical flow data of each frame of image; wherein the optical flow algorithm is a variational optical flow estimation model; processing the target recognition result of each frame of image by using a multi-target tracking algorithm to obtain a target tracking trajectory; obtaining a trichomonas motion rule; wherein the trichomonas motion rule comprises a motion amplitude and a motion trajectory length; determining the motion trichomonas recognition result according to the trichomonas motion rule, the optical flow data of each frame of image, and the target tracking trajectory.
7. A trichomonas detection apparatus characterized by comprising: The method comprises: a memory for storing a computer program; a processor for executing the computer program to implement the trichomonas detection method of claim 6.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and the computer executable instructions are loaded and executed by the processor to implement the trichomonas detection method of claim 6.
Citation Information
Patent Citations
Microorganism detection device and method, electronic equipment and storage medium
CN114913524A
Motion based pathogen detection using a fluidic imager
US20210398296A1