Enteroscope operation speed determination method and device, computer equipment and storage medium

By decoding the colonoscopy operation video and classifying the optical flow map, the problem of inaccurate colonoscopy operation speed in traditional technology is solved, and more accurate calculation and verification of the colonoscopy operation speed are achieved.

CN118735964APending Publication Date: 2024-10-01CHANGZHOU UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD

Patent Information

Application Number
CN202310326733.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

Smart Images

  • Figure CN118735964A_ABST
    Figure CN118735964A_ABST
Patent Text Reader

Abstract

The invention relates to an enteroscope operation speed determination method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: decoding an enteroscopy operation video within a preset time period before a target moment to obtain at least two frames of enteroscopy operation images, determining at least one frame of optical flow diagram corresponding to the at least two frames of enteroscopy operation images, and classifying the at least one frame of optical flow diagram to obtain a classification result of each frame of optical flow diagram, and finally, according to the classification result of each frame of optical flow diagram, determining the enteroscope operation speed at the target moment. The classification results of the optical flow diagrams are used for representing enteroscopy operation categories to which the optical flow diagrams belong, the optical flow diagrams are used for reflecting position changes of pixels between a target frame of enteroscopy operation image and a previous frame of enteroscopy operation image, and different types of optical flow diagrams correspond to different actual motion states of the enteroscopy; and the enteroscopy operation speed is determined based on the classification result of the optical flow diagram, so that the result accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical detection technology, and in particular to a method, device, computer equipment and storage medium for determining the operating speed of a colonoscope. Background Art

[0002] Colonoscopy is the most common examination method for detecting lower gastrointestinal diseases such as colorectal polyps, adenomas, and tumors.

[0003] Take the process of colonoscopy withdrawal as an example. The process of colonoscopy withdrawal refers to the process from the first time the scope reaches the ileocecal region after insertion to the time it is withdrawn from the anus. Usually, doctors will conduct a complete and detailed lower gastrointestinal examination during the process of colonoscopy withdrawal. However, in actual operation, due to the lack of effective supervision and practical monitoring tools, the scope withdrawal process may be too fast or too slow.

[0004] In traditional technology, the colonoscopy operation speed is usually determined based on the similarity between the current frame colonoscopy image and the previous frame colonoscopy image before the current frame colonoscopy image (such as the previous frame colonoscopy image before the current frame colonoscopy image). However, the similarity between images cannot accurately reflect the actual movement state of the colonoscope, resulting in a large difference between the calculated colonoscopy operation speed and the actual operation speed, thereby reducing the accuracy of the determined colonoscopy operation speed. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device, computer equipment, storage medium and computer program product for determining the speed of colonoscopy operation in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for determining a colonoscopy operation speed, comprising:

[0007] Decoding the colonoscopy operation video within a preset period before the target time to obtain at least two frames of colonoscopy operation images;

[0008] Determine at least one optical flow map corresponding to at least two frames of colonoscopy operation images; wherein the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame colonoscopy operation image;

[0009] Classifying at least one frame of the optical flow map to obtain a classification result of each frame of the optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs;

[0010] The colonoscopy operation speed at the target moment is determined according to the classification results of each frame of the optical flow map.

[0011] In one embodiment, classifying at least one frame of optical flow map to obtain a classification result of each frame of optical flow map includes:

[0012] Inputting at least one frame of optical flow map into a preset classification model respectively, and outputting the colonoscopy operation category to which each optical flow map belongs through the preset classification model;

[0013] The colonoscopy operation category to which each optical flow map belongs is taken as the classification result.

[0014] In one embodiment, determining the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow map includes:

[0015] Determine the excitation value of each optical flow map according to the classification result of each frame of the optical flow map; wherein, the optical flow maps of different colonoscopy operation categories correspond to different excitation values;

[0016] The colonoscopy operation speed at the target moment is determined according to the excitation value of each optical flow map.

[0017] In one embodiment, determining the colonoscopy operation speed at a target time according to the excitation value of each optical flow graph includes:

[0018] Obtain the product between the number of optical flow maps of different enteroscopic operation categories and the corresponding stimulus value;

[0019] The sum of all products is obtained, and the ratio between the sum of the products and the total number of optical flow maps is calculated. The product of the ratio and the preset operation speed is obtained to obtain the colonoscopy operation speed at the target moment.

[0020] In one embodiment, the classification result includes at least one of a forward class and a backward class, and the excitation value of each optical flow map is determined according to the classification result of each frame of the optical flow map, including:

[0021] When the mirror-retracting speed is determined, the excitation value of the backward optical flow map is determined to be a forward unit excitation value, and the excitation value of the forward optical flow map is determined to be a reverse unit excitation value;

[0022] When the lens advancing speed is determined, the excitation value of the forward optical flow map is determined to be a forward unit excitation value, and the excitation value of the backward optical flow map is determined to be a reverse unit excitation value.

[0023] In one embodiment, the method further comprises:

[0024] Performing speed-changing processing on the colonoscopy operation video to obtain a speed-changing operation video; wherein the number of frames of the speed-changing operation video is different from the number of frames of the colonoscopy operation video;

[0025] Determine the reference operating speed at the target moment according to the speed change operation video;

[0026] Verify the colonoscopy operation speed at the target time according to the reference operation speed at the target time.

[0027] In one embodiment, verifying the colonoscopy operation speed at the target time according to the reference operation speed at the target time includes:

[0028] Obtaining a speed ratio between a reference operation speed at a target time and a colonoscopy operation speed at a target time;

[0029] If the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the speed change multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

[0030] In one embodiment, the method further comprises:

