Cleanness detection method and device, computer equipment and endoscope system

By calculating the recoiling speed of intestinal video clips and combining with the preset cleanliness recognition algorithm, the problem of inaccurate intestinal cleanliness detection methods is solved, real-time and accurate detection of intestinal cleanliness is achieved, and the detection results are improved. Accuracy and stability.

CN119168934APending Publication Date: 2024-12-20CHANGZHOU UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311270053.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Traditional intestinal cleanliness detection methods cannot accurately detect intestinal cleanliness, resulting in inaccurate test results.

Method used

By obtaining the recoiling speed of multiple intestinal video clips, the recoiling speed of each video clip is calculated, and the detection is carried out based on the preset cleanliness recognition algorithm and the weight of the video clips is carried out to generate cleanliness detection results, and comprehensively consider real-time recoiling. Speed ​​to improve detection accuracy.

Benefits of technology

Real-time and accurate detection of intestinal cleanliness is achieved, and the inaccurate detection results caused by changes in the recoil rate in traditional methods is avoided, and the accuracy and stability of the detection results are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168934A_ABST
    Figure CN119168934A_ABST
Patent Text Reader

Abstract

The invention relates to a cleanliness detection method and device, computer equipment and an endoscope system. The method comprises the following steps: acquiring a plurality of intestinal tract video clips of a to-be-detected intestinal tract; each intestinal tract video clip comprises a plurality of frames of intestinal tract decapsulation images; according to a preset cleanliness recognition algorithm and the mirror retreating speed of the multiple intestinal video clips, cleanliness detection is carried out on the multiple intestinal video clips, and cleanliness detection results corresponding to all the intestinal video clips are generated; and determining a cleanliness detection result of the to-be-detected intestinal tract based on the cleanliness detection result corresponding to each intestinal tract video clip. By adopting the method, the cleanliness of the intestinal tract can be accurately detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of endoscopes, and in particular to a cleanliness detection method, device, computer equipment and endoscope system. Background Art

[0002] With the development of endoscope technology, endoscopes can be widely used in the medical field. For example, during a colonoscopy, the endoscope system corresponding to the endoscope can be used to detect the cleanliness of the intestine. Accurate detection of the cleanliness of the intestine is crucial for subsequent colonoscopy.

[0003] In traditional technology, multiple image frames are input into a trained deep learning model to detect intestinal cleanliness and obtain intestinal cleanliness detection results.

[0004] However, the traditional intestinal cleanliness detection method has the problem of not being able to accurately detect intestinal cleanliness. Summary of the invention

[0005] Based on this, it is necessary to provide a cleanliness detection method, device, computer equipment and endoscope system that can accurately detect the cleanliness of the intestine in response to the above-mentioned technical problems.

[0006] In a first aspect, the present application provides a cleanliness detection method. The method comprises:

[0007] Acquire multiple intestinal video clips of the intestinal tract to be detected; each of the intestinal video clips includes multiple frames of intestinal deconvoluted images;

[0008] According to a preset cleanliness recognition algorithm and the retraction speeds of the plurality of intestinal video segments, the plurality of intestinal video segments are subjected to cleanliness detection, and a cleanliness detection result corresponding to each of the intestinal video segments is generated;

[0009] Based on the cleanliness detection results corresponding to each of the intestinal video clips, the cleanliness detection result of the intestinal tract to be detected is determined.

[0010] In one embodiment, the cleanliness detection of the plurality of intestinal video segments is performed according to a preset cleanliness recognition algorithm and the retraction speed of the plurality of intestinal video segments, and the cleanliness detection result corresponding to each of the intestinal video segments is generated, including:

[0011] Obtaining the retraction speed of the plurality of intestinal video segments;

[0012] Determining a preset image weight corresponding to each of the intestinal video segments according to a retraction speed of each of the intestinal video segments;

[0013] According to the preset cleanliness recognition algorithm and the preset image weights corresponding to each of the intestinal video clips, cleanliness detection is performed on the multiple intestinal video clips to generate cleanliness detection results corresponding to each of the intestinal video clips.

[0014] In one embodiment, obtaining the retraction speed of the plurality of intestinal video segments includes:

[0015] Calculating the image similarity between each adjacent intestinal endoscopic image according to the image information of each adjacent intestinal endoscopic image in each intestinal video segment;

[0016] Calculating the relative withdrawal speed between each adjacent intestinal tract withdrawal image according to the image similarity between each adjacent intestinal tract withdrawal image;

[0017] Based on the relative retraction speed between each adjacent intestinal retraction image in each intestinal video segment, the retraction speed of each intestinal video segment is determined respectively.

[0018] In one embodiment, obtaining the retraction speed of the plurality of intestinal video segments includes:

[0019] According to the image information of each adjacent intestinal defocused image in each intestinal video segment, respectively calculate the Hamming distance between each adjacent intestinal defocused image;

[0020] According to the Hamming distance between each adjacent intestinal tract withdrawal image, respectively calculate the relative withdrawal speed between each adjacent intestinal tract withdrawal image;

[0021] Based on the relative receding speed between each adjacent receding intestinal image, the receding speed of each intestinal video segment is determined respectively.

[0022] In one embodiment, the cleanliness detection of the plurality of intestinal video segments is performed according to the preset cleanliness recognition algorithm and the preset image weights corresponding to the intestinal video segments, and the cleanliness detection results corresponding to the intestinal video segments are generated, including:

[0023] Inputting each of the intestinal video clips into a preset deep learning model for cleanliness detection, and generating intermediate detection results for each of the intestinal video clips;

[0024] According to the intermediate detection results of each of the intestinal video clips and the preset image weights corresponding to each of the intestinal video clips, the cleanliness detection results corresponding to each of the intestinal video clips are generated.

[0025] In one embodiment, the preset deep learning model includes a first preset deep learning model, and the first preset deep learning model is used to perform cleanliness detection on the intestinal de-mirror image; the inputting each of the intestinal video clips into the preset deep learning model for cleanliness detection, and generating an intermediate detection result of each of the intestinal video clips, comprises:

[0026] Inputting each of the intestinal de-mirror images in the intestinal video clip into the first preset deep learning model for cleanliness detection, and generating initial detection results of each of the intestinal de-mirror images;

[0027] Calculation is performed based on the initial detection results of each of the intestinal de-mirror images to obtain intermediate detection results of each of the intestinal video clips.

[0028] In one embodiment, determining the preset image weight corresponding to each of the intestinal video segments according to the de-focusing speed of each of the intestinal video segments includes:

[0029] According to the proportion of the fade-out speed of each of the intestinal video segments in the fade-out speeds of the multiple intestinal video segments, the preset image weight corresponding to each of the intestinal video segments is determined.

[0030] In a second aspect, the present application also provides a cleanliness detection device. The device comprises:

[0031] An acquisition module, used for acquiring a plurality of intestinal video segments of the intestinal tract to be detected; each of the intestinal video segments includes a plurality of frames of intestinal deconvoluted images;

