A method and device for testing endoscope performance based on pre-trained neural network model
The method employs a pre-trained neural network to analyze endoscope images and calculate gray value differences to assess performance, addressing the issue of deteriorating endoscope accuracy and reducing fault rates and costs.
Patent Information
- Application Number
- CN202411669765.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Endoscopes' performance deteriorates with use, leading to inaccurate diagnostic judgments by doctors due to inability to detect faults or abnormalities in the equipment.
A method and apparatus utilizing a pre-trained neural network model to analyze historical endoscope images by categorizing and calculating gray value differences to assess endoscope performance.
This approach enables accurate evaluation of endoscope performance, reducing fault rates and improving detection accuracy without external resources, thus lowering costs.
Smart Images

Figure CN119169397B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical device technology, and in particular to a method and device for testing endoscope performance based on a pre-trained neural network model. Background Art
[0002] During the use of an endoscope, as the number of uses increases, the performance of the endoscope will decline due to the number of uses or improper operation. Once the performance of the endoscope declines, it is easy for the doctor to deviate from the judgment of the diagnostic results.
[0003] However, for doctors, if the endoscope is not unusable or has obvious abnormalities, doctors cannot determine that the endoscope is abnormal or malfunctioning, so they will continue to use the endoscope, which may easily lead to deviations in diagnostic results.
[0004] Therefore, how to solve the above problems is an issue that needs to be solved urgently. Summary of the invention
[0005] The present application provides a method and device for testing endoscope performance based on a pre-trained neural network model, aiming to improve the above-mentioned problems.
[0006] In a first aspect, the present application provides a method for testing endoscope performance based on a pre-trained neural network model, the method comprising:
[0007] Access historical images acquired by endoscopy;
[0008] Classifying the historical images according to the lesion areas collected by the endoscope based on the pre-trained neural network model to obtain a first image set, a second image set, and a third image set;
[0009] Performing grayscale value difference calculation on each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set;
[0010] Processing the first difference value set, the second difference value set and the third difference value set respectively to obtain a first difference value, a second difference value and a third difference value;
[0011] A performance of the endoscope is determined based on the first difference, the second difference, and the third difference.
[0012] In a possible embodiment, the historical images are classified based on a pre-trained neural network model to obtain a first image set, a second image set, and a third image set, including:
[0013] The historical images are classified according to the lesion areas collected by the endoscope based on the pre-trained neural network model to obtain a first image set, a second image set and a third image set.
[0014] In a possible embodiment, grayscale value differences are calculated for each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set, including:
[0015] Calculating grayscale value differences between the Nth image and the N-1th image in the first image set to obtain a first difference set, where N is greater than 1;
[0016] Calculating the grayscale value difference between the Mth image and the M-1th image in the second image set to obtain a second difference set, where M is greater than 1;
[0017] Grayscale value differences are calculated for the P-th image and the P-1-th image in the third image set to obtain a third difference set, where P is greater than 1.
[0018] In a possible embodiment, grayscale value differences are calculated for each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set, including:
[0019] Calculating grayscale value differences between the Nth image in the first image set and the first image to obtain a first difference set, where N is greater than 1;
[0020] Calculating grayscale value differences between the Mth image in the second image set and the first image to obtain a second difference set, where M is greater than 1;
[0021] Grayscale value differences are calculated between the Pth image in the third image set and the first image to obtain a third difference set, where P is greater than 1.
[0022] In a possible embodiment, the step of calculating the grayscale value difference between the Nth image in the first image set and the first image to obtain a first difference set includes:
[0023] Acquire a first subset of the first image set that carries a first label;
[0024] Calculating grayscale values of the first image to the Nth image in the first subset;
[0025] The difference between any two of the grayscale values is calculated to obtain a first difference set, where N is greater than 1.
[0026] In a possible embodiment, determining the performance of the endoscope according to the first difference, the second difference, and the third difference includes:
[0027] determining whether a difference between the first difference, the second difference, and the third difference is less than a threshold;
[0028] If so, it is determined that the performance of the endoscope is good;
[0029] If not, it is determined that the performance of the endoscope is poor.
[0030] In a possible embodiment, determining whether a difference between the first difference, the second difference, and the third difference is less than a threshold value includes:
[0031] determining whether at least two of the first difference, the second difference, and the third difference are greater than a first sub-threshold;
[0032] If so, determine whether at least one of the two differences greater than the first sub-threshold is greater than a second threshold.
[0033] In a second aspect, the present application provides an endoscope performance testing device based on a pre-trained neural network model, the device comprising:
[0034] A data acquisition unit, used to obtain historical images acquired by the endoscope;
[0035] An image classification unit, configured to classify the historical images according to the lesion areas collected by the endoscope based on a pre-trained neural network model to obtain a first image set, a second image set, and a third image set;
[0036] a data processing unit, configured to respectively calculate the gray value difference of each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set; and respectively process the first difference set, the second difference set, and the third difference set to obtain a first difference value, a second difference value, and a third difference value;
[0037] A performance evaluation unit is used to determine the performance of the endoscope based on the first difference, the second difference and the third difference.
[0038] The above-mentioned application provides a method and device for testing the performance of an endoscope based on a pre-trained neural network model. The application obtains historical images collected by the endoscope; classifies the historical images based on the pre-trained neural network model to obtain a first image set, a second image set, and a third image set; respectively calculates the grayscale value difference of each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set; respectively processes the first difference set, the second difference set, and the third difference set to obtain a first difference, a second difference, and a third difference; and determines the performance of the endoscope according to the first difference, the second difference, and the third difference. Thus, the historical images collected by the endoscope are analyzed to accurately evaluate the performance of the endoscope, so as to reduce the failure rate of the endoscope and improve the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0041] Figure 2 A flowchart of a method for testing endoscope performance based on a pre-trained neural network model provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the functional modules of an endoscope performance testing device based on a pre-trained neural network model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0044] During the use of an endoscope, as the number of uses increases, the performance of the endoscope will decline due to the number of uses or improper operation. Once the performance of the endoscope declines, it is easy for the doctor to deviate from the judgment of the diagnostic results.
[0045] However, for doctors, if the endoscope is not unusable or has obvious abnormalities, doctors cannot determine that the endoscope is abnormal or malfunctioning, so they will continue to use the endoscope, which may easily lead to deviations in diagnostic results.
[0046] Therefore, it is necessary to perform performance testing on endoscopes.
[0047] Based on this, the present application proposes an endoscope performance testing method based on a pre-trained neural network model to overcome the above-mentioned technical problems.
[0048] like Figure 1 As shown, Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, which can be used in the present application Figure 1 The schematic diagram shown is used to describe an electronic device 200 that is an example of an endoscope performance testing method and apparatus based on a pre-trained neural network model according to an embodiment of the present application.
[0049] like Figure 1 The electronic device 200 includes one or more processors 102, one or more storage devices 104, and an input device 106. These components are interconnected via a bus system and / or other forms of connection mechanisms (not shown). It should be noted that Figure 1 The components and structure of the electronic device 200 shown are only exemplary and not restrictive. The electronic device may have Figure 1 Some of the components shown may also have Figure 1 Other components and structures are not shown.
[0050] The processor 102 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 200 to perform desired functions.
[0051] It should be understood that the processor 102 in the embodiment of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0052] The storage device 104 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media.
[0053] It should be understood that the storage device 104 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0054] Among them, one or more computer program instructions can be stored on the computer-readable storage medium, and the processor 102 can execute the program instructions to implement the client functions (implemented by the processor) in the embodiments of the present application described below and / or other desired functions. Various applications and various data, such as various data used and / or generated by the application, can also be stored in the computer-readable storage medium.
[0055] The input device 106 may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
[0056] Reference Figure 2 , Figure 2 A flowchart of a method for testing endoscope performance based on a pre-trained neural network model provided in an embodiment of the present application, the method is used to detect the performance of an endoscope, and the method specifically includes the following steps:
[0057] Step S201, obtaining historical images collected by the endoscope.
[0058] It is understandable that the historical images collected by the endoscope are stored in a certain storage space, such as a fixed storage pool in the hospital, or on a local device. No specific limitation is made here.
[0059] The historical images refer to images of the patient collected by the endoscope before the current moment.
[0060] Step S202: classify the historical images based on the pre-trained neural network model to obtain a first image set, a second image set, and a third image set.
[0061] Among them, the neural network model includes a coding layer, a feature fusion layer and a decoding layer. The feature fusion layer is used to enhance and fuse the features of each level extracted by the coding layer and output them to the decoding layer; the coding layer is divided into the first type of coding layer and the second type of coding layer.
[0062] It should be understood that this application does not make any specific limitation on the training of the neural network model.
[0063] It should be noted that the neural network model can be a convolutional neural network model or a radial neural network model, and no specific limitation is made here.
[0064] As an implementation mode, step S202 includes: classifying the historical images according to the lesion area collected by the endoscope based on a pre-trained neural network model to obtain a first image set, a second image set and a third image set.
[0065] It is understandable that the lesion area refers to the area where the doctor uses the endoscope to collect images of the lesion on the patient, for example, the bridge of the nose, esophagus, maxilla, lungs, etc.
[0066] That is to say, in the present application, the images captured by the endoscope are classified according to parts of the human body through a neural network model, such as the esophagus is classified into one class (such as the first image set), the maxilla is classified into one class (such as the second image set), and the lungs are classified into one class (such as the third image set).
[0067] Step S203: performing grayscale value difference calculation on each two images in the first image set, the second image set and the third image set to obtain a first difference set, a second difference set and a third difference set.
[0068] As an implementation method, step S203 includes: calculating the grayscale value difference between the Nth image and the N-1th image in the first image set to obtain a first difference set, where N is greater than 1; calculating the grayscale value difference between the Mth image and the M-1th image in the second image set to obtain a second difference set, where M is greater than 1; and calculating the grayscale value difference between the Pth image and the P-1th image in the third image set to obtain a third difference set, where P is greater than 1.
[0069] For example, assuming that the first image set has 20 historical images, then calculate the grayscale value of each image separately, then perform difference calculation between the grayscale value of the 20th image (i.e., the Nth image) and the grayscale value of the 19th image to obtain a difference, then perform difference calculation between the grayscale value of the 19th image and the grayscale value of the 18th image to obtain another difference, and so on, perform difference calculation between the grayscale value of the second image and the grayscale value of the first image (i.e., the first image) to obtain a difference, and form all the differences into a set, i.e., the first difference set. Similarly, the processing of the second image set and the third image set refers to the first image set, and will not be repeated here.
[0070] It should be understood that due to the difference in the amount of data collected by the endoscope itself, the amount of data in the first difference value set will also be different.
[0071] As another implementation, step S203 includes: calculating the grayscale value difference between the Nth image in the first image set and the first image to obtain a first difference set, where N is greater than 1; calculating the grayscale value difference between the Mth image in the second image set and the first image to obtain a second difference set, where M is greater than 1; and calculating the grayscale value difference between the Pth image in the third image set and the first image to obtain a third difference set, where P is greater than 1.
[0072] It should be noted that the images in the image set are sorted in chronological order, that is, the first image is collected earlier than the Nth image, and the Nth image is the last image of this type collected before the current moment. Similarly, the Mth image and the Pth image are the last images of this type collected before the current moment.
[0073] Continuing with the above example, the first image set represents the esophagus, the second image set represents the maxilla, and the third image set represents the lungs. Then the Nth image is the last image involving the esophagus before the current moment.
[0074] For example, assuming that the first image set has 20 historical images, the grayscale values of the 20th image and the 1st image are calculated respectively, and then the grayscale value of the 20th image is calculated to be different from the grayscale value of the 1st image to obtain a difference value, which is the first difference value set. Similarly, the processing of the second image set and the third image set refers to the first image set, and will not be repeated here.
[0075] It is understandable that the inventors found during the use of the endoscope that as the number of uses increases, the performance of the endoscope will decline with the number of uses or improper operation. For example, the pixel values of the images collected by the endoscope are overall low. Therefore, by directly calculating the grayscale difference between the last image and the first image, the grayscale difference in the image can be quickly calculated, so as to quickly judge the performance of the endoscope and improve the detection efficiency. In addition, since the present application no longer needs to borrow external data / external resources, only historical images can be used to detect the performance of the endoscope, which can effectively reduce the detection cost.
[0076] Optionally, the grayscale value difference calculation of the Nth image in the first image set and the first image to obtain a first difference set includes: obtaining a first subset of the first image set that carries a first label; calculating the grayscale values of the first image to the Nth image in the first subset; and calculating the difference between any two of the grayscale values to obtain a first difference set, where N is greater than 1.
[0077] It is understandable that each image in the first image set carries a different label, which is used to describe the degree of the patient's lesion. These labels can be divided into a first label, a second label and a third label. The first label is used to describe that the patient has no lesion, the second label is used to describe that the degree of the patient's lesion is mild, and the third label is used to describe that the degree of the patient's lesion is moderate. Of course, there is also a fourth label used to describe that the degree of the patient's lesion is severe. This is not specifically limited here.
[0078] Optionally, the grayscale value difference calculation of the Mth image in the second image set and the first image to obtain a second difference set includes: obtaining a second subset of the second image set carrying the first label; calculating the grayscale values of the first image to the Mth image in the second subset; calculating the difference between any two of the grayscale values to obtain a second difference set, where M is greater than 1.
[0079] Optionally, the grayscale value difference calculation of the Pth image and the first image in the third image set to obtain a third difference set includes: obtaining a third subset carrying the first label in the third image set; calculating the grayscale values of the first image to the Pth image in the third subset; calculating the difference between any two of the grayscale values to obtain a third difference set, where P is greater than 1.
[0080] It is understandable that the present application can improve the accuracy of endoscope performance detection by performing grayscale processing on images without lesions, and avoid the influence of different lesion degrees of lesion sites on grayscale values.
[0081] It should be noted that algorithms such as floating point method, integer method, shift method, etc. can be used in this application, and no specific limitation is made here.
[0082] It should be noted that when performing grayscale calculation, the image needs to be grayscale processed, for example, through a grayscale histogram.
[0083] Step S204: Process the first difference value set, the second difference value set and the third difference value set respectively to obtain a first difference value, a second difference value and a third difference value.
[0084] It is understandable that if the first difference set, the second difference set and the third difference set each have only one difference, no processing is performed, that is, the first difference set is defaulted to be the first difference, the second difference set is the second difference, and the third difference set is the third difference.
[0085] Step S205: determining the performance of the endoscope according to the first difference, the second difference and the third difference.
[0086] As an embodiment, step S205 includes: determining whether the difference between the first difference, the second difference and the third difference is less than a threshold value; if so, determining that the performance of the endoscope is good; if not, determining that the performance of the endoscope is poor.
[0087] Optionally, determining whether the difference between the first difference, the second difference and the third difference is less than a threshold includes: determining whether at least two of the first difference, the second difference and the third difference are greater than a first sub-threshold; and if so, determining whether at least one of the two differences greater than the first sub-threshold is greater than a second threshold.
[0088] It can be understood that, under the premise that there are at least two differences greater than the first sub-threshold, when there is at least one difference greater than the second threshold, it can be determined that the performance of the endoscope has been reduced.
[0089] The first threshold is smaller than the second threshold, for example, the first threshold is (0, 2%), and the second threshold is (2%, 10%).
[0090] Among them, the calculation of the image grayscale difference can be X=|X1-X2| / X2, X1 is the grayscale value of the next image, X2 is the grayscale value of the previous image, and taking the example in the above embodiment as an example, X1 is the grayscale value of the Nth image, and X2 is the grayscale value of the first image.
[0091] It is understandable that by comprehensively evaluating the image data of different parts, the impact of endoscope operator abnormalities can be reduced to improve the accuracy of endoscope performance testing based on the pre-trained neural network model.
[0092] It can be understood that the embodiment of the present application provides an endoscope performance test method based on a pre-trained neural network model, by acquiring historical images collected by the endoscope; classifying the historical images based on the pre-trained neural network model to obtain a first image set, a second image set and a third image set; respectively calculating the gray value difference of each two images in the first image set, the second image set and the third image set to obtain a first difference set, a second difference set and a third difference set; respectively processing the first difference set, the second difference set and the third difference set to obtain a first difference, a second difference and a third difference; determining the performance of the endoscope according to the first difference, the second difference and the third difference. Thus, the historical images collected by the endoscope are used for analysis to accurately evaluate the performance of the endoscope, so as to reduce the failure rate of the endoscope and improve the detection accuracy; at the same time, since the performance test method of the present application does not need to borrow external data / external resources, only historical images can be used to detect the performance of the endoscope, which can effectively reduce the detection cost.
[0093] See also Figure 3 , Figure 3An endoscope performance test device based on a pre-trained neural network model provided in an embodiment of the present application, the endoscope performance test device based on a pre-trained neural network model 500 includes: a data acquisition unit 510, an image classification unit 520, a data processing unit 530 and a performance evaluation unit 540, wherein the specific functions of each unit are as follows:
[0094] A data acquisition unit 510 is used to acquire historical images acquired by the endoscope;
[0095] An image classification unit 520, configured to classify the historical images based on a pre-trained neural network model to obtain a first image set, a second image set, and a third image set;
[0096] The data processing unit 530 is configured to respectively calculate the gray value difference of each two images in the first image set, the second image set and the third image set to obtain a first difference set, a second difference set and a third difference set; and respectively process the first difference set, the second difference set and the third difference set to obtain a first difference value, a second difference value and a third difference value;
[0097] The performance evaluation unit 540 is used to determine the performance of the endoscope according to the first difference, the second difference and the third difference.
[0098] It should be noted that the specific implementation of each unit of the endoscope performance testing device 500 based on the pre-trained neural network model please refer to the description of the method embodiment, which will not be repeated here.
[0099] Furthermore, this embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processing device, the steps of any one of the endoscope performance testing methods based on a pre-trained neural network model provided in the above-mentioned embodiment 2 are executed.
[0100] It should be noted that the above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0101] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0102] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0103] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0104] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0106] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0108] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0109] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
Claims
1. A method for testing endoscope performance based on a pre-trained neural network model, characterized in that: The method comprises: Access historical images acquired by endoscopy; Classifying the historical images according to the lesion areas collected by the endoscope based on the pre-trained neural network model to obtain a first image set, a second image set, and a third image set; Performing grayscale value difference calculation on each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set; Processing the first difference value set, the second difference value set and the third difference value set respectively to obtain a first difference value, a second difference value and a third difference value; The performance of the endoscope is determined according to the first difference, the second difference and the third difference; wherein grayscale value difference calculation is performed on each two images in the first image set, the second image set and the third image set to obtain the first difference set, the second difference set and the third difference set, including: Calculating grayscale value differences between the Nth image and the N-1th image in the first image set to obtain a first difference set, where N is greater than 1; Calculating the grayscale value difference between the Mth image and the M-1th image in the second image set to obtain a second difference set, where M is greater than 1; Grayscale value differences are calculated for the P-th image and the P-1-th image in the third image set to obtain a third difference set, where P is greater than 1.
2. The method according to claim 1, characterized in that Grayscale value differences are calculated for each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set, including: Calculating grayscale value differences between the Nth image in the first image set and the first image to obtain a first difference set, where N is greater than 1; Calculating grayscale value differences between the Mth image in the second image set and the first image to obtain a second difference set, where M is greater than 1; Grayscale value differences are calculated between the Pth image in the third image set and the first image to obtain a third difference set, where P is greater than 1.
3. The method according to claim 2, characterized in that The step of calculating the grayscale value difference between the Nth image in the first image set and the first image to obtain a first difference value set includes: Acquire a first subset of the first image set that carries a first label; Calculating grayscale values of the first image to the Nth image in the first subset; The difference between any two of the grayscale values is calculated to obtain a first difference set, where N is greater than 1.
4. The method according to claim 1, characterized in that: Determining the performance of the endoscope according to the first difference, the second difference and the third difference includes: determining whether a difference between the first difference, the second difference, and the third difference is less than a threshold; If so, it is determined that the performance of the endoscope is good; If not, it is determined that the performance of the endoscope is poor.
5. The method according to claim 4, characterized in that The determining whether the difference between the first difference, the second difference, and the third difference is less than a threshold value comprises: Calculate whether the difference between the first difference and the second difference and the third difference is less than a threshold; or, It is determined whether the first difference, the second difference and the third difference are less than a threshold value.
6. An endoscope performance testing device based on a pre-trained neural network model, characterized in that: The device comprises: A data acquisition unit, used to obtain historical images acquired by the endoscope; An image classification unit, configured to classify the historical images according to the lesion areas collected by the endoscope based on a pre-trained neural network model to obtain a first image set, a second image set, and a third image set; a data processing unit, configured to respectively calculate the gray value difference of each two images in the first image set, the second image set, and the third image set to obtain a first difference set, a second difference set, and a third difference set; and respectively process the first difference set, the second difference set, and the third difference set to obtain a first difference value, a second difference value, and a third difference value; a performance evaluation unit, configured to determine the performance of the endoscope according to the first difference, the second difference and the third difference; Wherein, the data processing unit is specifically used for: Calculating grayscale value differences between the Nth image and the N-1th image in the first image set to obtain a first difference set, where N is greater than 1; Calculating the grayscale value difference between the Mth image and the M-1th image in the second image set to obtain a second difference set, where M is greater than 1; Grayscale value differences are calculated for the P-th image and the P-1-th image in the third image set to obtain a third difference set, where P is greater than 1.
Citation Information
Patent Citations
Front-mounted lens online intelligent self-cleaning device and method based on lens fuzzy detection
CN113814212A