Disclosure of Invention
In order to solve the problems, the invention provides a system for identifying and positioning the pancreatic neuroendocrine tumor under an ultrasonic endoscope, which can quickly and accurately identify and position PNET in the examination process.
In some embodiments, the following technical scheme is adopted:
a system for endosonically identifying and locating a pancreatic neuroendocrine tumor, comprising:
the image acquisition module is connected to the endoscope host through an acquisition card to acquire image information of each frame acquired by the endoscope host; selecting a single frame of endoscopic image with PNET lesion to construct a sample set;
a training set making module configured to label a pancreatic neuroendocrine tumor region in the sample set image using a multi-objective labeling tool; meanwhile, generating labeled text information corresponding to the labeled position; the marked region and the marked text information corresponding to the region form a training set;
the auxiliary diagnosis module is configured to construct an auxiliary diagnosis model, and after optimization training is carried out on the auxiliary diagnosis model through a training set, pancreatic neuroendocrine tumor lesion region identification is carried out on an input preprocessed image;
and the joint judgment module is configured to display the output result in a color band diagram form and is used for judging the accuracy of the pancreatic neuroendocrine tumor lesion area identification result.
Further, the output result is displayed in the form of a color band diagram, specifically:
(1) setting an initial value of the color band diagram;
(2) judging whether the output probability of the current frame image PNET is greater than a set value; if yes, increasing the current probability value by the color bar value corresponding to the current image; when the PNET output probability is smaller than a set value, subtracting a difference value between the set value and the current output probability from a color bar value corresponding to the current image;
(3) repeating the step (2) until all the images are judged, and sequentially connecting the color band values of each frame of image according to the image input sequence to obtain a final color band diagram;
(4) and judging the reliability of the output result of the current auxiliary diagnosis model through the color change of the color band diagram.
In other embodiments, the following technical solutions are adopted:
a terminal device comprising a processor and a computer-readable storage medium, the processor being configured to implement instructions; the computer readable storage medium is used for storing a plurality of instructions adapted to be loaded by a processor and for performing the following process:
the method comprises the steps that an endoscope host is accessed through an acquisition card, and image information of each frame acquired by the endoscope host is acquired; selecting a single frame of endoscopic image with PNET lesion to construct a sample set;
marking the pancreatic neuroendocrine tumor region in the sample set image by using a multi-target marking tool; meanwhile, generating labeled text information corresponding to the labeled position; the marked region and the marked text information corresponding to the region form a training set;
constructing an auxiliary diagnosis model, and performing optimization training on a training set, and then performing pancreatic neuroendocrine tumor lesion region identification on an input preprocessed image;
and displaying the output result in a color band diagram form, and judging the accuracy of the pancreatic neuroendocrine tumor lesion area identification result.
In other embodiments, the following technical solutions are adopted:
a computer readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor of a terminal device and to perform the process of:
the method comprises the steps that an endoscope host is accessed through an acquisition card, and image information of each frame acquired by the endoscope host is acquired; selecting a single frame of endoscopic image with PNET lesion to construct a sample set;
marking the pancreatic neuroendocrine tumor region in the sample set image by using a multi-target marking tool; meanwhile, generating labeled text information corresponding to the labeled position; the marked region and the marked text information corresponding to the region form a training set;
constructing an auxiliary diagnosis model, and performing optimization training on a training set, and then performing pancreatic neuroendocrine tumor lesion region identification on an input preprocessed image;
and displaying the output result in a color band diagram form, and judging the accuracy of the pancreatic neuroendocrine tumor lesion area identification result.
Compared with the prior art, the invention has the beneficial effects that:
the invention can visually judge the certainty factor of the current output result by observing whether the color change of the color band diagram is consistent; the reliability of the diagnosis result is improved.
Through the intelligent automatic identification of PNET under the ultrasonic endoscope, the PNET can be accurately identified and positioned in a large number of generated ultrasonic endoscope pictures in the ultrasonic endoscope inspection process, the detection rate of the PNET is improved, and missed diagnosis is reduced.
Detailed Description
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
Example one
In one or more embodiments, a system for endosonically identifying and locating a pancreatic neuroendocrine tumor is disclosed, comprising:
the image acquisition module is connected to the endoscope host through an acquisition card to acquire image information of each frame acquired by the endoscope host; manually selecting a single-frame endoscopic image with PNET lesion to construct a sample set;
the image preprocessing module is configured to preprocess the acquired image information;
since the image with the PNET lesion is acquired in a single piece under the ultrasonic endoscope in clinic, the private data of the patient in the image needs to be removed. To reduce the amount of calculation, the black border is removed and only the colored digestive tract area is reserved.
And (3) performing black edge algorithm processing, scaling processing and normalization processing, removing redundant boundaries of the endoscopic image after each frame of image is subjected to black edge algorithm, only reserving an ROI (region of interest), and adjusting the resolution of all the images by 416X416 resolution by adopting a bicubic interpolation scaling algorithm.
A training set making module configured to label a pancreatic neuroendocrine tumor region in the sample set image using a multi-objective labeling tool; meanwhile, generating labeled text information corresponding to the labeled position; the marked region and the marked text information corresponding to the region form a training set;
and performing PNET identification by using a target detection deep learning technology, marking a characteristic region of the image, and recording region fixed-point coordinates by using a picture frame in a disease region. The embodiment uses a Yolo target detection model, and an ultrasonic endoscopic image without PNET does not need to be marked.
The specific labeling method comprises the following steps:
observing the PNET characteristic region of each image, drawing a rectangular frame on the picture through a marking tool, and drawing a rectangle by taking the outer cut rectangle of the focus region as a central region when drawing the rectangular frame, wherein the rectangle completely contains the outer cut rectangle of the focus and is 10 pixels away from the outer cut rectangle of the focus up, down, left and right.
The auxiliary diagnosis module is configured to construct an auxiliary diagnosis model, and after optimization training is carried out on the auxiliary diagnosis model through a training set, pancreatic neuroendocrine tumor lesion region identification is carried out on an input preprocessed image;
in this embodiment, the auxiliary diagnosis model may adopt a YOLO v3 neural network model, which has the characteristics of high detection accuracy and high detection speed, and can meet the requirement of real-time detection of the digestive endoscopy.
To achieve better training, we use a dynamic learning rate, which is given by the formula:
learning_rate=base_lr*(1-epoch/train_epoch)*2;
wherein, the learning _ rate is the current learning rate, the base _ lr is the initial learning rate, the epoch is the current iteration number, and the train _ epoch training total iteration number.
And in order to avoid overfitting, observing the descending condition of the loss function in real time, and stopping training in time when the fluctuation of the loss function is not large.
The effect of model training is evaluated by a loss function. The goal of the training is to find the minimum of the loss function. Finding the minimum uses a gradient descent. The learning rate is the magnitude of the adjustment range of each batch parameter. A dynamic learning rate may speed up training. When training begins, the learning rate value is larger, the adjustment range of each batch of parameters is large, and the loss function can be reduced more quickly. When the minimum value of the loss function is reached, if the adjustment amplitude is too large, the lowest point may be crossed, so that the loss function rises, and the minimum point is oscillated around the minimum value point, so that the minimum point cannot be found, and the learning rate is dynamically reduced.
In other embodiments, the auxiliary diagnostic model specifically works as follows:
in the first stage, attention diagram and a thick boundary box are predicted through a reduced complete picture to obtain the position and the rough size of the pancreatic neuroendocrine tumor in the picture, and the down-sampling mode is favorable for reducing inference time and facilitating context information acquisition.
Specifically, an original picture is reduced to a picture with a long edge of 255, 3 attention maps are predicted in an upper sampling layer of an hourglass network and are respectively used for predicting small (smaller than 32) middle (between 32 and 96) and large (larger than 96) PNET feature areas, sizes are controlled when different sizes are predicted to facilitate subsequent clipping, a focal loss with alpha being 2 is used in training, the midpoint of a group trial Bounding Box is set to be positive, the rest are negative samples, and the central position of the PNET feature area is generated when the size is larger than a threshold t being 0.3 in testing.
The position derived from the reduced full picture is used to determine where processing is required. If cropped directly from the zoomed-out picture, some PNET feature areas may be too small to be detected accurately. Therefore, it is necessary to obtain size information on a high-resolution feature map from the beginning.
The center position (rough) is acquired from the attention map, the magnification factor (more the small target is magnified) can be selected according to the rough PNET characteristic region size, the magnification factor is set at each possible center position (x, y), and finally the image at the moment is mapped back to the original image, and the size of 255 × 255 is taken as the cutting region by taking (x, y) as the center point.
The position derived from the predicted bounding box contains more dimensional information of the feature region of the PNET. The resulting bounding box size may be used to determine the zoom size.
And finally, generating a final detection frame through a corner detection mechanism, embedding and offsetting through predicting a corner heat map of the cutting area, and finally mapping the coordinates back to the original image.
And finally, eliminating redundant frames by adopting a Soft NMS algorithm, wherein manual elimination can be adopted for detection frames contacting with the boundary of the cutting area.
And the identification result auditing module is configured to audit the identification result, re-label the pancreatic neuroendocrine tumor lesion area of the image with the identification error, and modify the labeled text information.
As the characteristics of pancreatic cancer and other conditions under the ultrasonic endoscope are similar to those of PNET, after the training of a PNET recognition model under the ultrasonic endoscope is completed, in the clinical test, the image with the wrong recognition is collected and used as a negative sample to be added into a training set for retraining.
This enables the output result accuracy of the auxiliary diagnostic model to be continually optimised.
And the joint judgment module is configured to display the output result in a color band diagram form and is used for judging the accuracy of the pancreatic neuroendocrine tumor lesion area identification result.
The neural network concludes that an image may be erroneous, and this certainty increases significantly if successive frame inferences are consistently directed to the same conclusion. The color change of the color bar can intuitively judge the certainty factor of the current AI inference.
Therefore, a color band diagram from light to deep is designed, and the output result of each frame of image corresponds to a color band value; the clinical examination PNET identification model gradually deepens the color band diagram if the suspected PNET is output (the PNET network output probability is greater than 50%), and lightens the color band diagram if the suspected PNET is output (the PNET network output probability is less than 50%).
Specifically, the method comprises the following steps:
1) setting the initial color band value to 0;
2) judging whether the output probability of the current frame image PNET is more than 50%;
3) when the PNET output probability is greater than 50%, accumulating the probability value by the current color bar value;
4) and when the PNET output probability is less than 50%, accumulating the current color bar value by the difference between the current output probability and the 50%. Namely: current color bar value primary color bar value- (50% -current PNET output probability).
And repeating the steps 2) -4) until all the images are judged, and sequentially connecting the color band values of each frame of image according to the image input sequence to obtain the final color band diagram.
Example two
In one or more embodiments, a terminal device is disclosed that includes a processor and a computer-readable storage medium, the processor to implement instructions; the computer readable storage medium is used for storing a plurality of instructions adapted to be loaded by a processor and to perform the process of figure 1:
the method comprises the steps that an endoscope host is accessed through an acquisition card, and image information of each frame acquired by the endoscope host is acquired; selecting a single frame of endoscopic image with PNET lesion to construct a sample set;
marking the pancreatic neuroendocrine tumor region in the sample set image by using a multi-target marking tool; meanwhile, generating labeled text information corresponding to the labeled position; the marked region and the marked text information corresponding to the region form a training set;
constructing an auxiliary diagnosis model, and performing optimization training on a training set, and then performing pancreatic neuroendocrine tumor lesion region identification on an input preprocessed image;
and displaying the output result in a color band diagram form, and judging the accuracy of the pancreatic neuroendocrine tumor lesion area identification result.
In other embodiments, a computer-readable storage medium is disclosed having stored therein a plurality of instructions adapted to be loaded by a processor of a terminal device and to perform the process of fig. 1:
the method comprises the steps that an endoscope host is accessed through an acquisition card, and image information of each frame acquired by the endoscope host is acquired; selecting a single frame of endoscopic image with PNET lesion to construct a sample set;
marking the pancreatic neuroendocrine tumor region in the sample set image by using a multi-target marking tool; meanwhile, generating labeled text information corresponding to the labeled position; the marked region and the marked text information corresponding to the region form a training set;
constructing an auxiliary diagnosis model, and performing optimization training on a training set, and then performing pancreatic neuroendocrine tumor lesion region identification on an input preprocessed image;
and displaying the output result in a color band diagram form, and judging the accuracy of the pancreatic neuroendocrine tumor lesion area identification result.
The specific implementation method of the above process corresponds to the working process of the corresponding functional module in the first embodiment, and is not described again.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.