[0032] A cleanliness detection module, configured to perform cleanliness detection on the plurality of intestinal video segments according to a preset cleanliness recognition algorithm and the retraction speeds of the plurality of intestinal video segments, and generate a cleanliness detection result corresponding to each of the intestinal video segments;

[0033] The cleanliness detection result determination module is used to determine the cleanliness detection result of the intestinal tract to be detected based on the cleanliness detection result corresponding to each of the intestinal video clips.

[0034] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method in any one of the embodiments of the first aspect are implemented.

[0035] In a fourth aspect, the present application further provides an endoscope system, comprising: a display, a light source device, an endoscope, and the computer device in the third aspect above.

[0036] The above-mentioned cleanliness detection method, device, computer equipment and endoscope system can perform cleanliness detection on multiple intestinal video clips according to the preset cleanliness recognition algorithm and the obtained withdrawal speed of multiple intestinal video clips of the intestinal tract to be detected, and generate cleanliness detection results corresponding to each intestinal video clip. That is, in the process of performing cleanliness detection on the intestinal tract to be detected, the present application can comprehensively consider the real-time withdrawal speed when observing the intestinal tract to be detected, thereby avoiding the problem of inaccurate intestinal cleanliness detection results caused by changes in real-time withdrawal speed in traditional methods. Therefore, the present application can obtain real-time and accurate cleanliness detection results corresponding to each intestinal video clip. Furthermore, based on the real-time and accurate cleanliness detection results corresponding to each intestinal video clip, the cleanliness detection results of the intestinal tract to be detected can be more accurately determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A diagram showing an application environment of a cleanliness detection method in an embodiment;

[0038] Figure 2 A schematic diagram of a cleanliness detection method according to an embodiment;

[0039] Figure 3 A schematic diagram of a process for generating a cleanliness detection result in one embodiment;

[0040] Figure 4 It is a schematic diagram of a process of performing cleanliness detection on a plurality of intestinal video clips in one embodiment;

[0041] Figure 5 FIG. 1 is a flow chart of a first mirror-retracting speed determination step in one embodiment;

[0042] Figure 6 is a schematic flow chart of a second mirror-retracting speed determination step in one embodiment;

[0043] Figure 7 is a schematic flow chart of a cleanliness detection method in an optional embodiment;

[0044] Figure 8 A schematic diagram of the result of Boston scoring of intestinal cleanliness corresponding to an intestinal demicroscope image in one embodiment;

[0045] Fig. 9 is a structural block diagram of a cleanliness detection device in one embodiment;

[0046] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0047] 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.

[0048] With the development of endoscope technology, endoscopes can be widely used in the medical field. Endoscopes are a common medical device. Under the operation of a doctor, the endoscope can enter the patient's internal cavity to obtain image data inside the cavity, thereby determining the location of the patient's lesions. For example, during a colonoscopy, the endoscope system corresponding to the endoscope can be used to detect the cleanliness of the intestine. Accurate detection of the cleanliness of the intestine is crucial for subsequent colonoscopy.

[0049] In the traditional technology, multiple image frames are input into a trained deep learning model to detect the intestinal cleanliness and obtain the intestinal cleanliness detection result. However, the traditional intestinal cleanliness detection method has the problem of not being able to accurately detect the intestinal cleanliness.

[0050] The cleanliness detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the endoscope system 100 includes a computer device 102, an endoscope 104, a display 106, and a light source device 108. The computer device 102 is connected to the endoscope 104 in communication, and the computer device 102 can be an image processing device. In other embodiments, the computer device 102 and the endoscope 104 can also be indirectly connected in communication. For example, the computer device 102 can also communicate with the light source device 108 by itself, and the light source device 108 communicates with the endoscope 104 to achieve the communication connection between the computer device 102 and the endoscope 104. The doctor can use the endoscope 104 to obtain the internal cavity image of the patient's body, and perform image processing on the collected internal cavity image through the image processing device, and then the image processing device sends the internal cavity image to the display 106 for display, thereby realizing the inspection of the internal cavity. The computer device 102 obtains multiple intestinal video clips of the intestine to be tested; each intestinal video clip includes multiple frames of intestinal fade-out images; the computer device 102 performs cleanliness detection on the multiple intestinal video clips according to a preset cleanliness recognition algorithm and the fade-out speeds of the multiple intestinal video clips, and generates cleanliness detection results corresponding to each intestinal video clip; the computer device 102 determines the cleanliness detection result of the intestine to be tested based on the cleanliness detection results corresponding to each intestinal video clip.

[0051] In one embodiment, Figure 2 As shown, a cleanliness detection method is provided, which is applied to Figure 1 The computer device 102 in the example is used as an example to illustrate, and the following steps are included:

[0052] S220, obtaining a plurality of intestinal video segments of the intestinal tract to be detected; each intestinal video segment includes a plurality of frames of intestinal deconvoluted images.

[0053] The intestinal tract to be inspected refers to the intestinal tract that needs to be inspected for cleanliness, and each intestinal video clip includes multiple frames of intestinal de-mirror images. Optionally, the computer device 102 can obtain multiple intestinal video clips of the intestinal tract to be inspected from a preset database; or, the computer device 102 can also obtain multiple intestinal video clips of the intestinal tract to be inspected at regular intervals through the endoscope 104; or, the computer device 102 can also obtain multiple intestinal video clips of the intestinal tract to be inspected in real time through the endoscope 104. Of course, the embodiment of the present application does not limit the method of obtaining multiple intestinal video clips.

[0054] S240, performing cleanliness detection on the plurality of intestinal video segments according to a preset cleanliness recognition algorithm and the retraction speeds of the plurality of intestinal video segments, and generating a cleanliness detection result corresponding to each intestinal video segment.

[0055] Among them, the preset cleanliness recognition algorithm may include but is not limited to the Boston scoring method, the preset deep learning algorithm, the image matching algorithm, etc. The BBPS score is a 4-point system, and the 4-point system includes four scores of BBPS0, BBPS1, BBPS2, and BBPS3, and the intestinal cleanliness scored as BBPS3 is the best (i.e., the intestinal preparation is the most ideal), the intestinal cleanliness scored as BBPS2 is slightly worse than the intestinal cleanliness scored as BBPS3, the intestinal cleanliness scored as BBPS1 is slightly worse than the intestinal cleanliness scored as BBPS2, and the intestinal cleanliness scored as BBPS0 is the worst (i.e., the intestinal preparation is the least ideal). The preset deep learning model is a trained deep learning model, and the preset deep learning model is used to detect the cleanliness of intestinal video clips or intestinal de-mirror images. The preset deep learning model may include but is not limited to a convolutional neural network model (CNN), a three-dimensional convolutional neural network model (3D CNN), etc. The de-mirror speed of the intestinal video clip is the mirror speed when observing the intestine. The cleanliness detection result corresponding to each intestinal video clip refers to the cleanliness score corresponding to each intestinal video clip.