[0031] If the colonoscopy operation speed at the target time fails to pass the verification, the unit reference speed at the target time is determined according to the reference operation speed at the target time; wherein the unit reference speed is the quotient of the reference operation speed and the speed change multiple;

[0032] The colonoscope operation speed at the target moment is corrected according to the unit reference speed at the target moment to obtain the corrected colonoscope operation speed at the target moment.

[0033] In a second aspect, the present application also provides a device for determining a colonoscopy operation speed, comprising:

[0034] An image acquisition module is used to decode the colonoscopy operation video within a preset period before the target time to obtain at least two frames of colonoscopy operation images;

[0035] An optical flow determination module, used to determine at least one optical flow map corresponding to at least two frames of colonoscopy operation images; wherein the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame colonoscopy operation image;

[0036] An operation classification module is used to classify at least one frame of the optical flow map to obtain a classification result of each frame of the optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the colonoscopy operation image of the target frame corresponding to the optical flow map belongs;

[0037] The speed determination module is used to determine the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow map.

[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0040] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.

[0041] The above-mentioned method, device, computer equipment, storage medium and computer program product for determining the colonoscopy operation speed obtain at least two frames of colonoscopy operation images by decoding the colonoscopy operation video within a preset time period before the target moment, and determine at least one frame of optical flow map corresponding to the at least two frames of colonoscopy operation images, and then classify the at least one frame of optical flow map to obtain the classification result of each frame of optical flow map, and finally determine the colonoscopy operation speed at the target moment according to the classification result of each frame of optical flow map. Among them, the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs, and the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame colonoscopy operation image. Therefore, the optical flow map can accurately reflect the actual movement state of the colonoscopy during the colonoscopy examination. Different types of optical flow maps correspond to different actual movement states of the colonoscopy. Determining the colonoscopy operation speed based on the classification result of the optical flow map improves the accuracy of the result. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 is an application environment diagram of a method for determining a colonoscopy operation speed in one embodiment;

[0043] Figure 2 is a flow chart of a method for determining a colonoscopy operation speed in one embodiment;

[0044] Figure 3 is a schematic diagram of an optical flow graph in one embodiment;

[0045] Figure 4 A schematic diagram of a process for determining a classification result of an optical flow map in one embodiment;

[0046] Figure 5 is a schematic diagram of optical flow graphs belonging to different categories of colonoscopy operations in one embodiment;

[0047] Figure 6 It is a schematic diagram of a flow chart of determining the colonoscopy operation speed at a target moment according to the classification result of the optical flow graph in one embodiment;

[0048] Figure 7 It is a schematic diagram of a flow chart of determining the colonoscopy operation speed at a target moment according to the excitation value of an optical flow graph in one embodiment;

[0049] Figure 8 It is a schematic diagram of a flow chart of verifying the colonoscopy operation speed at a target moment in one embodiment;

[0050] Fig. 9It is a schematic diagram of a process of verifying the operating speed of a colonoscope according to a reference operating speed in one embodiment;

[0051] Fig.10 It is a schematic diagram of a flow chart of correcting the colonoscope operation speed at a target moment in one embodiment;

[0052] Fig.11 is a structural block diagram of a device for determining the operating speed of a colonoscope in one embodiment;

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

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

[0055] The method for determining the colonoscopy operation speed provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the computer device 102 communicates with the image acquisition device 104. The image acquisition device 104 (such as a colonoscope) is used to enter the human intestine (or intestinal model) to acquire a colonoscopy operation video inside the intestine. The computer device obtains the colonoscopy operation video within a preset period before the target moment, performs decoding processing, obtains at least two frames of colonoscopy operation images, and determines at least one frame of optical flow map corresponding to the at least two frames of colonoscopy operation images, and then classifies the at least one frame of optical flow map obtained to obtain the classification result of each frame of the optical flow map, and then determines the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow map.

[0056] In one embodiment, Figure 2 As shown, a method for determining the speed of colonoscopy operation is provided, and the method is applied to Figure 1 The computer device in the example is used to illustrate, including the following steps:

[0057] S210, decoding the colonoscopy operation video within a preset period before the target time, and obtaining at least two frames of colonoscopy operation images.

[0058] The colonoscopy operation image is a video frame in the colonoscopy operation video. By decoding the colonoscopy operation video, the colonoscopy operation image corresponding to the colonoscopy operation video can be obtained.

[0059] Optionally, the target time may be any time during the colonoscopy. The computer device may obtain an existing colonoscopy operation video or a real-time colonoscopy operation video. When the computer device obtains the real-time colonoscopy operation video, the target time may be the current time.

[0060] Optionally, in the process of obtaining the real-time colonoscopy operation video, the computer device can obtain the colonoscopy operation video within a preset time period before the current moment, and perform video decoding on the colonoscopy operation video to obtain at least two video frames in the colonoscopy operation video, i.e., the colonoscopy operation image, and can further optimize the obtained colonoscopy operation image, such as size cropping, brightness adjustment, etc., to obtain an optimized colonoscopy operation image.

[0061] S220: Determine at least one frame of optical flow map corresponding to at least two frames of colonoscopy operation images.

[0062] Among them, the optical flow map (i.e., "optical flow residual vector map") is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame colonoscopy operation image. The pixel points in the optical flow map correspond to the pixel points in the target colonoscopy operation image, and the position change of the pixel points in the target colonoscopy operation image relative to the corresponding pixel points in the previous frame colonoscopy operation image forms the optical flow map corresponding to the target frame colonoscopy operation image. Figure 3 As shown, the arrows indicate the movement of the corresponding pixels of two adjacent frames of images.

