Determination method and device of mirror retreating time, computer equipment and storage medium
Patent Information
- Application Number
- CN202310469857.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-04-27
AI Technical Summary
Existing methods for detecting the withdrawal time are not accurate enough and cannot accurately reflect the doctor’s true diagnosis time and quality during colonoscopy.
By identifying the target video frame by frame, determine the total number of frames and the observation degree of each frame of image, eliminate the number of frames that do not meet the observation conditions, and calculate the withdrawal time that meets the observation conditions.
It improves the accuracy of the withdrawal time, reflects the doctor's precise diagnosis time during colonoscopy, and enhances the quality control of the withdrawal process.
Smart Images

Figure CN118864338A_ABST
Abstract
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 a time to withdraw a mirror. Background Art
[0002] The time to withdraw the endoscope is an important indicator for the quality control of colonoscopy. According to the 2021 American College of Gastroenterology's guidelines for colorectal cancer screening, the recommended time to withdraw the endoscope is 9 minutes, or at least 6 minutes. However, simply calculating the time to withdraw the endoscope cannot reflect the doctor's actual diagnosis time and quality, that is, the time to withdraw the endoscope is not accurate.
[0003] There are two existing methods for detecting the withdrawal time: the first method is to first identify the ileocecal part and record the time, then identify the outside of the body and record the time again, and subtract the two to obtain the withdrawal time; the second method is to eliminate the "water absorption", "surgery" and "static" frames based on the first method to obtain the effective withdrawal time.
[0004] However, the above two methods still have the problem that the calculated mirror withdrawal time is inaccurate. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for determining the withdrawal time in response to the above technical problems. The method can improve the accuracy of determining the withdrawal time.
[0006] In a first aspect, the present application provides a method for determining a time to withdraw a mirror. The method comprises:
[0007] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0008] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0009] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0010] In one embodiment, the observation parameter includes the target information amount of the target image frame relative to the previous adjacent image frame, and the determination of the observation parameter of each target image frame between the first image frame and the second image frame includes:
[0011] Inputting each of the target image frames into the information recognition model to perform effective information recognition, thereby obtaining a first amount of information contained in each of the target image frames, and inputting the previous adjacent image frame into the information recognition model to perform effective information recognition, thereby obtaining a second amount of information contained in the previous adjacent image frame;
[0012] The target information amount of each target image frame relative to the previous adjacent image frame is obtained according to the first information amount and the second information amount.
[0013] In one embodiment, the observation parameter includes a change speed of each target image frame relative to a previous adjacent image frame, and determining the observation parameter of each target image frame between the first image frame and the second image frame includes:
[0014] Determine a hash fingerprint of each of the target image frames and a hash fingerprint of the previous adjacent image frame;
[0015] Obtaining a Hamming distance between each of the target image frames and the previous adjacent image frame according to the hash fingerprint of each of the target image frames and the hash fingerprint of the previous adjacent image frame;
[0016] According to the Hamming distance between each of the target image frames and the previous adjacent image frame, the change speed of each of the target image frames relative to the previous adjacent image frame is obtained.
[0017] In one embodiment, the observation parameters include the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of each target image frame relative to the previous adjacent image frame. The observation degree of each target image frame is obtained according to the observation parameters of each target image frame, including:
[0018] Determine a first weight corresponding to the target information amount and a second weight corresponding to the change speed;
[0019] According to the first weight and the second weight, the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of each target image frame relative to the previous adjacent image frame are accumulated and calculated to obtain the observation degree of each target image frame.
[0020] In one of the embodiments, the observability condition includes: the observability of the target image frame is less than a preset observability threshold.
[0021] In one embodiment, determining the de-focusing time that satisfies the observation degree condition according to the total de-focusing frame number and the number of image frames whose observation degree does not satisfy the observation degree condition comprises:
[0022] Determining the number of image frames that meet the observation condition according to the total number of defocused frames and the number of image frames whose observation degree does not meet the observation degree condition;
[0023] The duration corresponding to the number of image frames satisfying the observation condition is determined as the withdrawal time satisfying the observation condition.
[0024] In a second aspect, the present application also provides a device for determining the time of withdrawing the mirror. The device comprises:
[0025] A first determination module is used to identify the target video frame by frame, obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of de-focused frames according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0026] A second determination module is used to obtain the observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not meet the observation degree condition among the image frames between the first image frame and the second image frame;
[0027] The third determining module is used to determine the de-focusing time that meets the observation degree condition according to the total de-focusing frame number and the number of image frames whose observation degree does not meet the observation degree condition.
[0028] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0029] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0030] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0031] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0033] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0034] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0035] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0036] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0038] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0039] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0040] The above-mentioned method, device, computer equipment and storage medium for determining the withdrawal time, by performing frame-by-frame recognition on the target video, obtain a first image frame including the first target part and a second image frame including the second target part in the target video, so as to determine the total number of withdrawal frames according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame, and then obtain the observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not meet the observation degree condition in the image frames between the first image frame and the second image frame, and determine the withdrawal time that meets the observation degree condition according to the total number of withdrawal frames and the number of image frames whose observation degree does not meet the observation degree condition. The above-mentioned method realizes the recognition of unstable image frames in the process from the beginning of withdrawal to the end of withdrawal, and then when determining the withdrawal time, removes the duration corresponding to the unstable image frames, so that the withdrawal time that meets the observation degree condition can reflect the accurate diagnosis duration involved in the withdrawal process of the doctor during the colonoscopy. Therefore, the withdrawal time obtained based on the above-mentioned method has extremely high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a schematic structural diagram of an endoscope system in one embodiment;
[0042] Figure 2 1 is a flow chart of a method for determining a mirror withdrawal time in one embodiment;
[0043] Figure 3 is a flow chart of a method for determining the mirror withdrawal time in another embodiment;
[0044] Figure 3A is a flow chart of a training method in one embodiment;
[0045] Figure 4 A schematic flow chart of a method for determining the mirror withdrawal time according to another embodiment;
[0046] Figure 5 is a flow chart of a method for determining the mirror withdrawal time in another embodiment;
[0047] Figure 6 is a flow chart of a method for determining the mirror withdrawal time in another embodiment;
[0048] Figure 7 is a flow chart of a method for determining the mirror withdrawal time in another embodiment;
[0049] Figure 8 is a schematic structural diagram of a device for determining the mirror withdrawal time in one embodiment;
[0050] Fig. 9Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0051] 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.
[0052] First, the background source of the technical problem to be solved by the present application is introduced. When the doctor uses a digestive endoscope for colonoscopy, the intestinal mucosa is diagnosed during the process of withdrawing the endoscope. When the withdrawal time is long, the detection rate of polyps, adenomas and other lesions will increase significantly. Therefore, the withdrawal time is positioned as an important indicator for colonoscopy quality control. The traditional method of determining the withdrawal time is to determine the theoretical withdrawal time by referring to the relevant parameters in the designated rectal cancer screening guidelines. However, simply calculating the withdrawal time cannot reflect the doctor's actual diagnosis time and quality, so the withdrawal time calculated above is not accurate. Based on this, the present application proposes a method for determining the withdrawal time for solving the above technical problems. The following embodiments will specifically illustrate the method for determining the withdrawal time.
[0053] The method for determining the de-mirror time provided in the embodiment of the present application can be applied to the following examples: Figure 1 In the endoscope system shown. The endoscope system includes a mirror body device 101 and a detection device 102, and the detection device 102 is connected to the mirror body device 101 by wire or wireless. The mirror body device 101 is used to obtain a detection video and transmit the detection video to the detection device 102, and the detection device 102 processes the received detection video to determine the withdrawal time corresponding to the detection video. Among them, the mirror body device 101 can be the mirror body part of the endoscope, and the detection device 102 can be but not limited to various terminals, such as personal computers, laptops, smart phones, tablet computers and other devices with image processing functions. For another example, the detection device 102 can directly be a device including an image processor. The detection device 102 can also be a server, or it can be implemented by an independent server or a server cluster composed of multiple servers.
[0054] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the endoscope system to which the scheme of the present application is applied. The specific endoscope system may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0055] In one embodiment, Figure 2 As shown, a method for determining the de-mirror time is provided, and the method is applied to Figure 1 The detection equipment in the example is used to illustrate, including the following steps:
[0056] S201, identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the fade-out according to the first image frame and the second image frame; and determine the observation parameters of each target image frame between the first image frame and the second image frame.
[0057] Among them, the target video can be a video of the withdrawal of the scope during colonoscopy. The first target part can be the ileocecal part, which includes the ileocecal valve, the appendix orifice, the terminal ileum, and the like, which are one of the parts of the intestinal tissue structure. The second target part can be a tissue structure adjacent to the intestinal tissue structure, or it can be any tissue structure other than the intestinal tissue structure, which can also be called an in vitro tissue structure. The first image frame is a withdrawal image captured at the moment when the scope is withdrawn, and the second image frame is a withdrawal image captured at the moment when the scope is withdrawn; the target image frame can be any image frame between the first image frame and the second image frame. The observation parameters of the target image frame include the target information amount of the target image frame relative to the previous adjacent image frame and the change speed of the target image frame relative to the previous adjacent image frame. The observation parameters of the target image frame are used to determine the observation degree of the target image frame.
[0058] In the embodiment of the present application, after the mirror device acquires the target video, the target video can be transmitted to the detection device. When the detection device acquires the target video, the corresponding image recognition algorithm or image recognition model can be further used to identify each image frame in the target video. First, it is specifically identified whether each image frame contains the first target part, thereby detecting the first image frame containing the first target part, and identifying whether each image frame contains the second target part, thereby detecting the second image frame containing the second target part. Since the first image frame is a withdrawn image collected at the time of withdrawing the mirror, and the second image frame is a withdrawn image collected at the time of withdrawing the mirror, the number of image frames included between the first image frame and the second image frame is the total number of withdrawn frames. In the above-mentioned frame-by-frame recognition process, when the first image frame is detected, the next image frame can be used as the target image frame frame by frame, and then the observation parameter of the target image frame can be determined, so that the detection device can determine the observation degree of the target image frame according to the observation parameter, thereby detecting the target image frame that does not meet the observation degree condition between the first image frame and the second image frame.
[0059] It should be noted that when each video frame in the target video frame is identified, and the first target part in the first image frame identified is the ileocecal part, the above-mentioned image recognition model can specifically adopt an ileocecal part recognition module, which can be a pre-trained ileocecal part recognition model. In practical applications, assuming that when each video frame in the target video frame is identified, the "ileocecal part" is recognized for 12 consecutive frames (or other number of frames), it is determined that the ileocecal part has been reached, and the last frame image in the 12 consecutive frames is the first image frame. The ileocecal part recognition model can be a neural network model or other machine learning models. Optionally, the neural network model can include: ResNet, VGG16, AlexNet and other convolutional neural networks. The method for identifying the ileocecal part includes: identifying any one of the ileocecal valve, the appendix orifice, and the terminal ileum, and the ileocecal part can be considered to have been recognized.
[0060] When each video frame in the target video frame is identified, and the second target part in the identified second image frame is an external part, the above image recognition model can specifically use an external recognition module, which can be a pre-trained external recognition module for identifying whether it reaches the external body when retracting the mirror. For example, if each video frame in the target video frame is identified, and the recognition results of 12 consecutive frames (or other number of frames) are external, it is determined that it has reached the external body. At this time, the last frame image in the 12 consecutive frames is the second image frame. Optionally, the above image recognition model can specifically use convolutional neural networks such as ResNet, VGG16, and AlexNet.
[0061] When the observation parameters of the above-mentioned target image frame include the target information amount of the target image frame relative to the previous adjacent image frame, the corresponding information change recognition algorithm can be used to perform information recognition on the target image frame and the previous adjacent image frame respectively, so as to obtain the information amount of the target image frame and the information amount of the previous adjacent image frame, and finally obtain the target information amount of the target image frame relative to the previous adjacent image frame based on these two information amounts; optionally, the detection device can also adopt a corresponding information change recognition model to identify the information change of the target image frame relative to the previous adjacent image frame, so as to obtain the target information amount of the target image frame relative to the previous adjacent image frame, wherein the information change recognition model can be pre-trained based on sample data, and when in use, the target image frame and the previous adjacent image frame can be simultaneously input into the information change recognition model to directly obtain the target information amount of the target image frame relative to the previous adjacent image frame.
[0062] When the observation parameters of the above-mentioned target image frame include the changing speed of the target image frame relative to the previous adjacent image frame, the detection device can adopt a corresponding speed change recognition model to identify the picture change speed of the target image frame relative to the previous adjacent image frame, thereby obtaining the changing speed of the target image frame relative to the previous adjacent image frame, wherein the speed change recognition model can be pre-trained based on sample data.
[0063] S202, obtaining the observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degrees do not meet the observation degree condition among the image frames between the first image frame and the second image frame.
[0064] Among them, the observation degree of the target image frame is used to measure the stability of the target image frame, that is, the higher the observation degree, the stronger the stability of the corresponding target image frame; optionally, the observation degree of the target image frame can also be used to measure the characteristic of the target image frame that is easy to detect, that is, the higher the observation degree, the more convenient the corresponding target image frame is for doctors to detect, that is to say, the image frame with a higher observation degree can more accurately reflect the actual diagnosis time of the doctor in the withdrawal process corresponding to the target video. If the observation degree of the target image frame meets the observation degree condition, it means that the target image frame is a stable image frame, or the target image frame is an image frame that is easy to detect. If the observation degree of the target image frame does not meet the observation degree condition, it means that the target image frame is an unstable image frame, or the target image frame is an image frame that is not easy to detect. The observation degree condition includes that the observation degree of the target image frame is less than a preset observation degree threshold.
[0065] In the embodiment of the present application, when the detection device obtains the observation parameters of the target image frame based on the above steps, the observation parameters of the target image frame can be input into the corresponding observation degree recognition model to obtain the observation degree of the target image frame, wherein the observation degree recognition model can be a model pre-trained based on a sample data set; optionally, the detection device can also use a corresponding observation degree recognition algorithm to calculate based on the observation parameters of the target image frame to obtain the observation degree of the target image frame. When the detection device obtains the observation degree of each target image frame included between the first image frame and the second image frame, the observation degree of each target image frame can be compared with a preset observation degree threshold, thereby filtering out the number of image frames that do not meet the observation degree condition from the image frames included between the first image frame and the second image frame based on the comparison result, thereby obtaining unstable image frames among the image frames included between the first image frame and the second image frame, or obtaining image frames that are not easy to detect among the image frames included between the first image frame and the second image frame.
[0066] S203, determining a retraction time that satisfies the observation degree condition according to the total number of retraction frames and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0067] Among them, the time to withdraw the scope that meets the observation condition can reflect the precise diagnosis time involved in the doctor's process of withdrawing the scope during colonoscopy.
[0068] In the embodiment of the present application, since the number of image frames whose observation degree does not satisfy the observation degree condition represents an unstable number of image frames, the withdrawal time that does not satisfy the observation degree condition represents the time corresponding to the unstable number of image frames. Therefore, the withdrawal frames included in the first image frame and the second image frame are subtracted from the unstable number of image frames included therein, and the result obtained is the stable number of image frames. The stable number of image frames is then converted into the corresponding time to obtain the withdrawal time that meets the observation degree condition.
[0069] Alternatively, since the number of image frames that do not satisfy the observation degree condition represents the number of image frames that are not easy to detect, the withdrawal time that does not satisfy the observation degree condition represents the time corresponding to the number of image frames that are not easy to detect. Therefore, the number of withdrawal frames included between the first image frame and the second image frame is subtracted from the number of image frames that are not easy to detect, and the result is the number of image frames that are easy to detect. The number of image frames that are easy to detect is then converted into the corresponding time to obtain the withdrawal time that meets the observation degree condition.
[0070] In the above-mentioned method for determining the withdrawal time, the target video is identified frame by frame to obtain a first image frame including the first target part and a second image frame including the second target part in the target video, so as to determine the total number of withdrawal frames according to the first image frame and the second image frame; and the observation parameters of the target image frame between the first image frame and the second image frame are determined, and then the observation degree of the target image frame is obtained according to the observation parameters of the target image frame to determine the number of image frames whose observation degree does not meet the observation degree condition, and the withdrawal time that meets the observation degree condition is determined according to the total number of withdrawal frames and the number of image frames whose observation degree does not meet the observation degree condition. The above-mentioned method realizes the identification of unstable image frames or image frames that are not easy to detect in the process from the beginning to the end of withdrawal, and then when determining the withdrawal time, the duration corresponding to the unstable image frames is removed or the image frames that are not easy to detect are removed, so that the withdrawal time that meets the observation degree condition can reflect the precise diagnosis duration involved in the withdrawal process of the doctor during the colonoscopy. Therefore, the withdrawal time obtained based on the above-mentioned method has extremely high accuracy.
[0071] In one embodiment, the observation parameter of the target image frame may include the target information amount of the target image frame relative to the previous adjacent image frame. The following embodiment describes a method for obtaining the above target information amount. Figure 3 As shown, the method includes:
[0072] S301, input each target image frame into the information recognition model for effective information recognition, and obtain the first amount of information contained in each target image frame, and input the previous adjacent image frame into the information recognition model for effective information recognition, and obtain the second amount of information contained in the previous adjacent image frame.
[0073] Optionally, the information recognition model can be used to classify the information level of each image frame. The information level can be divided according to the amount of effective information contained in the image. For example, assuming that the information level is divided into 0-4 levels, from 0 to 4, respectively, the amount of effective information contained in the image is from small to large, 0 represents the least effective information, and 4 represents the most effective information. Optionally, the information level can be divided according to the type of invalid information contained in the image. For example, the image frame may include any invalid information of microscopy, biopsy, surgery, and blur, wherein the blur may include at least one of motion blur, out-of-focus blur, and flushing blur. Assuming that the information level is divided into 0-3 levels, level 0 represents the amount of invalid information of blur type in the image, level 1 represents the amount of invalid information of microscopy type in the image, level 2 represents the amount of invalid information of biopsy type in the image, and level 3 represents the amount of invalid information of surgery type in the image.
[0074] Optionally, the information recognition model can also be used to directly identify the amount of effective information contained in each image frame to determine the size of the effective information contained in each image frame. If the amount of effective information contained in each image frame is large, it means that the stability of the image frame is better or the image frame is easy to detect; if the amount of effective information contained in each image frame is small, it means that the stability of the image frame is poor or the image frame is not easy to detect.
[0075] Correspondingly, the above-mentioned information recognition model can be obtained by training based on sample image frames and standard image frames containing annotations of effective information, and the effective information can be annotated according to the corresponding level. Optionally, the above-mentioned information recognition model can be obtained by training based on sample image frames and gold standard image frames containing non-information annotations, and non-information annotations include annotations of any one of the information such as endoscopy, motion blur, out-of-focus blur, biopsy, surgery, and flushing. For example, 200 sets of colonoscopy videos can be collected first, and the colonoscopy videos can be divided. Specifically, the colonoscopy videos can be divided into a series of 5-second video segments. Each video segment is then annotated. When annotating specifically, the video segments can be annotated into different levels according to any of the above-mentioned annotation methods. For example, the image frames containing endoscopy are annotated as level 2, and the image frames containing surgery are annotated as level 3.
[0076] In an embodiment of the present application, when the detection device determines the target image frame and the previous adjacent image frame, the two image frames can be respectively input into the information recognition model for effective information recognition, thereby obtaining the first amount of information contained in the target image frame and the second amount of information contained in the previous adjacent image frame; optionally, the detection device can also simultaneously input the above two image frames into the information recognition model for effective information recognition, thereby obtaining the first amount of information and the second amount of information.
[0077] Optionally, the present application also provides a training method for the above-mentioned information recognition model, the training method, such as Figure 3A Said may include:
[0078] S3010, obtaining a sample data set;
[0079] S3011, perform non-information frame labeling on the sample data to obtain a labeled sample data set;
[0080] S3012, training the initial information recognition model according to the sample data set and the labeled sample data set to obtain an information recognition model.
[0081] Example Figure 3A The training method includes step 1, obtaining a sample data set, for example, obtaining more than 10,000 colonoscopy images; step 2, annotating a portion of the sample data with non-information frames, wherein the non-information frames include any one of blur, endoscopic examination, biopsy, surgery, etc., wherein blur includes at least one of motion blur, out-of-focus blur, and flushing blur. A labeling method is to classify the amount of non-information contained in the image in the sample data and then label it. For example, if the image contains more non-information, for example, the image contains more motion-blurred pixels, then the image is determined to have a low level. If the image contains less non-information, for example, the image contains less out-of-focus pixels, then the image is determined to have a high level. For another example, the level of the corresponding non-information can also be determined according to the type of non-information contained in the image, for example, the non-information of the type of motion blur or out-of-focus blur is determined as the first level of non-information, the non-information of the type of endoscopic examination or surgery is determined as the second level of non-information, the non-information of the type of biopsy is determined as the third level of non-information, and other types of non-information are determined as the fourth level of non-information. Correspondingly, the image frames with low levels are unstable image frames or image frames that are not easy to detect, and the image frames with high levels are stable image frames or image frames that are easy to detect. It should be noted that the correspondence between the amount of non-information contained in the picture and the level can be predetermined, and the correspondence between the type of non-information contained in the picture and the level can be predetermined.
[0082] Another labeling method is to label according to the number of non-information confirmations contained in the image in the sample data, wherein the number of confirmations refers to the number of doctors who confirm that the information contained in the image is non-information, and the number of confirmations corresponds to the level, that is, the more the number of confirmations, the higher the corresponding level, and the lower the number of confirmations, the lower the corresponding level. An optional way is that when labeling, if a preset number of doctors determine that the image in the sample data is non-information, then the corresponding level of the non-information label is the preset number, for example: if 3 doctors determine that the above image is non-information and 1 doctor determines that the above image is information, then the level of the image is labeled as 3, indicating that the image is likely to be a stable image or an image that is easy to detect; if 1 doctor determines that the above image is non-information and 3 doctors determine that the above image is information, then the level of the image is labeled as 1, indicating that the image is likely to be an unstable image or an image that is not easy to detect. Optionally, in step 3, after labeling the sample data, the sample data can also be preprocessed, wherein the preprocessing includes data desensitization, cropping black frames, image standardization, etc. Correspondingly, the preprocessing method can be used to preprocess the sample data to obtain the processed sample data. Step 4, divide the sample data set into a training data set and a test data set, and the training data set is further divided into a training set and a validation set. Step 5, input the aforementioned training data set into the convolutional neural network training, wherein the convolutional neural network includes: ResNet, VGG16, AlexNet and other two-dimensional convolutional neural networks. And select parameters such as batchsize, epoch, learning rate, etc. During the training process, the loss can be determined based on the labeled sample data and the results of the convolutional neural network output, and then the parameters of the convolutional neural network can be adjusted according to the loss until the loss meets the preset training conditions to complete the training. Step 5, complete the training and obtain the information recognition model used above.
[0083] S302: Obtain a target information amount of a target image frame relative to a previous adjacent image frame according to the first information amount and the second information amount.
[0084] The target information amount of the target image frame relative to the previous adjacent image frame may be an information increment of the target image frame relative to the previous adjacent image frame, or may be an average information amount of the target image frame and the previous adjacent image frame.
[0085] In an embodiment of the present application, when the detection device obtains the first amount of information contained in the target image frame and the second amount of information contained in the previous adjacent image frame based on the aforementioned steps, the detection device can perform a difference operation on the first amount of information and the second amount of information to obtain the target information amount of the target image frame relative to the previous adjacent image frame; optionally, the detection device can also perform a mean operation on the first amount of information and the second amount of information to obtain the average amount of information of the two adjacent image frames, and use the average amount of information of the two adjacent image frames as the target information amount of the target image frame relative to the previous adjacent image frame.
[0086] In one embodiment, the observation parameter of the target image frame may include the change speed of the target image frame relative to the previous adjacent image frame. The following embodiment describes a method for obtaining the above target information amount. Figure 4 As shown, the method includes:
[0087] S401, determining a hash fingerprint of each target image frame and a hash fingerprint of a previous adjacent image frame.
[0088] In the embodiment of the present application, the detection device can compress each target image frame and the previous adjacent image frame into a 64*64 image frame, and convert the compressed target image frame and the previous adjacent image frame into a grayscale image frame to obtain the target image frame and the previous adjacent image frame after grayscale conversion. Then, the hash fingerprint is calculated for the target image frame and the previous adjacent image frame after grayscale conversion, respectively, to obtain the hash fingerprint of each target image frame and the hash fingerprint of the previous adjacent image frame.
[0089] S402 , obtaining a Hamming distance between each target image frame and the previous adjacent image frame according to the hash fingerprint of each target image frame and the hash fingerprint of the previous adjacent image frame.
[0090] In the embodiment of the present application, the detection device can use the corresponding Hamming distance calculation method to calculate the Hamming distance between each target image frame and the previous adjacent image frame according to the hash fingerprint of each target image frame and the hash fingerprint of the previous adjacent image frame. For example, the Hamming distance calculation method can be implemented using the following relationship (1):
[0091]
[0092] Among them, d(x,y) represents the Hamming distance, x represents the hash fingerprint of the target image frame, and y represents the hash fingerprint of the previous adjacent image frame.
[0093] S403 , obtaining a change speed of each target image frame relative to the previous adjacent image frame according to the Hamming distance between each target image frame and the previous adjacent image frame.
[0094] In the embodiment of the present application, the detection device can use a corresponding change speed calculation method to calculate the change speed of the target image frame relative to the previous adjacent image frame according to the Hamming distance between each target image frame and the previous adjacent image frame. For example, the change speed calculation method can be implemented using the following relationship (2):
[0095]
[0096] Among them, v represents the speed of change, and d(x,y) represents the Hamming distance.
[0097] In one embodiment, when the detection device is based on the aforementioned Figure 3 and Figure 4 When the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of the target image frame relative to the previous adjacent image frame are obtained, the observation degree of the target image frame can be further determined. The following embodiment illustrates this method. Figure 5 As shown, the method includes:
[0098] S501, determining a first weight corresponding to a target amount of information, and assigning a corresponding second weight to a change speed.
[0099] The first weight represents the influence of the target information amount on the observation degree of the target image frame. A large first weight means that the target information amount has a large influence on the observation degree of the image frame; a small first weight means that the target information amount has a small influence on the observation degree of the target image frame. The second weight represents the influence of the change speed on the observation degree of the target image frame. A large second weight means that the change speed has a large influence on the observation degree of the target image frame; a small second weight means that the change speed has a small influence on the observation degree of the target image frame.
[0100] In the embodiment of the present application, the detection device can assign a corresponding first weight to the target information amount and a corresponding second weight to the change speed according to the degree of influence on the observation degree of the target image frame, so as to accurately determine the observation degree of the target image according to the first weight and the second weight. As for the degree of influence of the target information amount and the change speed on the observation degree, it can be determined in advance according to the actual detection scene, detection requirements or the number of lesions contained in the detection object. For example, if the target information amount is determined to have a greater influence on the observation degree and the change speed has a smaller influence on the observation degree, the first weight corresponding to the target information amount is set to be larger and the second weight corresponding to the change speed is set to be smaller; if the target information amount is determined to have a smaller influence on the observation degree and the change speed has a larger influence on the observation degree, the first weight corresponding to the target information amount is set to be smaller and the second weight corresponding to the change speed is set to be larger.
[0101] For another example, if during the process of withdrawing the colonoscope, the intestinal tissue structure under examination contains a small number of lesions, that is, the field of view of the process of withdrawing the colonoscope is relatively good, in this case, the first weight corresponding to the target information amount and the second weight corresponding to the change speed can be adjusted accordingly. Correspondingly, if the intestinal tissue structure under examination contains a large number of lesions, that is, the field of view of the process of withdrawing the colonoscope is relatively poor, in this case, the first weight corresponding to the target information amount and the second weight corresponding to the change speed can be adjusted accordingly.
[0102] For another example, the doctor determines that during the process of retracting the mirror in the corresponding scene, the change speed has a greater impact on the observation degree, while the target information amount has a smaller impact on the observation degree. In this case, the first weight corresponding to the target information amount can be set smaller, and the second weight corresponding to the change speed can be set larger.
[0103] S502, based on the first weight and the second weight, the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of each target image frame relative to the previous adjacent image frame are accumulated and calculated to obtain the observation degree of each target image frame.
[0104] In the embodiment of the present application, the detection device can use the following relation (3), and according to the first weight and the second weight, perform cumulative sum operation on the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of each target image frame relative to the previous adjacent image frame to obtain the observation degree of each target image frame. For example, relation (3) can be:
[0105] I = w1 × n + w2 × v (3);
[0106] Among them, I represents the observation degree of the target image frame, n represents the target information amount of the target image frame relative to the previous adjacent image frame, v represents the change speed of the target image frame relative to the previous adjacent image frame, w1 represents the first weight, and w2 represents the second weight.
[0107] In one embodiment, there is provided Figure 2 In one implementation of S203 in the embodiment, that is, the above S203 "determine the time for retracting the image to meet the observation condition according to the total number of retracted frames and the number of image frames whose observation degree does not meet the observation condition", as follows Figure 6 As shown, including:
[0108] S601, determining the number of image frames that meet the observation condition according to the total number of de-mirror frames and the number of image frames whose observation degree does not meet the observation degree condition.
[0109] S602, determining the duration corresponding to the number of image frames satisfying the observation condition as the mirror-retraction time satisfying the observation condition.
[0110] The observation degree condition includes that the observation degree of the target image frame is less than a preset observation degree threshold. If the observation degree of the target image frame is less than the preset observation degree threshold, it indicates that the image stability in the target image frame is good; if the observation degree of the target image frame is not less than the preset observation degree threshold, it indicates that the image in the target image frame is unstable or is not easy to detect. Based on this, an image frame whose observation degree does not meet the observation degree condition is an unstable image frame or an image frame that is not easy to detect, and an image frame whose observation degree meets the observation degree condition is a stable image frame or an image frame that is easy to detect.
[0111] In an embodiment of the present application, when the detection device obtains the total number of image frames contained in the target video between the start time and the end time of the inspection, it can remove the time length corresponding to the unstable image frames or image frames that are not easy to detect, and the remaining time length is the time length occupied by the stable image frames or image frames that are easy to detect.
[0112] Optionally, the present application provides an early warning method for reminding the user of abnormal image frames during the mirror withdrawal process, that is, unstable image frames or image frames that are not easy to detect. The method includes: the detection device obtains the observation degree of each target image frame based on any of the aforementioned embodiments, and further determines whether each target image frame meets the observation degree condition. If the observation degree condition is met, it is determined that the image stability in the target image frame is good or the image frame is easy to detect. If the observation degree condition is not met, it is determined that the image stability in the target image frame is poor or the image frame is not easy to detect. The observation degree condition includes that the observation degree of the target image frame is less than a preset observation degree threshold. The preset observation degree threshold can also be a warning threshold. That is, when it is detected that the observation degree of the target image frame is less than the preset observation degree threshold, it can be prompted that "the image stability is good or the image is easy to detect"; when it is detected that the observation degree of the target image frame is not less than the preset observation degree threshold, it can be prompted that "the image stability is poor or the image is not easy to detect". For example, assuming that the preset observation degree threshold is 1 or 2, when the observation degree of the target image frame is less than 1 or 2, a warning message can be initiated, and it can also be further based on the aforementioned Figure 3 The method described in the embodiment identifies the effective information amount contained in the target image frame, and based on the above Figure 4 The method described in the embodiment identifies the picture change speed of the target image frame, thereby indicating whether the picture is unstable or difficult to detect due to "too little information", or "the picture changes too fast", or both.
[0113] Based on all the above embodiments, a method for determining the mirror withdrawal time is also provided. Figure 7 As shown, the method includes:
[0114] S701, identifying a target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video.
[0115] S702: Determine a total number of de-focused frames according to the first image frame and the second image frame.
[0116] S703, input each pair of adjacent target image frames between the first image frame and the second image frame into the information recognition model for effective information recognition, and obtain the effective information amount contained in each target image frame and its adjacent target image frame, that is, the first information amount and the second information amount.
[0117] S704: Determine a target information amount of each target image frame relative to a previous adjacent image frame according to the first information amount and the second information amount.
[0118] S705, determining the hash fingerprint of the target image frame and the hash fingerprint of the previous adjacent image frame.
[0119] S706 , obtaining a Hamming distance between the target image frame and the previous adjacent image frame according to the hash fingerprint of the target image frame and the hash fingerprint of the previous adjacent image frame.
[0120] S707 , obtaining a change speed of the target image frame relative to the previous adjacent image frame according to the Hamming distance between the target image frame and the previous adjacent image frame.
[0121] S708, assigning a corresponding first weight to the target information amount, and assigning a corresponding second weight to the change speed.
[0122] S709, based on the first weight and the second weight, perform cumulative sum calculation on the target information amount of the target image frame relative to the previous adjacent image frame and the change speed of the target image frame relative to the previous adjacent image frame to obtain the observation degree of the target image frame.
[0123] S710, determining the number of image frames that meet the observation condition according to the total number of de-mirror frames and the number of image frames whose observation degree does not meet the observation degree condition.
[0124] S711, determining the duration corresponding to the number of image frames that meet the observation condition as the retraction time that meets the observation condition.
[0125] The above steps are all described in the above embodiments. Please refer to the above description for details and will not be repeated here.
[0126] The method for determining the time of withdrawing the image described in the embodiment of the present application realizes the accurate time of withdrawing the image by detecting the stability of the image for each target image frame between the detection start time and the detection end time. Moreover, in the method for determining whether each target image frame is stable, the embodiment of the present application determines whether the target image frame is stable by two dimensions, namely, the target information amount of the image and the speed of change of the image, which can further improve the accuracy of the time of withdrawing the image.
[0127] 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.
[0128] Based on the same inventive concept, the embodiment of the present application also provides a device for determining the time of withdrawing the mirror for implementing the method for determining the time of withdrawing the mirror mentioned above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method mentioned above, so the specific limitations in the embodiments of one or more devices for determining the time of withdrawing the mirror provided below can refer to the limitations of the method for determining the time of withdrawing the mirror above, and will not be repeated here.
[0129] In one embodiment, Figure 8 As shown, a device for determining the time of withdrawing the mirror is provided, comprising:
[0130] The first determination module 10 is used to identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the fade-out according to the first image frame and the second image frame; and determine the observation parameters of each target image frame between the first image frame and the second image frame.
[0131] The second determination module 11 is used to obtain the observation degree of each target image frame according to the observation parameters of each target image frame, so as to determine the number of image frames whose observation degree does not meet the observation degree condition among the image frames between the first image frame and the second image frame.
[0132] The third determining module 12 is used to determine the de-focusing time that meets the observation degree condition according to the total de-focusing frame number and the number of image frames whose observation degree does not meet the observation degree condition.
[0133] In one embodiment, the second determination module 11 is specifically used to input each of the target image frames into the information recognition model for effective information recognition to obtain a first amount of information contained in each of the target image frames, and to input the previous adjacent image frame into the information recognition model for effective information recognition to obtain a second amount of information contained in the previous adjacent image frame; based on the first amount of information and the second amount of information, the target information amount of each target image frame relative to the previous adjacent image frame is obtained.
[0134] In one embodiment, the second determination module 11 is further specifically used to determine the hash fingerprint of each of the target image frames and the hash fingerprint of the previous adjacent image frame; obtain the Hamming distance between each of the target image frames and the previous adjacent image frame based on the hash fingerprint of each of the target image frames and the hash fingerprint of the previous adjacent image frame; obtain the change speed of each of the target image frames relative to the previous adjacent image frame based on the Hamming distance between each of the target image frames and the previous adjacent image frame.
[0135] In one embodiment, the second determination module 11 is specifically used to assign a corresponding first weight to the target information amount and a corresponding second weight to the change speed; based on the first weight and the second weight, the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of the target image frame relative to the previous adjacent image frame are accumulated and calculated to obtain the observation degree of each target image frame.
[0136] In one embodiment, the observation degree condition includes: the observation degree of the target image frame is less than a preset observation degree threshold.
[0137] In one embodiment, the third determination module 12 is specifically used to determine the number of image frames that meet the observation condition based on the total number of withdrawn frames and the number of image frames whose observation degree does not meet the observation degree condition; and determine the time length corresponding to the number of image frames that meet the observation condition as the withdrawn time that meets the observation degree condition.
[0138] Each module in the above-mentioned device for determining the time of retracting the mirror 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.
[0139] In one embodiment, an image processing device is provided. The image processing device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the method described in any of the above embodiments are implemented.
[0140] 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. 9 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. 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 time of retreating the mirror 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 covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0141] Those skilled in the art will understand that Fig. 9 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.
[0142] 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:
[0143] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0144] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0145] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0146] 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:
[0147] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0148] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0149] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0150] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0151] Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame;
[0152] Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame;
[0153] A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
[0154] 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.
[0155] The technical features of the above embodiments may be combined arbitrarily. 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.
[0156] 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 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 method for determining the time of de-focusing, characterized in that: The method comprises: Identify the target video frame by frame to obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of frames of the de-focused image according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame; Obtaining an observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not satisfy the observation degree condition among the image frames between the first image frame and the second image frame; A withdrawn frame time that satisfies the observation degree condition is determined according to the total withdrawn frame number and the number of image frames whose observation degree does not satisfy the observation degree condition.
2. The method according to claim 1, characterized in that The observation parameter includes the target information amount of the target image frame relative to the previous adjacent image frame, and the determination of the observation parameter of each target image frame between the first image frame and the second image frame includes: Inputting each of the target image frames into the information recognition model to perform effective information recognition, thereby obtaining a first amount of information contained in each of the target image frames, and inputting the previous adjacent image frame into the information recognition model to perform effective information recognition, thereby obtaining a second amount of information contained in the previous adjacent image frame; The target information amount of each target image frame relative to the previous adjacent image frame is obtained according to the first information amount and the second information amount.
3. The method according to claim 1, characterized in that The observation parameter includes a change speed of each target image frame relative to a previous adjacent image frame, and the determination of the observation parameter of each target image frame between the first image frame and the second image frame includes: Determine a hash fingerprint of each of the target image frames and a hash fingerprint of the previous adjacent image frame; Obtaining a Hamming distance between each of the target image frames and the previous adjacent image frame according to the hash fingerprint of each of the target image frames and the hash fingerprint of the previous adjacent image frame; According to the Hamming distance between each of the target image frames and the previous adjacent image frame, the change speed of each of the target image frames relative to the previous adjacent image frame is obtained.
4. The method according to claim 1, characterized in that: The observation parameters include the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of each target image frame relative to the previous adjacent image frame. The observation degree of each target image frame is obtained according to the observation parameters of each target image frame, including: Determine a first weight corresponding to the target information amount and a second weight corresponding to the change speed; According to the first weight and the second weight, the target information amount of each target image frame relative to the previous adjacent image frame and the change speed of each target image frame relative to the previous adjacent image frame are accumulated and calculated to obtain the observation degree of each target image frame.
5. The method according to any one of claims 1 to 4, characterized in that: The observation degree condition includes: the observation degree of the target image frame is less than a preset observation degree threshold.
6. The method according to any one of claims 1 to 4, characterized in that: The step of determining the time for retracting the image that satisfies the observation degree condition according to the total number of retracted frames and the number of image frames where the observation degree does not satisfy the observation degree condition comprises: Determining the number of image frames that meet the observation condition according to the total number of defocused frames and the number of image frames whose observation degree does not meet the observation degree condition; The duration corresponding to the number of image frames satisfying the observation condition is determined as the withdrawal time satisfying the observation condition.
7. A device for determining the time of withdrawing the mirror, characterized in that: The device comprises: A first determination module is used to identify the target video frame by frame, obtain a first image frame including a first target part and a second image frame including a second target part in the target video, so as to determine the total number of de-focused frames according to the first image frame and the second image frame; and determine the observation parameter of each target image frame between the first image frame and the second image frame; A second determination module is used to obtain the observation degree of each target image frame according to the observation parameter of each target image frame, so as to determine the number of image frames whose observation degree does not meet the observation degree condition among the image frames between the first image frame and the second image frame; The third determining module is used to determine the de-focusing time that meets the observation degree condition according to the total de-focusing frame number and the number of image frames whose observation degree does not meet the observation degree condition.
8. 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 6 are implemented.
9. 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 6 are implemented.
10. 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 6 are implemented.
Citation Information
Patent Citations
Monitoring method and system for endoscope diagnosis and treatment operation process
CN111000633A
Enteroscope withdrawal overspeed proportion monitoring method based on two-channel convolutional neural network
CN111754503A
Real-time monitoring method for enteroscope withdrawal time based on random forest algorithm
CN111767958A
Intestinal tract endoscope retreating speed smoothing method
CN113487553A
Effective mirror retreating time evaluation method and device for enteroscopy and storage medium
CN113962998A