[0056] Optionally, the computer device 102 may first perform cleanliness detection on multiple intestinal video clips according to a preset cleanliness recognition algorithm to generate an intermediate cleanliness detection result corresponding to each intestinal video clip; then adjust the intermediate cleanliness detection result corresponding to each intestinal video clip according to the withdrawal speed of each intestinal video clip, thereby generating a cleanliness detection result corresponding to each intestinal video clip. Alternatively, the computer device 102 may first determine the weight corresponding to each intestinal video clip according to the withdrawal speed of each intestinal video clip; then perform cleanliness detection on multiple intestinal video clips according to the weight corresponding to each intestinal video clip and a preset cleanliness recognition algorithm to generate a cleanliness detection result corresponding to each intestinal video clip.

[0057] S260, determining the cleanliness detection result of the intestine to be detected based on the cleanliness detection result corresponding to each intestinal video clip.

[0058] Optionally, since the intestinal tract to be detected includes multiple intestinal video clips, the computer device 102 can determine the cleanliness detection result of the intestinal tract to be detected based on the cleanliness detection result corresponding to each intestinal video clip. Exemplarily, the computer device 102 can calculate the weighted average or average value of the cleanliness detection result corresponding to each intestinal video clip, and use the weighted average or average value of multiple cleanliness detection results as the cleanliness detection result of the intestinal tract to be detected. Wherein, the cleanliness detection result of the intestinal tract to be detected refers to the cleanliness score corresponding to the intestinal tract to be detected including multiple intestinal video clips. Exemplarily, the cleanliness detection result in this application can be expressed as the Boston score of intestinal cleanliness. The Boston score of intestinal cleanliness (Boston Bowel Preparation Scale, BBPS) is referred to as BBPS score, and the BBPS score is used to evaluate the cleanliness of the intestinal tract. In general, the better the cleanliness of the intestinal tract, the higher the BBPS score.

[0059] In the above-mentioned cleanliness detection method, cleanliness detection can be performed on multiple intestinal video clips according to a preset cleanliness recognition algorithm and the obtained withdrawal speeds of multiple intestinal video clips of the intestinal tract to be detected, and cleanliness detection results corresponding to each intestinal video clip can be generated. That is, in the process of performing cleanliness detection on the intestinal tract to be detected, the present application can comprehensively consider the real-time withdrawal speed when observing the intestinal tract to be detected, thereby avoiding the problem of inaccurate intestinal cleanliness detection results caused by changes in real-time withdrawal speed in traditional methods. Therefore, the present application can obtain real-time and accurate cleanliness detection results corresponding to each intestinal video clip. Furthermore, based on the real-time and accurate cleanliness detection results corresponding to each intestinal video clip, the cleanliness detection results of the intestinal tract to be detected can be more accurately determined.

[0060] In the above embodiment, it involves performing cleanliness detection on multiple intestinal video clips according to a preset cleanliness recognition algorithm and the retraction speed of multiple intestinal video clips, and generating cleanliness detection results corresponding to each intestinal video clip. The specific method is introduced below. In one embodiment, Figure 3 As shown, S240 includes:

[0061] S320, obtaining the retraction speeds of the multiple intestinal video segments.

[0062] Optionally, the computer device 102 can use a preset withdrawal speed calculation method to determine the withdrawal speed between each adjacent frame of the intestinal withdrawal image based on the image information of each adjacent frame of the intestinal withdrawal image in each intestinal video segment. Thus, the computer device 102 can determine the withdrawal speed of the intestinal video segment corresponding to each adjacent frame of the intestinal withdrawal image according to the withdrawal speed between each adjacent frame of the intestinal withdrawal image in the intestinal video segment. In this way, the withdrawal speed of multiple intestinal video segments can be obtained. Exemplarily, the preset withdrawal speed calculation method may include but is not limited to a calculation method based on image similarity, a calculation method based on Hamming distance, etc. Of course, the embodiment of the present application does not limit the preset withdrawal speed calculation method.

[0063] S340: Determine a preset image weight corresponding to each intestinal video segment according to the de-focusing speed of each intestinal video segment.

[0064] Optionally, the computer device 102 can determine the preset image weight corresponding to each intestinal video segment according to the withdrawal speed of each intestinal video segment. Exemplarily, the computer device 102 can determine the stop time for the doctor to view each intestinal video segment according to the withdrawal speed of each intestinal video segment. Assuming that the correspondence between the stop time and the preset image weight is preset, the computer device 102 can determine the preset image weight corresponding to each intestinal video segment according to the stop time for the doctor to view each intestinal video segment and the correspondence between the stop time and the preset image weight. It should be noted that the stop time for the doctor to view each intestinal video segment and the preset image weight corresponding to the intestinal video segment are generally inversely correlated, that is, it can be understood that if the doctor's stop time for viewing the intestinal video segment is longer, the preset image weight corresponding to the intestinal video segment is smaller.

[0065] In one exemplary embodiment, S340 includes:

[0066] According to the proportion of the fade-out speed of each intestinal video segment in the fade-out speeds of the multiple intestinal video segments, the preset image weight corresponding to each intestinal video segment is determined.

[0067] Optionally, the computer device 102 may determine the preset image weight corresponding to each intestinal video segment according to the proportion of the fade-out speed of each intestinal video segment in the fade-out speed of multiple intestinal video segments. The calculation formula for determining the preset image weight corresponding to the intestinal video segment is shown in the following formula.

[0068]

[0069] Among them, k i represents the preset image weight corresponding to the i-th intestinal video segment, v i represents the de-focusing speed of the i-th intestinal video segment, v j represents the de-focusing speed of the jth intestinal video segment, and n represents the number of multiple intestinal video segments.

[0070] For example, when the doctor observes the i-th intestinal video segment, if the camera stop time is long, the calculated camera withdrawal speed v of the i-th intestinal video segment is i is smaller, at this time, the preset image weight corresponding to the i-th intestinal video segment is smaller; if the doctor stops the camera for a shorter time for the i-th intestinal video segment, the calculated retraction speed v of the i-th intestinal video segment is i is larger, at this time, the preset image weight corresponding to the i-th intestinal video segment is larger. In this way, the influence of the withdrawal speed on the intestinal cleanliness detection result can be avoided, thereby improving the accuracy, stability and objectivity of the intestinal cleanliness detection result.

[0071] S360, performing cleanliness detection on the plurality of intestinal video segments according to a preset cleanliness recognition algorithm and preset image weights corresponding to each intestinal video segment, and generating a cleanliness detection result corresponding to each intestinal video segment.

[0072] Optionally, the computer device 102 may perform cleanliness detection on each intestinal video segment according to a preset cleanliness recognition algorithm and a preset image weight corresponding to each intestinal video segment, and generate a cleanliness detection result corresponding to each intestinal video segment. Thus, cleanliness detection results corresponding to multiple intestinal video segments can be obtained. In one exemplary embodiment, S360 includes:

[0073] Each intestinal video clip is input into a preset deep learning model for cleanliness detection to generate intermediate detection results for each intestinal video clip.

[0074] Optionally, the computer device 102 may directly input each intestinal video clip into a preset deep learning model for cleanliness detection, and generate an intermediate detection result for each intestinal video clip; or, the computer device 102 may also pre-process each intestinal video clip first, and then input each pre-processed intestinal video clip into a preset deep learning model for cleanliness detection, and generate an intermediate detection result for each intestinal video clip. Among them, the preset deep learning model is a trained deep learning model for cleanliness detection of intestinal video clips or intestinal de-mirror images. The intermediate detection result of the intestinal video clip refers to the cleanliness detection result obtained only based on the preset deep learning model, and the intermediate detection result at this time has not yet considered the de-mirror speed of each intestinal video clip.

[0075] According to the intermediate detection results of each intestinal video segment and the preset image weights corresponding to each intestinal video segment, the cleanliness detection results corresponding to each intestinal video segment are generated.

[0076] Optionally, the computer device 102 can generate the cleanliness detection result corresponding to each intestinal video segment according to the intermediate detection result of each intestinal video segment and the preset image weight corresponding to each intestinal video segment. Exemplarily, the product of the intermediate detection result of the intestinal video segment and the preset image weight corresponding to the intestinal video segment can be used as the cleanliness detection result corresponding to the intestinal video segment. Then, the calculation formula of the cleanliness detection result of the intestinal tract to be detected including each intestinal video segment can be expressed as the following formula.

[0077]

[0078] Among them, S represents the cleanliness test result of the intestine to be tested, n represents the number of multiple intestinal video clips, k i represents the preset image weight corresponding to the i-th intestinal video segment, S i represents the intermediate detection result of the i-th intestinal video segment.

[0079] like Figure 4 As shown, Figure 4 FIG. 1 is a flow chart of a cleanliness detection process for multiple intestinal video segments in one embodiment. Assuming that the duration of each intestinal video segment is 10 seconds, Figure 4 , the fade-out speed of intestinal video segment 0 is v0, and the intermediate detection result of intestinal video segment 0 is S0; the fade-out speed of intestinal video segment 1 is v1, and the intermediate detection result of intestinal video segment 1 is S1; the fade-out speed of intestinal video segment 2 is v2, and the intermediate detection result of intestinal video segment 2 is S2; ...; the fade-out speed of intestinal video segment n is vn, and the intermediate detection result of intestinal video segment n is Sn.

[0080] In this embodiment, the withdrawal speeds of multiple intestinal video clips are obtained; according to the withdrawal speeds of each intestinal video clip, the preset image weights corresponding to each intestinal video clip that matches the withdrawal speed can be more accurately determined. Therefore, according to the preset cleanliness recognition algorithm and the preset image weights corresponding to each intestinal video clip that matches the withdrawal speed of each intestinal video clip, the cleanliness of multiple intestinal video clips can be detected respectively, and the cleanliness detection results corresponding to each intestinal video clip can be generated. Therefore, the influence of the withdrawal speed on the intestinal cleanliness detection results can be avoided, thereby improving the accuracy, stability and objectivity of the intestinal cleanliness detection results.

[0081] In the above embodiment, it is involved to obtain the retraction speed of multiple intestinal video segments, and the specific method thereof is introduced below. Figure 5 As shown, S320 includes:

[0082] S520, calculating the image similarities between the adjacent intestinal retracement images according to the image information of each adjacent intestinal retracement image in each intestinal video segment.

[0083] Optionally, the computer device 102 can obtain the image information of each adjacent intestinal endoscopic image in each intestinal video segment. Thus, the computer device 102 can calculate the image similarity between each adjacent intestinal endoscopic image based on the image information of each adjacent intestinal endoscopic image in each intestinal video segment. Among them, the image information may include but is not limited to pixel mean, pixel variance, oblique variance, etc. Image similarity is used to characterize the structural similarity between each adjacent intestinal endoscopic image. The calculation formula for the image similarity between each adjacent intestinal endoscopic image is shown as follows.

[0084]

[0085] Among them, S(x,y) represents the structural similarity (SSIM) between adjacent intestinal deconvolution images, μ x represents the pixel mean of the intestinal deconvoluted image x, y represents the pixel mean of the intestinal defocused image y, σ x represents the pixel variance of the intestinal deconvoluted image x, y represents the pixel variance of the intestinal defocused image y, σ xy represents the oblique variance between the intestinal de-mirror image x and the intestinal de-mirror image y, and c1 and c2 represent constants used to maintain stability.

[0086] S540, calculating the relative withdrawal speeds between each adjacent intestinal tract withdrawal image according to the image similarity between each adjacent intestinal tract withdrawal image.

[0087] Optionally, the computer device 102 can calculate the relative withdrawal speed between each adjacent intestinal withdrawal image according to the image similarity between each adjacent intestinal withdrawal image. The relative withdrawal speed refers to the camera movement speed when observing each adjacent intestinal withdrawal image in the intestine. The calculation formula of the relative withdrawal speed between each adjacent intestinal withdrawal image is shown as follows.

[0088]

[0089] Among them, v(x,y) represents the relative withdrawal speed between adjacent intestinal withdrawal images, and the relative withdrawal speed ranges from 0 to 1; when the intestinal withdrawal image x and the intestinal withdrawal image y are the same image, the relative withdrawal speed between the intestinal withdrawal image x and the intestinal withdrawal image y is 0. The interpretations of the remaining parameters can refer to the interpretations in the above formula, and will not be repeated here.

[0090] S560, based on the relative fading speed between each adjacent intestinal tract fading image in each intestinal tract video segment, respectively determine the fading speed of each intestinal tract video segment.

[0091] Optionally, the computer device 102 can determine the withdrawal speed of each intestinal video segment based on the relative withdrawal speed between each adjacent intestinal withdrawal image in each intestinal video segment. Exemplarily, the computer device 102 can calculate the weighted average or average value of the relative withdrawal speed between each adjacent intestinal withdrawal image in each intestinal video segment, and use the weighted average or average value of the relative withdrawal speed as the withdrawal speed of the intestinal video segment. In this way, the withdrawal speed of each intestinal video segment can be obtained.

[0092] In this embodiment, the image similarity between each adjacent intestinal retrieval image is calculated based on the image information of each adjacent intestinal retrieval image in each intestinal video segment. According to the relationship between the image similarity and the relative retrieval speed between each adjacent intestinal retrieval image, the relative retrieval speed between each adjacent intestinal retrieval image can be more accurately calculated. Thus, based on the more accurate relative retrieval speed between each adjacent intestinal retrieval image in each intestinal video segment, the retrieval speed of each intestinal video segment can be more accurately determined.

[0093] In the above embodiment, it is involved to obtain the retraction speed of multiple intestinal video segments, and the specific method thereof is introduced below. Figure 6 As shown, S320 includes:

[0094] S620, calculating the Hamming distances between adjacent intestinal defocused images according to the image information of adjacent intestinal defocused images in each intestinal video segment.

[0095] Optionally, the computer device 102 can obtain image information of each adjacent intestinal mirror image in each intestinal video clip. Among them, the image information may include but is not limited to the hash value of each intestinal mirror image. Exemplarily, the process of calculating the hash value of the intestinal mirror image can be: the first step is to reduce the intestinal mirror image to 8x8 pixels. The second step is to convert the reduced intestinal mirror image into a 64-level grayscale image. The third step is to calculate the grayscale average of 64 pixels in the 64-level grayscale image. The fourth step is to compare the grayscale values ​​of 64 pixels in the 64-level grayscale image with the grayscale average of 64 pixels respectively to obtain a comparison result. The fifth step is to record the pixel whose grayscale value is greater than the grayscale average as 1, and the pixel whose grayscale value is less than or equal to the grayscale average as 0, thereby obtaining a sequence, which includes 64 numerical values ​​(the numerical value can be 0 or 1). The sixth step is to generate a 64-bit integer based on the sequence, and use the 64-bit integer as the hash value of the intestinal mirror image.

[0096] Thus, the computer device 102 can calculate the Hamming distance between each adjacent intestinal retracement image according to the image information of each adjacent intestinal retracement image in each intestinal video segment. The Hamming distance is used to characterize the number of different characters included in the corresponding positions of two strings of the same length, that is, the Hamming distance can represent the similarity between each adjacent intestinal retracement image. The calculation formula of the Hamming distance between each adjacent intestinal retracement image is shown as follows.

[0097] Dis(x,y)=D(Hash(z),Hash(y)) (5)

[0098] Among them, Dis(x,y) represents the Hamming distance between the intestinal de-mirror image x and the intestinal de-mirror image y, D(Hash(),Hash()) represents the functional relationship between the hash value and the Hamming distance, Hash() represents the hash value of the intestinal de-mirror image x, and Hash() represents the hash value of the intestinal de-mirror image y.

[0099] S640, calculating the relative withdrawal speeds between adjacent intestinal withdrawal images according to the Hamming distances between adjacent intestinal withdrawal images.

[0100] Optionally, the computer device 102 can calculate the relative withdrawal speed between each adjacent intestinal withdrawal image according to the Hamming distance between each adjacent intestinal withdrawal image. The relative withdrawal speed refers to the speed of the camera when observing each adjacent intestinal withdrawal image in the intestine. The calculation formula of the relative withdrawal speed between each adjacent intestinal withdrawal image is shown as follows.

[0101] v(x,y)=1-Dis(x,y) (6)

[0102] Among them, v(x,y) represents the relative withdrawal speed between adjacent intestinal withdrawal images, and the relative withdrawal speed ranges from 0 to 1; when the intestinal withdrawal image x and the intestinal withdrawal image y are the same image, the relative withdrawal speed between the intestinal withdrawal image x and the intestinal withdrawal image y is 0. The interpretations of the remaining parameters can refer to the interpretations in the above formula, and will not be repeated here.

[0103] S660, based on the relative fading speeds between adjacent intestinal tract fading images, respectively determine the fading speeds of the intestinal tract video segments.

[0104] Optionally, the computer device 102 can determine the withdrawal speed of each intestinal video segment based on the relative withdrawal speed between each adjacent intestinal withdrawal image in each intestinal video segment. Exemplarily, the computer device 102 can calculate the weighted average or average value of the relative withdrawal speed between each adjacent intestinal withdrawal image in each intestinal video segment, and use the weighted average or average value of the relative withdrawal speed as the withdrawal speed of the intestinal video segment. In this way, the withdrawal speed of each intestinal video segment can be obtained.

[0105] In this embodiment, the Hamming distance between each adjacent intestinal retrieval image is calculated based on the image information of each adjacent intestinal retrieval image in each intestinal video segment. The relative retrieval speed between each adjacent intestinal retrieval image can be more accurately calculated based on the Hamming distance between each adjacent intestinal retrieval image. Therefore, the retrieval speed of each intestinal video segment can be more accurately determined based on the more accurate relative retrieval speed between each adjacent intestinal retrieval image.

[0106] In the above embodiment, it involves inputting each intestinal video clip into a preset deep learning model for cleanliness detection, and generating intermediate detection results of each intestinal video clip. The specific method is introduced below. In one embodiment, the preset deep learning model includes a first preset deep learning model, which is used to perform cleanliness detection on the intestinal de-mirror image; inputting each intestinal video clip into the preset deep learning model for cleanliness detection, and generating intermediate detection results of each intestinal video clip, including:

[0107] Each intestinal de-mirror image in the intestinal video clip is respectively input into the first preset deep learning model for cleanliness detection to generate initial detection results for each intestinal de-mirror image.

[0108] Among them, the preset deep learning model may include a first preset deep learning model, and the first preset deep learning model is used to perform cleanliness detection on the intestinal de-mirror image. Exemplarily, the first preset deep learning model may be a convolutional neural network model (CNN). Exemplarily, the computer device 102 may first divide the intestine to be detected into multiple intestinal video segments according to a preset duration (for example, 10 seconds). Thus, for each intestinal video segment in the multiple intestinal video segments, the computer device 102 may input each intestinal de-mirror image in the intestinal video segment into the first preset deep learning model for cleanliness detection, and generate an initial detection result for each intestinal de-mirror image. Among them, the initial detection result is the detection result obtained by performing a cleanliness detection on each intestinal de-mirror image based on the first preset deep learning model.

[0109] Optionally, the computer device 102 may directly input each intestinal retardation image in each intestinal video clip into the first preset deep learning model for cleanliness detection, and generate initial detection results of each intestinal retardation image. Alternatively, the computer device 102 may also pre-process each intestinal retardation image in each intestinal video clip first; and then input each pre-processed intestinal retardation image into the first preset deep learning model for cleanliness detection, and generate initial detection results of each intestinal retardation image.

[0110] The calculation is performed based on the initial detection results of each intestinal de-mirror image to obtain the intermediate detection results of each intestinal video segment.

[0111] Optionally, the computer device 102 may calculate the average value of the initial detection results of each intestinal image according to the initial detection results of each intestinal image in each intestinal video clip, and use the average value of the initial detection results of each intestinal image as the intermediate detection result of the intestinal video clip. Alternatively, the computer device 102 may also determine the minimum value of the initial detection results of each intestinal image (i.e., the minimum value of the initial intestinal cleanliness score) according to the initial detection results of each intestinal image in each intestinal video clip, and use the minimum value of the initial detection results of each intestinal image as the intermediate detection result of the intestinal video clip. Thus, the intermediate detection results of each intestinal video clip can be obtained.

[0112] In this embodiment, each intestinal de-mirror image in the intestinal video segment is input into the first preset deep learning model for cleanliness detection, which can generate a relatively accurate initial detection result of each intestinal de-mirror image. Therefore, based on the relatively accurate initial detection result of each intestinal de-mirror image, the intermediate detection result of each intestinal video segment can be obtained relatively accurately.