[0063] Optionally, the computer device can determine the optical flow map corresponding to each colonoscopy operation image according to the position change of corresponding pixel points between two adjacent frames of colonoscopy operation images. For example, a dense optical flow algorithm (such as Farneback algorithm, etc.) can be used, or a neural network (such as DeepFlow, liteflownet2, etc.) can be used to calculate the optical flow residual vector between two adjacent frames of colonoscopy operation images, and the optical flow map corresponding to the next frame of colonoscopy operation image (i.e., the target frame of colonoscopy operation image) can be obtained.

[0064] It should be noted that, in the present embodiment, each frame of the colonoscopy operation image corresponds to a frame of the optical flow map. When the target colonoscopy operation image is not the first frame of the colonoscopy operation image (there is a corresponding previous frame of the colonoscopy operation image), the corresponding optical flow map can be determined based on the previous frame of the colonoscopy operation image. When the target colonoscopy operation image is the first frame of the colonoscopy operation image (there is no corresponding previous frame of the colonoscopy operation image), the vector of each pixel point in the corresponding optical flow map is 0, that is, there is no position change.

[0065] S230 , classifying at least one frame of optical flow map to obtain a classification result of each frame of optical flow map.

[0066] Among them, the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs. The colonoscopy operation category is the movement type of the colonoscope. During the colonoscopy process, different types of colonoscopy operations result in different position changes of corresponding pixel points on two adjacent frames of colonoscopy operation images, and the obtained optical flow maps belong to different colonoscopy operation categories.

[0067] Optionally, the computer device may classify the obtained optical flow map by using the similarity between each frame of the optical flow map and a reference optical flow map of a known colonoscopy operation category to obtain a classification result of each frame of the optical flow map.

[0068] Optionally, the colonoscopy operation category may include a forward category and a backward category, and the preset reference optical flow map includes a forward category reference optical flow map A and a backward category reference optical flow map B. The computer device may calculate the similarity between each frame of the optical flow map and the reference optical flow maps A and B, respectively. For each frame of the optical flow map, the colonoscopy operation category of the reference optical flow map corresponding to the greatest similarity and greater than the similarity threshold is determined as the colonoscopy operation category to which the optical flow map belongs. Figure 1 , computer equipment calculates optical flow Figure 1 The similarity between the reference optical flow graphs A and B is obtained Figure 1 The similarity with the reference optical flow map A is greater than the optical flow Figure 1 The similarity between the optical flow map B and the reference optical flow map B is greater than a preset similarity threshold, and the computer device determines the optical flow Figure 1 The colonoscopy operation category belongs to the forward type.

[0069] S240, determining the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow map.

[0070] Optionally, after obtaining the classification result of each frame of the optical flow map, the computer device can count the number of forward optical flow maps, the number of backward optical flow maps and the total number of optical flow maps, so as to determine the colonoscopy operation speed at the target moment according to the number of forward optical flow maps, the number of backward optical flow maps and the total number of optical flow maps.

[0071] Normally, when determining the speed of advancing the scope, the number of forward optical flow maps in the process of colonoscopy operation is generally greater than the number of backward optical flow maps, but there are also cases where the number of backward optical flow maps is greater than the number of forward optical flow maps. Therefore, if the calculated colonoscopy operation speed is positive, the colonoscopy operation speed is the scope advancing speed; conversely, if the calculated colonoscopy operation speed is negative, the colonoscopy operation speed is the scope withdrawing speed, at which time the computer device can remind the operator that the current operation is a reverse operation. When determining the speed of advancing and withdrawing the scope, the number of backward optical flow maps in the process of colonoscopy operation is generally greater than the number of forward optical flow maps, but there are also cases where the number of forward optical flow maps is greater than the number of backward optical flow maps. Therefore, if the calculated colonoscopy operation speed is positive, the colonoscopy operation speed is the scope withdrawing speed; conversely, if the calculated colonoscopy operation speed is negative, the colonoscopy operation speed is the scope advancing speed, at which time the computer device can also remind the operator that the current operation is a reverse operation.

[0072] In this embodiment, the computer device decodes the colonoscopy operation video within a preset period before the target moment to obtain at least two frames of colonoscopy operation images, and determines at least one frame of optical flow map corresponding to the at least two frames of colonoscopy operation images, and then classifies the at least one frame of optical flow map to obtain the classification result of each frame of optical flow map, and finally determines the colonoscopy operation speed at the target moment according to the classification result of each frame of optical flow map. The classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs, and the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame of colonoscopy operation image. Therefore, the optical flow map can accurately reflect the actual movement state of the colonoscope during the colonoscopy examination. Different types of optical flow maps correspond to different actual movement states of the colonoscope. Determining the colonoscopy operation speed based on the classification result of the optical flow map improves the accuracy of the result.

[0073] To improve classification efficiency, in one embodiment, Figure 4 As shown, the above S230, classifying at least one frame of optical flow map, and obtaining the classification result of each frame of optical flow map, includes:

[0074] S410, inputting at least one frame of optical flow map into a preset classification model respectively, and outputting the colonoscopy operation category to which each optical flow map belongs through the preset classification model.

[0075] The preset classification model is a classification model obtained by training using a large number of optical flow images of known colonoscopy operation categories as training samples. Optionally, the preset classification model can be obtained based on machine learning or deep learning.

[0076] It should be noted that the optical flow graphs of different colonoscopy operation categories present different vector features. Figure 5As shown, the backward optical flow map presents convergence type vector features, the forward optical flow map presents diffusion type vector features, the rotating optical flow map presents surrounding type vector features, and the stationary optical flow map has no vector features. Optionally, the computer device can use the optical flow map labeled with a specific category as a training sample to train a preset classification model.