[0113] In the above embodiment, it involves inputting each intestinal video clip into a preset deep learning model for cleanliness detection, and generating intermediate detection results of each intestinal video clip. The specific method is introduced below. In one embodiment, the preset deep learning model includes a second preset deep learning model, and the second preset deep learning model is used to perform cleanliness detection on the intestinal video clip; each intestinal video clip is input into the preset deep learning model for cleanliness detection, and the intermediate detection results of each intestinal video clip are generated, including:

[0114] Each intestinal video clip is directly input into the second preset deep learning model for cleanliness detection to generate intermediate detection results for each intestinal video clip.

[0115] Among them, the preset deep learning model may include a second preset deep learning model, and the second preset deep learning model is used to perform cleanliness detection on the intestinal video clips. Exemplarily, the second preset deep learning model may be a three-dimensional convolutional neural network model (three dimensional Convolutional Neural Networks, 3D CNN). Exemplarily, the computer device 102 may first divide the intestinal tract to be detected into multiple intestinal video clips according to a preset duration (e.g., 10 seconds). Thus, the computer device 102 can directly input each intestinal video clip into the second preset deep learning model for cleanliness detection, and generate intermediate detection results for each intestinal video clip. Among them, the initial detection result is the detection result obtained by performing cleanliness detection on each intestinal video clip based on the second preset deep learning model.

[0116] Optionally, the computer device 102 may directly input each intestinal video segment into the second preset deep learning model for cleanliness detection, and generate an intermediate detection result for each intestinal video segment. Alternatively, the computer device 102 may pre-process each intestinal video segment first, and then input the pre-processed intestinal video segment into the second preset deep learning model for cleanliness detection, and generate an intermediate detection result for each intestinal video segment.

[0117] In this embodiment, since the second preset deep learning model can directly perform cleanliness detection on the intestinal video clips, each intestinal video clip can be directly input into the second preset deep learning model for cleanliness detection, so as to generate more accurate intermediate detection results for each intestinal video clip.

[0118] In an optional embodiment, if Figure 7 As shown, a cleanliness detection method is provided, which is applied to computer equipment 102. The cleanliness detection method includes:

[0119] S702, obtaining a plurality of intestinal video segments of the intestinal tract to be detected; each intestinal video segment includes a plurality of frames of intestinal defocused images;

[0120] S704, calculating the image similarity between each adjacent intestinal de-mirror image according to the image information of each adjacent intestinal de-mirror image in each intestinal video segment;

[0121] S706, calculating the relative withdrawal speed between each adjacent intestinal tract withdrawal image according to the image similarity between each adjacent intestinal tract withdrawal image;

[0122] S708, determining the fade-out speed of each intestinal video segment based on the relative fade-out speed between each adjacent intestinal fade-out image in each intestinal video segment;

[0123] S710, calculating the Hamming distance between each adjacent intestinal defocused image according to the image information of each adjacent intestinal defocused image in each intestinal video segment;

[0124] S712, calculating the relative withdrawal speed between each adjacent intestinal withdrawal image according to the Hamming distance between each adjacent intestinal withdrawal image;

[0125] S714, determining the fade-out speed of each intestinal video segment based on the relative fade-out speed between each adjacent intestinal fade-out image;

[0126] S716, determining a preset image weight corresponding to each intestinal video segment according to a proportion of the fade-out speed of each intestinal video segment in the fade-out speeds of the multiple intestinal video segments;

[0127] S718, inputting each intestinal de-mirror image in the intestinal video clip into a first preset deep learning model for cleanliness detection, and generating an initial detection result of each intestinal de-mirror image;

[0128] S720, performing calculations based on the initial detection results of each intestinal de-mirror image to obtain an intermediate detection result of each intestinal video segment;

[0129] S722, generating a cleanliness detection result corresponding to each intestinal video segment according to the intermediate detection result of each intestinal video segment and the preset image weight corresponding to each intestinal video segment;

[0130] S724, determining the cleanliness detection result of the intestine to be detected based on the cleanliness detection result corresponding to each intestinal video segment.

[0131] In the above-mentioned cleanliness detection method, cleanliness detection can be performed on multiple intestinal video clips according to a preset cleanliness recognition algorithm and the obtained withdrawal speeds of multiple intestinal video clips of the intestinal tract to be detected, and cleanliness detection results corresponding to each intestinal video clip can be generated. That is, in the process of performing cleanliness detection on the intestinal tract to be detected, the present application can comprehensively consider the real-time withdrawal speed when observing the intestinal tract to be detected, thereby avoiding the problem of inaccurate intestinal cleanliness detection results caused by changes in real-time withdrawal speed in traditional methods. Therefore, the present application can obtain real-time and accurate cleanliness detection results corresponding to each intestinal video clip. Furthermore, based on the real-time and accurate cleanliness detection results corresponding to each intestinal video clip, the cleanliness detection results of the intestinal tract to be detected can be more accurately determined.

[0132] Based on the above embodiments, it can be known that, first, the present application can combine the speed of withdrawing the colonoscope with the intestinal cleanliness score obtained based on the preset deep learning model, and use the withdrawal speed of each intestinal video clip to calculate the preset image weight, so that the final intestinal cleanliness score can be determined according to the intestinal cleanliness score obtained by the preset deep learning model and the preset image weight. Therefore, the influence of the speed of withdrawing the colonoscope (i.e., the speed of moving the colonoscope) on the intestinal cleanliness score can be eliminated, that is, the problem of repeated calculation of the intestinal cleanliness score of the intestinal video clip due to the slow withdrawal speed of the colonoscope can be avoided, which leads to a large error in the overall intestinal cleanliness score of the intestine to be tested. Second, the present application can use a preset deep learning model to score the intestinal cleanliness in real time, so it can prompt the endoscopist to perform flushing work in time.

[0133] Third, the cleanliness test results in this application can be expressed as the Boston score for intestinal cleanliness. Figure 8 As shown, Figure 8 The result schematic diagram of the Boston score of intestinal cleanliness corresponding to the intestinal de-microscope image in one embodiment. Among them, the BBPS score is a 4-point system, which includes four scores of BBPS0, BBPS1, BBPS2, and BBPS3, and the intestinal cleanliness scored as BBPS3 is the best (that is, the intestinal preparation is the most ideal), the intestinal cleanliness scored as BBPS2 is slightly worse than the intestinal cleanliness scored as BBPS3, the intestinal cleanliness scored as BBPS1 is slightly worse than the intestinal cleanliness scored as BBPS2, and the intestinal cleanliness scored as BBPS0 is the worst (that is, the intestinal preparation is the least ideal). Figure 8The images in the image are sorted from left to right in the order of BBPS scores from low to high. Based on this, compared with the traditional Boston score for intestinal cleanliness, the present application can reduce the operational difficulty of the traditional BBPS score while retaining the 4-point system of the traditional BBPS. This is because the traditional method needs to identify the intestinal part before obtaining the BBPS score. However, the process of identifying the intestinal part is very difficult. Therefore, the process of obtaining the BBPS score by the traditional method is more difficult. The present application can divide the intestine to be detected into multiple intestinal video clips, and obtain the BBPS score of each intestinal video clip in the multiple intestinal video clips, so that the final intestinal cleanliness score can be determined according to the BBPS score of each intestinal video clip. Therefore, in the process of determining the BBPS score, the present application does not need to identify the intestinal part, which can reduce the operational difficulty of the process of obtaining the BBPS score.