[0077] S420: taking the colonoscopy operation category to which each optical flow map belongs as a classification result.

[0078] Optionally, the computer device inputs each frame of the optical flow map obtained into a preset classification model, and the preset classification model performs a convolution calculation based on feature extraction on the input optical flow map to output the colonoscopy operation category to which each optical flow map belongs, i.e., as the classification result of each optical flow map.

[0079] In this embodiment, the computer device can input the obtained at least one frame of optical flow map into the preset classification model, output the colonoscopy operation category to which each optical flow map belongs through the preset classification model, and use the colonoscopy operation category to which each optical flow map belongs as the classification result. The computing power of the preset classification model is stable and powerful, which can greatly shorten the classification time, thereby improving the efficiency and accuracy of optical flow map classification.

[0080] Next, the process of determining the colonoscopy operation speed at the target time according to the classification results of each frame of the optical flow graph is described in detail. Figure 6 As shown, the above S240, determining the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow graph, includes:

[0081] S610: Determine the excitation value of each optical flow map according to the classification result of each frame of the optical flow map.

[0082] Among them, the optical flow maps of different colonoscopy operation categories correspond to different incentive values.

[0083] Optionally, the above classification results include at least one of the forward class and the backward class. In the case of determining the retracting speed, the computer device determines that the incentive value of the backward class optical flow map is a positive unit incentive value, and the incentive value of the forward class optical flow map is a negative unit incentive value. For example, in the case of determining the retracting speed, the incentive value of the backward class optical flow map is +1, and the incentive value of the forward class optical flow map is -1. In the case of determining the advancing speed, the computer device determines that the incentive value of the forward class optical flow map is a positive unit incentive value, and the incentive value of the backward class optical flow map is a negative unit incentive value. For example, in the case of determining the advancing speed, the incentive value of the forward class optical flow map is +1, and the incentive value of the backward class optical flow map is -1.

[0084] Optionally, the above classification result may also include a rotation class and / or a stationary class. The computer device may directly determine that the excitation value of the rotation class / stationary class optical flow map is 0.

[0085] S620: Determine the colonoscopy operation speed at the target time according to the excitation value of each optical flow graph.

[0086] Optionally, the computer device may count the excitation values ​​of each optical flow map to determine the colonoscopy operation speed at the target moment according to the statistical results.

[0087] In an optional embodiment, if Figure 7 As shown, the above S620, determining the colonoscopy operation speed at the target time according to the excitation value of each optical flow graph, includes:

[0088] S710, obtaining the product of the number of optical flow maps of different colonoscopy operation categories and the corresponding stimulus value.

[0089] Optionally, after obtaining the classification results of each optical flow map, that is, obtaining the colonoscopy operation category to which each optical flow map belongs, the computer device counts the number of optical flow maps of each colonoscopy operation category to obtain the product between the number of optical flow maps of each colonoscopy operation category and the corresponding stimulus value. For example, the computer device obtains N frames of optical flow maps corresponding to N frames of colonoscopy operation images within a preset time period T=1s, and according to the classification results of each optical flow map, it is obtained that there are a frames of backward optical flow maps, b frames of forward optical flow maps, c frames of rotation optical flow maps, and d frames of stationary optical flow maps in the N frames of optical flow maps. When the stimulus value of the backward optical flow map is +1, the stimulus value of the forward optical flow map is -1, and the stimulus values ​​of the rotation optical flow map and the stationary optical flow map are both 0, the products of the number of optical flow maps of different colonoscopy operation categories calculated by the computer device and the corresponding stimulus values ​​are (+1)*a, (-1)*b, 0*c, and 0*d, respectively.

[0090] S720, obtaining the sum of all products, and calculating the ratio between the sum of the products and the total number of optical flow maps, obtaining the product of the ratio and the preset operation speed, and obtaining the colonoscopy operation speed at the target moment.

[0091] The preset operation speed is used to represent the maximum operation speed of the colonoscope under continuous movement (such as continuous forward movement or continuous backward movement) within a preset period before the target time. Based on the preset operation speed, an intuitive and quantified colonoscope operation speed can be obtained.

[0092] Optionally, after the computer device calculates the products corresponding to the optical flow maps of different colonoscopy operation categories, it obtains the sum of all products and calculates the ratio between the sum of the products and the total number of optical flow maps, and then obtains the product of the ratio and the preset operation speed to obtain the colonoscopy operation speed at the target moment. Continuing with the above example, the preset operation speed S, the total number of optical flow maps N = a + b + c + d, the sum of all products is (+1) * a + (-1) * b + 0 * c + 0 * d = (+1) * a + (-1) * b, the computer device can calculate the colonoscopy operation speed at the target moment s = S * ((+1) * a + (-1) * b) / N

[0093] In this embodiment, the computer device determines the excitation value of each optical flow map according to the classification result of each frame of the optical flow map, and determines the colonoscopy operation speed at the target moment according to the excitation value of each optical flow map. Specifically, the colonoscopy operation speed at the target moment can be obtained by obtaining the product between the number of optical flow maps of different colonoscopy operation categories and the corresponding excitation value, obtaining the sum of all products, and calculating the ratio between the sum of the products and the total number of optical flow maps, and then obtaining the product of the ratio and the preset operation speed. Among them, the optical flow maps of different colonoscopy operation categories correspond to different excitation values. The above method can quickly and accurately obtain the intuitive and quantified colonoscopy operation speed at the target moment, thereby improving the accuracy of the results.

[0094] In practical applications, after obtaining the colonoscopy operation speed at the target time, in order to improve the reliability of the result, in one embodiment, Figure 8 As shown, the above method also includes:

[0095] S810: Perform speed-changing processing on the colonoscopy operation video to obtain a speed-changing operation video.

[0096] The number of frames of the speed-changing operation video is different from the number of frames of the colonoscopy operation video. Optionally, the speed-changing operation may be an acceleration process, such as extracting frames from the colonoscopy operation video, or a deceleration process, such as adding frames to the colonoscopy operation video.

[0097] Optionally, the computer device performs speed-changing processing on the colonoscopy operation video with a preset speed-changing multiple to obtain the colonoscopy operation video after speed-changing processing, and uses the colonoscopy operation video after speed-changing processing as the speed-changing operation video. For example, the computer device can perform 2x speed processing (i.e., acceleration processing) on ​​the colonoscopy operation video, which can be achieved by extracting one frame of colonoscopy operation image from every other frame of the colonoscopy operation video, and thus a speed-changing operation video processed at 2x speed can be obtained. The computer device can perform 1 / 2x speed processing (i.e., deceleration processing) on ​​the colonoscopy operation video, which can be achieved by adding one frame of colonoscopy operation image from every other frame of the colonoscopy operation video, and thus a speed-changing operation video processed at 1 / 2x speed can be obtained.

[0098] S820: Determine a reference operation speed at a target time according to the speed change operation video.

[0099] Optionally, the computer device determines the reference operation speed at the target moment according to the speed change operation video. For example, the specific process of determining the colonoscopy operation speed at the target moment according to the colonoscopy operation video in the aforementioned embodiment can be referred to ( Figure 2 to Figure 7 The contents of the corresponding embodiments) will not be repeated here.

[0100] S830. Verify the colonoscopy operation speed at the target time according to the reference operation speed at the target time.

[0101] Optionally, after the computer device obtains the colonoscopy operation speed at the target moment determined according to the colonoscopy operation video and the reference operation speed at the target moment determined according to the speed change operation video, the reference operation speed can be used to verify the colonoscopy operation speed to determine the reliability of the colonoscopy operation speed.

[0102] In an optional embodiment, if Fig. 9 As shown, the above S830, verifying the colonoscopy operation speed at the target time according to the reference operation speed at the target time, includes:

[0103] S910. Obtain a speed ratio between a reference operation speed at a target time and a colonoscopy operation speed at a target time.

[0104] Optionally, the computer device directly compares the obtained reference operation speed at the target moment with the colonoscopy operation speed at the target moment to obtain a speed ratio, and determines the reliability of the colonoscopy operation speed at the target moment based on the speed ratio.

[0105] S920. If the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the preset multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

[0106] Optionally, the computer device may compare the obtained speed ratio with the speed multiple of the speed change process to determine the reliability of the colonoscopy operation speed at the target moment according to the comparison result. If the comparison result is that the speed ratio is equal to the preset speed multiple, the computer device determines that the colonoscopy operation speed at the target moment has passed the verification and has strong reliability; if the comparison result is that the speed ratio is not equal to the preset multiple, the computer device determines that the colonoscopy operation speed at the target moment has not passed the verification and has poor reliability. For example, the computer device obtains the speed ratio V0 / V1 of the reference operation speed V0 at the target moment to the colonoscopy operation speed V1 at the target moment, and obtains the speed multiple n=2 of the speed change process of the speed change operation video. If V0 / V1=2, the reliability of V1 is strong. If V0 / V1≠2, the reliability of V1 is poor.

[0107] In this embodiment, the computer device performs speed-changing processing on the colonoscopy operation video to obtain a speed-changing operation video with a frame number different from the colonoscopy operation video, and determines the reference operation speed at the target moment based on the speed-changing operation video, and then verifies the colonoscopy operation speed at the target moment based on the reference operation speed at the target moment. Specifically, the speed ratio between the reference operation speed at the target moment and the colonoscopy operation speed at the target moment can be obtained, and the reliability of the obtained colonoscopy operation speed at the target moment can be determined based on whether the speed ratio is equal to the speed-changing multiple of the speed-changing processing. The above method can be used to verify the reliability of the obtained colonoscopy operation speed at the target moment, providing a qualitative verification basis for the subsequent evaluation of the entire inspection process.

[0108] In the case that the colonoscope operation speed at the target time fails to pass the verification, the colonoscope operation speed can also be corrected according to the reference operation speed at the target time to improve reliability. Based on this, in one embodiment, if Fig.10 As shown, the above method also includes:

[0109] S1010. When the colonoscopy operation speed at the target time fails to pass the verification, the unit reference speed at the target time is determined according to the reference operation speed at the target time.

[0110] The unit reference speed is the quotient of the reference operation speed and the preset multiple.

[0111] Optionally, when the computer device determines that the colonoscopy operation speed at the target moment has not passed the verification, the colonoscopy operation speed is further corrected according to the reference operation speed at the target moment. Specifically, the quotient of the reference operation speed at the target moment and the speed change multiple can be first obtained as the unit reference speed at the target moment.

[0112] S1020. Correct the colonoscopy operation speed at the target moment according to the unit reference speed at the target moment to obtain a corrected colonoscopy operation speed at the target moment.

[0113] Optionally, after obtaining the unit reference speed at the target moment, the computer device may directly use the unit reference speed at the target moment to replace the colonoscopy operation speed at the target moment as the corrected colonoscopy operation speed at the target moment. The average value of the unit reference speed at the target moment and the colonoscopy operation speed at the target moment may also be calculated, and the average value may be used as the corrected colonoscopy operation speed at the target moment.