[0134] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0135] Based on the same inventive concept, the embodiment of the present application also provides a cleanliness detection device for implementing the above-mentioned cleanliness detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more cleanliness detection device embodiments provided below can refer to the above-mentioned limitations on the cleanliness detection method, and will not be repeated here.

[0136] In one embodiment, Fig. 9 As shown, a cleanliness detection device 900 is provided, comprising: an acquisition module 920, a cleanliness detection module 940 and a cleanliness detection result determination module 960, wherein:

[0137] The acquisition module 920 is used to acquire multiple intestinal video segments of the intestinal tract to be detected; each intestinal video segment includes multiple frames of intestinal deconvoluted images.

[0138] The cleanliness detection module 940 is used to perform cleanliness detection on multiple intestinal video segments according to a preset cleanliness recognition algorithm and the retraction speeds of the multiple intestinal video segments, and generate a cleanliness detection result corresponding to each intestinal video segment.

[0139] The cleanliness detection result determination module 960 is used to determine the cleanliness detection result of the intestine to be detected based on the cleanliness detection result corresponding to each intestine video segment.

[0140] In one embodiment, the cleanliness detection module 940 includes:

[0141] A retraction speed acquisition unit, used for acquiring the retraction speeds of a plurality of intestinal video segments;

[0142] A preset image weight determination unit, used to determine the preset image weight corresponding to each intestinal video segment according to the de-screening speed of each intestinal video segment;

[0143] The cleanliness detection unit is used to perform cleanliness detection on multiple intestinal video clips according to a preset cleanliness recognition algorithm and preset image weights corresponding to each intestinal video clip, and generate cleanliness detection results corresponding to each intestinal video clip.

[0144] In one embodiment, the mirror withdrawal speed acquisition unit includes:

[0145] An image similarity calculation subunit, used to calculate the image similarity between each adjacent intestinal de-mirror image according to the image information of each adjacent intestinal de-mirror image in each intestinal video segment;

[0146] A first relative withdrawal speed calculation subunit is used to calculate the relative withdrawal speed between each adjacent intestinal withdrawal image according to the image similarity between each adjacent intestinal withdrawal image;

[0147] The first de-focusing speed determining subunit is used to determine the de-focusing speed of each intestinal video segment based on the relative de-focusing speed between each adjacent intestinal de-focusing image in each intestinal video segment.

[0148] In one embodiment, the mirror withdrawal speed acquisition unit includes:

[0149] A Hamming distance calculation subunit, used for respectively calculating the Hamming distance between each adjacent intestinal de-mirror image according to the image information of each adjacent intestinal de-mirror image in each intestinal video segment;

[0150] A second relative de-focusing speed calculation subunit is used to calculate the relative de-focusing speed between each adjacent de-focusing image of the intestine according to the Hamming distance between each adjacent de-focusing image of the intestine;

[0151] The second de-focusing speed determining subunit is used to determine the de-focusing speed of each intestinal video segment based on the relative de-focusing speed between each adjacent intestinal de-focusing image.

[0152] In one embodiment, the cleanliness detection unit comprises:

[0153] An intermediate detection result generating subunit is used to input each intestinal video segment into a preset deep learning model for cleanliness detection, and generate an intermediate detection result for each intestinal video segment;

[0154] The cleanliness detection subunit is used to generate a cleanliness detection result corresponding to each intestinal video segment according to the intermediate detection result of each intestinal video segment and the preset image weight corresponding to each intestinal video segment.

[0155] In one embodiment, the preset deep learning model includes a first preset deep learning model, and the first preset deep learning model is used to perform cleanliness detection on the intestinal demicroscope image; the intermediate detection result generating subunit includes:

[0156] An initial detection result generating subunit is used to input each intestinal de-mirror image in the intestinal video clip into a first preset deep learning model for cleanliness detection, and generate an initial detection result of each intestinal de-mirror image;

[0157] The first intermediate detection result generating subunit is used to calculate based on the initial detection results of each intestinal de-mirror image to obtain the intermediate detection results of each intestinal video segment.

[0158] In one embodiment, the preset image weight determination unit includes:

[0159] The preset image weight determination subunit is used to determine the preset image weight corresponding to each intestinal video segment according to the proportion of the fade-out speed of each intestinal video segment in the fade-out speed of multiple intestinal video segments.

[0160] Each module in the above cleanliness detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0161] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store cleanliness detection data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cleanliness detection method is implemented.

[0162] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0163] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0164] Acquire multiple intestinal video clips of the intestinal tract to be detected; each intestinal video clip includes multiple frames of intestinal deconvoluted images;

[0165] According to a preset cleanliness recognition algorithm and the retraction speeds of the multiple intestinal video clips, a cleanliness detection is performed on the multiple intestinal video clips to generate a cleanliness detection result corresponding to each intestinal video clip;

[0166] Based on the cleanliness detection results corresponding to each intestinal video clip, the cleanliness detection result of the intestinal tract to be detected is determined.

[0167] In one embodiment, according to a preset cleanliness recognition algorithm and the retraction speeds of the multiple intestinal video segments, a cleanliness detection is performed on the multiple intestinal video segments to generate a cleanliness detection result corresponding to each intestinal video segment. When the processor executes the computer program, the following steps are further implemented:

[0168] Obtaining the de-focusing speed of multiple intestinal video clips;

[0169] Determine a preset image weight corresponding to each intestinal video segment according to the de-focusing speed of each intestinal video segment;

[0170] According to a preset cleanliness recognition algorithm and preset image weights corresponding to each intestinal video segment, cleanliness detection is performed on multiple intestinal video segments to generate cleanliness detection results corresponding to each intestinal video segment.

[0171] In one embodiment, the retraction speeds of the plurality of intestinal video segments are obtained, and the processor further implements the following steps when executing the computer program:

[0172] According to the image information of each adjacent intestinal de-mirror image in each intestinal video segment, the image similarity between each adjacent intestinal de-mirror image is calculated respectively;

[0173] According to the image similarity between each adjacent intestinal de-mirror image, the relative de-mirror speed between each adjacent intestinal de-mirror image is calculated respectively;

[0174] Based on the relative de-focusing speed between each adjacent de-focusing image of the intestine in each intestinal video segment, the de-focusing speed of each intestinal video segment is determined respectively.