[0114] In this embodiment, when the colonoscopy operation speed at the target time fails to pass the verification, the computer device can also determine the reference operation speed at the target time and the quotient of the speed change multiple, and use it as the unit reference speed at the target time, and then correct the colonoscopy operation speed at the target time according to the unit reference speed at the target time. The correction of the colonoscopy operation speed can be achieved through the above method, so as to further improve the accuracy and reliability of the colonoscopy operation speed.

[0115] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned 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 does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can 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 to be 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.

[0116] In one embodiment, Fig.11 As shown, a device for determining the operation speed of a colonoscope is provided, comprising: an image acquisition module 1101, an optical flow determination module 1102, an operation classification module 1103 and a speed determination module 1104, wherein:

[0117] The image acquisition module 1101 is used to decode the colonoscopy operation video within a preset period before the target time to obtain at least two frames of colonoscopy operation images;

[0118] The optical flow determination module 1102 is used to determine at least one optical flow map corresponding to at least two frames of colonoscopy operation images; wherein the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame colonoscopy operation image;

[0119] The operation classification module 1103 is used to classify at least one frame of the optical flow map to obtain a classification result of each frame of the optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the colonoscopy operation image of the target frame corresponding to the optical flow map belongs;

[0120] The speed determination module 1104 is used to determine the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow map.

[0121] In one embodiment, the operation classification module 1103 is specifically used to:

[0122] At least one frame of optical flow map is input into a preset classification model respectively, and the colonoscopy operation category to which each optical flow map belongs is output through the preset classification model; and the colonoscopy operation category to which each optical flow map belongs is used as a classification result.

[0123] In one embodiment, the speed determination module 1104 is specifically configured to:

[0124] The excitation value of each optical flow map is determined according to the classification result of each frame of the optical flow map; wherein, optical flow maps of different colonoscopy operation categories correspond to different excitation values; and the colonoscopy operation speed at the target moment is determined according to the excitation value of each optical flow map.

[0125] In one embodiment, the speed determination module 1104 is specifically configured to:

[0126] The product of the number of optical flow maps of different colonoscopy operation categories and the corresponding excitation values ​​is obtained; the sum of all products is obtained, and the ratio between the sum of the products and the total number of optical flow maps is calculated, and the product of the ratio and the preset operation speed is obtained to obtain the colonoscopy operation speed at the target moment.

[0127] In one embodiment, the classification result includes at least one of a forward class and a backward class, and the speed determination module 1104 is specifically used to:

[0128] When the retracting speed is determined, the incentive value of the backward optical flow map is determined to be a positive unit incentive value, and the incentive value of the forward optical flow map is determined to be a reverse unit incentive value; when the advancing speed is determined, the incentive value of the forward optical flow map is determined to be a positive unit incentive value, and the incentive value of the backward optical flow map is determined to be a reverse unit incentive value.

[0129] In one embodiment, the apparatus further includes a result verification module, which is used to:

[0130] The colonoscopy operation video is subjected to speed change processing to obtain a speed change operation video; wherein the frame number of the speed change operation video is different from the frame number of the colonoscopy operation video; a reference operation speed at a target moment is determined according to the speed change operation video; and the colonoscopy operation speed at the target moment is verified according to the reference operation speed at the target moment.

[0131] In one embodiment, the result verification module is specifically used to:

[0132] The speed ratio between the reference operation speed at the target moment and the colonoscopy operation speed at the target moment is obtained; if the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the speed change multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

[0133] In one embodiment, the apparatus further comprises a result correction module, which is used to:

[0134] When the colonoscopy operation speed at the target moment fails to pass the verification, the unit reference speed at the target moment is determined according to the reference operation speed at the target moment; wherein the unit reference speed is the quotient of the reference operation speed and the speed change multiple; the colonoscopy operation speed at the target moment is corrected according to the unit reference speed at the target moment to obtain the corrected colonoscopy operation speed at the target moment.

[0135] Each module in the above-mentioned device for determining the speed of colonoscopy operation can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules 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 of the above modules.

[0136] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities, and can specifically be an image processor. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for determining the speed of colonoscopy operation is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0137] Those skilled in the art will understand that Fig.12 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.

[0138] 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:

[0139] The colonoscopy operation video within a preset time period before the target moment is decoded and processed to obtain at least two frames of colonoscopy operation images; at least one frame of optical flow map corresponding to the at least two frames of colonoscopy operation images is determined; wherein the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame of colonoscopy operation image; at least one frame of optical flow map is classified to obtain the classification result of each frame of optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs; and the colonoscopy operation speed at the target moment is determined according to the classification result of each frame of optical flow map.

[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0141] At least one frame of optical flow map is input into a preset classification model respectively, and the colonoscopy operation category to which each optical flow map belongs is output through the preset classification model; and the colonoscopy operation category to which each optical flow map belongs is used as a classification result.

[0142] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0143] The excitation value of each optical flow map is determined according to the classification result of each frame of the optical flow map; wherein, optical flow maps of different colonoscopy operation categories correspond to different excitation values; and the colonoscopy operation speed at the target moment is determined according to the excitation value of each optical flow map.

[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0145] The product of the number of optical flow maps of different colonoscopy operation categories and the corresponding excitation values ​​is obtained; the sum of all products is obtained, and the ratio between the sum of the products and the total number of optical flow maps is calculated, and the product of the ratio and the preset operation speed is obtained to obtain the colonoscopy operation speed at the target moment.

[0146] In one embodiment, the classification result includes at least one of a forward class and a backward class, and the processor further implements the following steps when executing the computer program:

[0147] When the retracting speed is determined, the incentive value of the backward optical flow map is determined to be a positive unit incentive value, and the incentive value of the forward optical flow map is determined to be a reverse unit incentive value; when the advancing speed is determined, the incentive value of the forward optical flow map is determined to be a positive unit incentive value, and the incentive value of the backward optical flow map is determined to be a reverse unit incentive value.

[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0149] The colonoscopy operation video is subjected to speed change processing to obtain a speed change operation video; wherein the frame number of the speed change operation video is different from the frame number of the colonoscopy operation video; a reference operation speed at a target moment is determined according to the speed change operation video; and the colonoscopy operation speed at the target moment is verified according to the reference operation speed at the target moment.

[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0151] The speed ratio between the reference operation speed at the target moment and the colonoscopy operation speed at the target moment is obtained; if the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the speed change multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

[0152] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0153] When the colonoscopy operation speed at the target moment fails to pass the verification, the unit reference speed at the target moment is determined according to the reference operation speed at the target moment; wherein the unit reference speed is the quotient of the reference operation speed and the speed change multiple; the colonoscopy operation speed at the target moment is corrected according to the unit reference speed at the target moment to obtain the corrected colonoscopy operation speed at the target moment.

[0154] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0155] The colonoscopy operation video within a preset time period before the target moment is decoded and processed to obtain at least two frames of colonoscopy operation images; at least one frame of optical flow map corresponding to the at least two frames of colonoscopy operation images is determined; wherein the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame of colonoscopy operation image; at least one frame of optical flow map is classified to obtain the classification result of each frame of optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs; and the colonoscopy operation speed at the target moment is determined according to the classification result of each frame of optical flow map.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] At least one frame of optical flow map is input into a preset classification model respectively, and the colonoscopy operation category to which each optical flow map belongs is output through the preset classification model; and the colonoscopy operation category to which each optical flow map belongs is used as a classification result.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] The excitation value of each optical flow map is determined according to the classification result of each frame of the optical flow map; wherein, optical flow maps of different colonoscopy operation categories correspond to different excitation values; and the colonoscopy operation speed at the target moment is determined according to the excitation value of each optical flow map.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] The product between the number of optical flow maps of different colonoscopy operation categories and the corresponding excitation values ​​is obtained; the sum of all products is obtained, and the ratio between the sum of the products and the total number of optical flow maps is calculated, and the product of the ratio and the preset operation speed is obtained to obtain the colonoscopy operation speed at the target moment.

[0162] In one embodiment, the classification result includes at least one of a forward class and a backward class, and when the computer program is executed by the processor, the following steps are also implemented:

[0163] When the retracting speed is determined, the incentive value of the backward optical flow map is determined to be a positive unit incentive value, and the incentive value of the forward optical flow map is determined to be a reverse unit incentive value; when the advancing speed is determined, the incentive value of the forward optical flow map is determined to be a positive unit incentive value, and the incentive value of the backward optical flow map is determined to be a reverse unit incentive value.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] The colonoscopy operation video is subjected to speed change processing to obtain a speed change operation video; wherein the frame number of the speed change operation video is different from the frame number of the colonoscopy operation video; a reference operation speed at a target moment is determined according to the speed change operation video; and the colonoscopy operation speed at the target moment is verified according to the reference operation speed at the target moment.

[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0167] The speed ratio between the reference operation speed at the target moment and the colonoscopy operation speed at the target moment is obtained; if the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the speed change multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0169] When the colonoscopy operation speed at the target moment fails to pass the verification, the unit reference speed at the target moment is determined according to the reference operation speed at the target moment; wherein the unit reference speed is the quotient of the reference operation speed and the speed change multiple; the colonoscopy operation speed at the target moment is corrected according to the unit reference speed at the target moment to obtain the corrected colonoscopy operation speed at the target moment.

[0170] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0171] The colonoscopy operation video within a preset time period before the target moment is decoded and processed to obtain at least two frames of colonoscopy operation images; at least one frame of optical flow map corresponding to the at least two frames of colonoscopy operation images is determined; wherein the optical flow map is used to reflect the position change of pixels between the target frame colonoscopy operation image and the previous frame of colonoscopy operation image; at least one frame of optical flow map is classified to obtain the classification result of each frame of optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs; and the colonoscopy operation speed at the target moment is determined according to the classification result of each frame of optical flow map.

[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0173] At least one frame of optical flow map is input into a preset classification model respectively, and the colonoscopy operation category to which each optical flow map belongs is output through the preset classification model; and the colonoscopy operation category to which each optical flow map belongs is used as a classification result.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] The excitation value of each optical flow map is determined according to the classification result of each frame of the optical flow map; wherein, optical flow maps of different colonoscopy operation categories correspond to different excitation values; and the colonoscopy operation speed at the target moment is determined according to the excitation value of each optical flow map.

[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0177] The product between the number of optical flow maps of different colonoscopy operation categories and the corresponding excitation values ​​is obtained; the sum of all products is obtained, and the ratio between the sum of the products and the total number of optical flow maps is calculated, and the product of the ratio and the preset operation speed is obtained to obtain the colonoscopy operation speed at the target moment.

[0178] In one embodiment, the classification result includes at least one of a forward class and a backward class, and when the computer program is executed by the processor, the following steps are also implemented:

[0179] When the retracting speed is determined, the incentive value of the backward optical flow map is determined to be a positive unit incentive value, and the incentive value of the forward optical flow map is determined to be a reverse unit incentive value; when the advancing speed is determined, the incentive value of the forward optical flow map is determined to be a positive unit incentive value, and the incentive value of the backward optical flow map is determined to be a reverse unit incentive value.

[0180] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0181] The colonoscopy operation video is subjected to speed change processing to obtain a speed change operation video; wherein the frame number of the speed change operation video is different from the frame number of the colonoscopy operation video; a reference operation speed at a target moment is determined according to the speed change operation video; and the colonoscopy operation speed at the target moment is verified according to the reference operation speed at the target moment.