[0175] In one embodiment, the retraction speeds of the plurality of intestinal video segments are obtained, and the processor further implements the following steps when executing the computer program:

[0176] According to the image information of each adjacent intestinal de-mirror image in each intestinal video segment, the Hamming distance between each adjacent intestinal de-mirror image is calculated respectively;

[0177] According to the Hamming distance between each adjacent intestinal de-mirror image, the relative de-mirror speed between each adjacent intestinal de-mirror image is calculated respectively;

[0178] Based on the relative de-focusing speed between each adjacent de-focusing image of the intestine, the de-focusing speed of each intestinal video segment is determined respectively.

[0179] In one embodiment, according to a preset cleanliness recognition algorithm and preset image weights corresponding to each intestinal video segment, cleanliness detection is performed on multiple intestinal video segments to generate cleanliness detection results corresponding to each intestinal video segment. When the processor executes the computer program, the following steps are also implemented:

[0180] Input each intestinal video clip into a preset deep learning model for cleanliness detection, and generate an intermediate detection result for each intestinal video clip;

[0181] According to the intermediate detection results of each intestinal video segment and the preset image weights corresponding to each intestinal video segment, the cleanliness detection results corresponding to each intestinal video segment are generated.

[0182] In one embodiment, the preset deep learning model includes a first preset deep learning model, and the first preset deep learning model is used to perform cleanliness detection on the intestinal de-mirror image; each intestinal video clip is input into the preset deep learning model for cleanliness detection, and an intermediate detection result of each intestinal video clip is generated. When the processor executes the computer program, the following steps are also implemented:

[0183] Inputting each intestinal de-mirror image in the intestinal video clip into a first preset deep learning model for cleanliness detection, and generating initial detection results for each intestinal de-mirror image;

[0184] The calculation is performed based on the initial detection results of each intestinal de-mirror image to obtain the intermediate detection results of each intestinal video segment.

[0185] In one embodiment, according to the de-focusing speed of each intestinal video segment, the preset image weight corresponding to each intestinal video segment is determined, and when the processor executes the computer program, the following steps are further implemented:

[0186] According to the proportion of the fade-out speed of each intestinal video segment in the fade-out speeds of the multiple intestinal video segments, the preset image weight corresponding to each intestinal video segment is determined.

[0187] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0188] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0190] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0191] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0192] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A cleanliness detection method, characterized in that: The method comprises: Acquire multiple intestinal video clips of the intestinal tract to be detected; each of the intestinal video clips includes multiple frames of intestinal deconvoluted images; According to a preset cleanliness recognition algorithm and the retraction speeds of the plurality of intestinal video segments, the plurality of intestinal video segments are subjected to cleanliness detection, and a cleanliness detection result corresponding to each of the intestinal video segments is generated; Based on the cleanliness detection results corresponding to each of the intestinal video clips, the cleanliness detection result of the intestinal tract to be detected is determined.

2. The method according to claim 1, characterized in that The method of performing cleanliness detection on the plurality of intestinal video segments according to a preset cleanliness recognition algorithm and the retraction speeds of the plurality of intestinal video segments, and generating cleanliness detection results corresponding to the plurality of intestinal video segments, comprises: Obtaining the retraction speed of the plurality of intestinal video segments; Determining a preset image weight corresponding to each of the intestinal video segments according to a retraction speed of each of the intestinal video segments; According to the preset cleanliness recognition algorithm and the preset image weights corresponding to each of the intestinal video clips, cleanliness detection is performed on the multiple intestinal video clips to generate cleanliness detection results corresponding to each of the intestinal video clips.

3. The method according to claim 2, characterized in that The obtaining of the retraction speeds of the plurality of intestinal video segments includes: Calculating the image similarity between each adjacent intestinal endoscopic image according to the image information of each adjacent intestinal endoscopic image in each intestinal video segment; Calculating the relative withdrawal speed between each adjacent intestinal tract withdrawal image according to the image similarity between each adjacent intestinal tract withdrawal image; Based on the relative retraction speed between each adjacent intestinal retraction image in each intestinal video segment, the retraction speed of each intestinal video segment is determined respectively.

4. The method according to claim 2, characterized in that: The obtaining of the retraction speeds of the plurality of intestinal video segments includes: According to the image information of each adjacent intestinal defocused image in each intestinal video segment, respectively calculate the Hamming distance between each adjacent intestinal defocused image; According to the Hamming distance between each adjacent intestinal tract withdrawal image, respectively calculate the relative withdrawal speed between each adjacent intestinal tract withdrawal image; Based on the relative receding speed between each adjacent receding intestinal image, the receding speed of each intestinal video segment is determined respectively.

5. The method according to any one of claims 2 to 4, characterized in that: The method of performing cleanliness detection on the plurality of intestinal video segments according to the preset cleanliness recognition algorithm and the preset image weights corresponding to the intestinal video segments, and generating cleanliness detection results corresponding to the intestinal video segments, comprises: Inputting each of the intestinal video clips into a preset deep learning model for cleanliness detection, and generating intermediate detection results for each of the intestinal video clips; According to the intermediate detection results of each of the intestinal video clips and the preset image weights corresponding to each of the intestinal video clips, the cleanliness detection results corresponding to each of the intestinal video clips are generated.

6. The method according to claim 5, characterized in that The preset deep learning model includes a first preset deep learning model, which is used to perform cleanliness detection on the intestinal de-mirror image; inputting each of the intestinal video clips into the preset deep learning model for cleanliness detection, and generating an intermediate detection result of each of the intestinal video clips, including: Inputting each of the intestinal de-mirror images in the intestinal video clip into the first preset deep learning model for cleanliness detection, and generating initial detection results of each of the intestinal de-mirror images; Calculation is performed based on the initial detection results of each of the intestinal de-mirror images to obtain intermediate detection results of each of the intestinal video clips.

7. The method according to any one of claims 2 to 4, characterized in that: Determining the preset image weight corresponding to each of the intestinal video segments according to the de-focusing speed of each of the intestinal video segments includes: According to the proportion of the fade-out speed of each of the intestinal video segments in the fade-out speeds of the multiple intestinal video segments, the preset image weight corresponding to each of the intestinal video segments is determined.

8. A cleanliness detection device, characterized in that: The device comprises: An acquisition module, used for acquiring a plurality of intestinal video segments of the intestinal tract to be detected; each of the intestinal video segments includes a plurality of frames of intestinal deconvoluted images; A cleanliness detection module, configured to perform cleanliness detection on the plurality of intestinal video segments according to a preset cleanliness recognition algorithm and the retraction speeds of the plurality of intestinal video segments, and generate a cleanliness detection result corresponding to each of the intestinal video segments; The cleanliness detection result determination module is used to determine the cleanliness detection result of the intestinal tract to be detected based on the cleanliness detection result corresponding to each of the intestinal video clips.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An endoscope system, characterized in that: include: A display, a light source device, an endoscope, and a computer device as claimed in claim 9.