[0182] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0183] The speed ratio between the reference operation speed at the target moment and the colonoscopy operation speed at the target moment is obtained; if the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the speed change multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0185] When the colonoscopy operation speed at the target moment fails to pass the verification, the unit reference speed at the target moment is determined according to the reference operation speed at the target moment; wherein the unit reference speed is the quotient of the reference operation speed and the speed change multiple; the colonoscopy operation speed at the target moment is corrected according to the unit reference speed at the target moment to obtain the corrected colonoscopy operation speed at the target moment.

[0186] Those skilled 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.

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

[0188] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications 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 method for determining the speed of colonoscopy operation, characterized in that: The method comprises: Decoding the colonoscopy operation video within a preset period before the target time to obtain at least two frames of colonoscopy operation images; Determine at least one optical flow map corresponding to the at least two frames of enteroscopic operation images; wherein the optical flow map is used to reflect the position change of pixels between the target frame enteroscopic operation image and the previous frame enteroscopic operation image; Classifying the at least one frame of the optical flow map to obtain a classification result of each frame of the optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the optical flow map belongs; The colonoscopy operation speed at the target moment is determined according to the classification result of each frame of the optical flow map.

2. The method according to claim 1, characterized in that The classifying the at least one frame of optical flow map to obtain the classification result of each frame of optical flow map includes: Inputting the at least one frame of optical flow map into a preset classification model, and outputting the colonoscopy operation category to which each optical flow map belongs through the preset classification model; The colonoscopy operation category to which each of the optical flow graphs belongs is taken as the classification result.

3. The method according to claim 1, characterized in that The step of determining the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow graph comprises: Determining the excitation value of each optical flow map according to the classification result of each frame of the optical flow map; wherein the optical flow maps of different colonoscopy operation categories correspond to different excitation values; The colonoscopy operation speed at the target moment is determined according to the excitation value of each of the optical flow graphs.

4. The method according to claim 3, characterized in that The step of determining the colonoscopy operation speed at the target time according to the excitation value of each optical flow graph includes: Obtaining the product between the number of optical flow maps of different enteroscopic operation categories and the corresponding excitation value; The sum of all products is obtained, and the ratio between the sum of the products and the total number of the optical flow graphs is calculated, and the product of the ratio and the preset operation speed is obtained to obtain the colonoscopy operation speed at the target moment.

5. The method according to claim 3, characterized in that: The classification result includes at least one of a forward class and a backward class, and the determining of the excitation value of each optical flow map according to the classification result of each frame of the optical flow map includes: When the mirror-retracting speed is determined, the excitation value of the backward optical flow map is determined to be a forward unit excitation value, and the excitation value of the forward optical flow map is determined to be a reverse unit excitation value; When the camera advance speed is determined, the excitation value of the forward optical flow map is determined to be a forward unit excitation value, and the excitation value of the backward optical flow map is determined to be a reverse unit excitation value.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Performing speed-changing processing on the colonoscopy operation video to obtain a speed-changing operation video; wherein the number of frames of the speed-changing operation video is different from the number of frames of the colonoscopy operation video; Determining a reference operating speed at the target moment according to the speed change operation video; The colonoscopy operation speed at the target moment is verified according to the reference operation speed at the target moment.

7. The method according to claim 6, characterized in that The verifying the colonoscopy operation speed at the target moment according to the reference operation speed at the target moment comprises: Obtaining a speed ratio between a reference operation speed at the target moment and a colonoscope operation speed at the target moment; If the speed ratio is equal to the speed change multiple of the speed change processing, it is determined that the colonoscopy operation speed at the target moment has passed the verification; if the speed ratio is not equal to the speed change multiple, it is determined that the colonoscopy operation speed at the target moment has not passed the verification.

8. The method according to claim 7, characterized in that The method further comprises: In the case that the colonoscope operation speed at the target moment fails to pass the verification, the unit reference speed at the target moment is determined according to the reference operation speed at the target moment; wherein the unit reference speed is the quotient of the reference operation speed and the speed change multiple; The colonoscope operation speed at the target moment is corrected according to the unit reference speed at the target moment to obtain the corrected colonoscope operation speed at the target moment.

9. A device for determining the operating speed of a colonoscope, characterized in that: The device comprises: An image acquisition module is used to decode the colonoscopy operation video within a preset period before the target time to obtain at least two frames of colonoscopy operation images; An optical flow determination module, used to determine at least one optical flow map corresponding to the at least two frames of enteroscopic operation images; wherein the optical flow map is used to reflect the position change of pixels between the target frame enteroscopic operation image and the previous frame enteroscopic operation image; An operation classification module, used to classify the at least one frame of the optical flow map to obtain a classification result of each frame of the optical flow map; wherein the classification result of the optical flow map is used to characterize the colonoscopy operation category to which the colonoscopy operation image of the target frame corresponding to the optical flow map belongs; The speed determination module is used to determine the colonoscopy operation speed at the target moment according to the classification result of each frame of the optical flow map.

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

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Image processing method, device, equipment and system

    CN110458127A

  • Real-time endoscope enteroscope polyp detection system

    CN111383214A

  • Scene state judgment method and device, equipment and storage medium

    CN112347996A

  • Medical image processing method and device and related equipment

    CN115035152A

  • Automated steering systems and methods for a robotic endoscope

    US20180296281A1

Cited By

  • Mouse intestine peristalsis speed detection method and device based on fluid dense optical flow algorithm

    CN119693421A

  • Interventional puncture ultrasonic-assisted positioning method and system

    CN120616730A