WO2023030097A1 - Method and apparatus for determining cleanliness of tissue cavity, and readable medium and electronic device - Google Patents

Method and apparatus for determining cleanliness of tissue cavity, and readable medium and electronic device Download PDF

Info

Publication number
WO2023030097A1
WO2023030097A1 PCT/CN2022/114259 CN2022114259W WO2023030097A1 WO 2023030097 A1 WO2023030097 A1 WO 2023030097A1 CN 2022114259 W CN2022114259 W CN 2022114259W WO 2023030097 A1 WO2023030097 A1 WO 2023030097A1
Authority
WO
WIPO (PCT)
Prior art keywords
cleanliness
sample
tissue image
image
rounding
Prior art date
Application number
PCT/CN2022/114259
Other languages
French (fr)
Chinese (zh)
Inventor
边成
杨志雄
杨延展
李永会
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023030097A1 publication Critical patent/WO2023030097A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10068Endoscopic image

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a method, device, readable medium and electronic equipment for determining the cleanliness of a tissue cavity.
  • the endoscope is equipped with optical lens, image sensor, light source and other components, which can enter the inside of the human body for inspection, so that doctors can intuitively observe the internal conditions of the human body, and have been widely used in the medical field.
  • To ensure the accuracy of endoscopic examination results it is necessary to judge the cleanliness of the tissue cavity. If the cleanliness is too low, it means that the tissue preparation is insufficient, which may cause the problem of missing small polyps or adenomas, and even cause endoscopy. A mirror check failed and a repeat check is required. Therefore, accurately identifying the cleanliness of tissues can ensure the validity and accuracy of endoscopy.
  • the endoscope may be, for example, a colonoscope, a gastroscope, or the like.
  • the inspected tissue is the intestinal tract, and what needs to be identified is the cleanliness of the intestinal lumen.
  • the inspected tissue is the esophagus or stomach, and what needs to be identified is the esophageal cavity or Cleanliness of gastric cavity.
  • the cleanliness of the tissue cavity is usually determined by professionals at the stage of withdrawing the endoscope after the endoscopic examination, based on the actual inspection of the tissue.
  • the requirements for the experience and operation level of the professionals are relatively high, and there is a certain degree of subjectivity.
  • the present disclosure provides a method for determining the cleanliness of a tissue cavity, the method comprising:
  • the initial cleanliness is rounded to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • the present disclosure provides a device for determining the cleanliness of a tissue cavity, the device comprising:
  • An acquisition module configured to acquire tissue images collected by the endoscope
  • a recognition module configured to determine an initial cleanliness and a target rounding method according to the tissue image and a pre-trained recognition model, where the initial cleanliness is a floating-point type;
  • the rounding module is configured to round the initial cleanliness according to the target rounding manner to obtain the cleanliness of the tissue image, and the cleanliness is integer.
  • the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect of the present disclosure are implemented.
  • an electronic device including:
  • a processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.
  • the present disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • the disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
  • Fig. 1 is a flow chart of a method for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 2 is a flowchart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 3 is a schematic diagram of a recognition model shown according to an exemplary embodiment
  • Fig. 4 is a flowchart showing a training recognition model according to an exemplary embodiment
  • Fig. 5 is a flow chart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 6 is a flowchart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 7 is a flow chart showing a training classification model according to an exemplary embodiment
  • Fig. 8 is a block diagram of a device for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 9 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 10 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 11 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment
  • Fig. 12 is a block diagram of an electronic device according to an exemplary embodiment.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • Fig. 1 is a flowchart of a method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 1, the method includes the following steps:
  • Step 101 acquire tissue images collected by an endoscope.
  • the endoscope when performing an endoscopic inspection, the endoscope will continuously collect images in the tissue according to the preset collection period.
  • the tissue image in this embodiment can be the image collected by the endoscope at the current moment, or It can be an image collected by the endoscope at any time. That is to say, the tissue image can be an image collected by the endoscope during the process of entering the tissue (ie, the process of entering the mirror), or it can be an image collected by the endoscope during the process of withdrawing from the tissue (ie, the process of withdrawing the mirror). This is not specifically limited. Further, after the tissue image is obtained, the tissue image can also be preprocessed, which can be understood as performing enhancement processing on the data included in the tissue image.
  • Preprocessing can include: random affine transformation, random brightness, contrast, saturation, chroma adjustment, random erasing of some pixels, flip processing (including: left-right flip, up-down flip, rotation, etc.), size transformation (English: Resize) and so on, the finally obtained preprocessed tissue image may be an image of a specified size (for example, it may be 224*224).
  • Step 102 Determine the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, where the initial cleanliness is a floating-point type.
  • the preprocessed tissue image can be input into the pre-trained recognition model, so that the recognition model can recognize the tissue image, and output the initial cleanliness and target rounding method of floating point.
  • the recognition model can determine the matching probabilities of the tissue image and multiple types of cleanliness, and then determine the initial cleanliness according to the multiple matching probabilities.
  • the initial cleanliness is a floating point type, that is to say, the initial cleanliness is usually not an integer.
  • Various types of cleanliness are used to indicate the cleanliness of tissue images. For example, an endoscope is a colonoscope, and a tissue image is an intestinal image.
  • the multiple cleanliness types can be the Boston Bowel Cleanliness Score Standard (English: Boston Bowel Preparation Scale, abbreviation: BBPS) in the four types: that is, the cleanliness type is 0 points, corresponding to "the entire intestinal mucosa cannot be observed due to solid and liquid feces that cannot be removed", and the cleanliness type is 1 point, corresponding to "due to Part of the intestinal mucosa cannot be observed due to stains, turbid liquid, and residual feces", the cleanliness type is 2 points, corresponding to "the intestinal mucosa is well observed, but a small amount of stains, turbid liquid, and feces remain", and the cleanliness type is 3 Score, corresponding to "the intestinal mucosa is well observed, basically no residual stains, turbid liquid, and feces".
  • BBPS Boston Bowel Cleanliness Score Standard
  • the recognition model can also determine the matching probability of the tissue image and multiple rounding methods, and then determine the target rounding method according to the multiple matching probabilities.
  • the multiple rounding methods may include, for example: rounding up (such as the ceil function), rounding down (such as the floor function), and the like.
  • the recognition model can be trained according to a large number of pre-collected training images and a cleanliness label corresponding to each training image.
  • the recognition model can be, for example, CNN (English: Convolutional Neural Networks, Chinese: convolutional neural network) or LSTM (English: Long Short-Term Memory, Chinese: long-term short-term memory network), or Transformer (such as Vision Transformer). Encoder, etc., this disclosure does not specifically limit it.
  • step 103 the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • the initial cleanliness may be rounded according to the target rounding method, so as to obtain the cleanliness of the integer tissue image. If the target rounding method is upward rounding, then the initial cleanliness can be rounded up as the cleanliness of the tissue image; if the target rounding method is downward rounding, then the initial cleanliness can be rounded down Integrate as the cleanliness of the tissue image. For example, the initial cleanliness is 2.8, if the target rounding method is up, then the cleanliness is 3, if the target rounding method is down, then the cleanliness is 2.
  • this embodiment can use the recognition model to learn from tissue images that are suitable for tissue images.
  • the target rounding method is used to obtain the cleanliness of the tissue image, which can effectively improve the robustness and accuracy of the cleanliness.
  • this embodiment can determine the current cleanliness of the tissue cavity in real time, without limiting the cleanliness judgment during the process of withdrawing the mirror, and can be timely based on The cleanliness of the tissue cavity is used to determine the next operation of the endoscope, avoiding problems such as invalid mirror entry and repeated inspections.
  • the endoscope described in the embodiments of the present disclosure can be, for example, a colonoscope or a gastroscope. If the endoscope is a colonoscope, then the above-mentioned tissue image is an intestinal image, and the tissue cavity is the intestinal cavity. Then this embodiment determines the cleanliness of the intestinal lumen. If the endoscope is a gastroscope, then the tissue image above can be an image of the esophagus, stomach or duodenum, and correspondingly, the tissue cavity can be the cavity of the esophagus, the cavity of the stomach, or the cavity of the duodenum, then In this embodiment, the cleanliness of esophageal cavity, gastric cavity and duodenal cavity are determined. In the present disclosure, the endoscope can also be used to collect images of other tissues with cavities to determine the cleanliness of the tissue cavities, which is not specifically limited in the present disclosure.
  • the disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating-point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • the disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
  • Fig. 2 is a flow chart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment.
  • the recognition model is shown in Fig. 3, which includes: model and rounded submodels.
  • the structure of the feature extraction sub-model may be, for example, the Encoder in the Vision Transformer, or other structures capable of extracting image features, which are not specifically limited in the present disclosure.
  • the structure of the cleanliness sub-model can be, for example, two linear layers (which can be understood as fully connected layers), cascaded together through the ReLU nonlinear layer, or other structures.
  • the structure of the rounding sub-model can be, for example, a linear layer. Other structures are also possible, which is not specifically limited in the present disclosure.
  • step 102 may include:
  • Step 1021 input the tissue image into the feature extraction sub-model to obtain the image features output by the feature extraction sub-model for characterizing the tissue image.
  • the tissue image is first input into the feature extraction sub-model to obtain the image features output by the feature extraction sub-model for characterizing the tissue image.
  • the structure of the feature extraction sub-model is the Encoder in the Vision Transformer as an example to describe the process of extracting image features in detail.
  • the tissue image can be divided into 196 sub-image.
  • the linear projection layer (English: Linear Projection) can be used to flatten each sub-image to obtain an image vector corresponding to the sub-image (which can be expressed as patch embedding), and the image vector can represent the sub-image.
  • a position vector (which may be represented as position embedding) for indicating the position of the sub-image in the tissue image may also be generated, where the size of the position embedding is the same as that of the patch embedding.
  • the position embedding can be randomly generated, and the Encoder can learn the representation of the position of the corresponding sub-image in the tissue image. Afterwards, according to the image vector and position vector of each sub-image, a token corresponding to the sub-image (which can be expressed as a token) can be generated. Specifically, the token corresponding to each sub-image may be obtained by concatenating the image vector and the position vector of the sub-image (which can be understood as concat).
  • the token corresponding to the tissue image may also be generated.
  • an image vector and a position vector can be randomly generated and concatenated to serve as tokens corresponding to the tissue image.
  • the token corresponding to each sub-image and the token corresponding to the tissue image can be input into the encoder, and the encoder can generate a local encoding vector corresponding to each sub-image according to the token corresponding to each sub-image.
  • it can also be based on Tokens corresponding to all sub-images generate global encoding vectors corresponding to tissue images.
  • the local encoding vector can be understood as a vector learned by the encoder and can represent the corresponding sub-image
  • the global encoding vector can be understood as the vector learned by the encoder and can represent the entire tissue image.
  • the global encoding vector can be used as the output of the feature extraction sub-model, i.e. image features. It is also possible to concatenate the global encoding vector and the local encoding vector as the output of the feature extraction sub-model, that is, the image feature. In this way, the image feature can not only represent the global information, but also represent the local information.
  • step 1022 the image features are respectively input into the cleanliness sub-model and the rounding sub-model to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model.
  • Step 1023 determine the initial cleanliness according to the cleanliness vector, and determine the target rounding method according to the rounding vector.
  • the image features can be input into the cleanliness sub-model and the rounding sub-model respectively to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model.
  • the dimension of the cleanliness vector output by the cleanliness sub-model is the same as the number of cleanliness types.
  • the tissue image is an intestinal image (that is, an endoscope is a colonoscope)
  • the BBPS includes four types of cleanliness types, then the dimension of the cleanliness vector can be 1*4, and each dimension corresponds to a cleanliness degree type.
  • the dimension of the rounding vector output by the rounding sub-model is the same as the number of rounding methods.
  • the rounding methods include two types of rounding up and rounding down, so the dimension of the rounding vector can be 1* 2. Each dimension corresponds to a rounding type.
  • the initial cleanliness is determined according to the cleanliness vector, and the target rounding method is determined according to the rounding vector.
  • the manner of determining the initial cleanliness in step 1023 may include:
  • Step 1) According to the cleanliness vector, determine the matching probabilities of the tissue image and various cleanliness types.
  • Step 2) Determine the initial cleanliness according to the weight corresponding to each cleanliness type and the matching probability of the tissue image and multiple cleanliness types.
  • the Softmax function can be used to process the cleanliness vector to obtain the matching probability of the tissue image and various cleanliness types, and then according to the weight corresponding to each cleanliness type, and the matching probability of the tissue image and various cleanliness types, The multiple matching probabilities are weighted and summed to get the initial cleanliness.
  • the tissue image is an intestinal image (that is, the endoscope is a colonoscope)
  • the weight corresponding to each type of cleanliness can be determined according to the score of the BBPS.
  • the initial cleanliness can be determined by formula 1:
  • S represents the initial cleanliness
  • N represents the number of cleanliness types
  • a i represents the weight corresponding to the i-th cleanliness type.
  • p i (x) represents the matching probability between the tissue image and the i-th cleanliness type (which can be understood as the output of the Softmax function)
  • f i (x) represents the value of the i-th dimension in the cleanliness vector
  • x represents the image feature.
  • the tissue image as the intestinal image that is, the endoscope is the colonoscope
  • the manner of determining the target rounding manner in step 1023 may include:
  • Step 3 Determine the matching probabilities of the tissue image and multiple rounding methods according to the rounding vector.
  • Step 4) Determine the target rounding method among the multiple rounding methods according to the matching probabilities between the tissue image and the multiple rounding methods.
  • the Softmax function can also be used to process the rounding vector to obtain the matching probability of the tissue image and multiple rounding methods, and then select the rounding with the highest corresponding matching probability among the matching probabilities of the tissue image and multiple rounding methods mode as the destination rounding mode.
  • formula 2 can be used to determine the matching probability of the tissue image and multiple rounding methods:
  • M represents the number of rounding methods
  • q j (x) represents the matching probability of the tissue image and the jth rounding method
  • g j (x) represents the value of the jth dimension in the rounding vector
  • x represents the image feature.
  • Fig. 4 is a flow chart showing a training recognition model according to an exemplary embodiment. As shown in Fig. 4, the recognition model is obtained by training in the following manner:
  • Step A obtaining a first sample input set and a first sample output set
  • the first sample input set includes: a plurality of first sample inputs, each first sample input includes a sample tissue image, the first sample The output set includes a first sample output corresponding to each first sample input, each first sample output including the true cleanliness of the corresponding sample tissue image.
  • step B the first sample input set is used as the input of the recognition model, and the first sample output set is used as the output of the recognition model, so as to train the recognition model.
  • the loss of the identification model is determined according to the cleanliness loss and the rounding loss
  • the cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set
  • the rounding loss is determined according to the output of the rounding sub-model and the first sample output set This output set is OK.
  • the first sample input set includes a plurality of first sample inputs, and each first sample input may be a sample tissue image, and the sample tissue image may be, for example, a tissue image collected during an endoscopic examination before.
  • the first sample output set includes a first sample output corresponding to each first sample input, and each first sample output includes the true cleanliness of the corresponding sample tissue image. The real cleanliness is used to indicate the cleanliness of the sample tissue image.
  • the real cleanliness can be divided into four types according to the BBPS: 0 points, corresponding to "due to inability to Cleared solid and liquid feces lead to unobservable part of the intestinal mucosa", 1 point, corresponding to "partial intestinal mucosa cannot be observed due to stains, cloudy liquid, residual feces", 2 points, corresponding to "the intestinal mucosa is well observed, But a small amount of stains, turbid liquid, and feces remain", 3 points, corresponding to "the intestinal mucosa is well observed, and there are basically no residual stains, turbid liquid, and feces".
  • the first sample input set can be used as the input of the recognition model, and then the first sample output set can be used as the output of the recognition model to train the recognition model, so that when the first sample input set is input
  • the output of the recognition model can match the output set of the first sample.
  • the loss function of the recognition model can be determined according to the output of the recognition model and the first sample output set, with the goal of reducing the loss function, and the backpropagation algorithm is used to correct the parameters of the neurons in the recognition model, the parameters of the neurons For example, it may be a weight (English: Weight) and a bias (English: Bias) of a neuron. Repeat the above steps until the loss function satisfies the preset condition, for example, the loss function is smaller than the preset loss threshold, so as to achieve the purpose of training the recognition model.
  • the loss of the recognition model can be divided into two parts: cleanliness loss and rounding loss.
  • cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set
  • rounding loss is determined according to the output of the rounding sub-model and the first sample output set.
  • Equation 3 The loss of the recognition model can be determined by Equation 3:
  • L represents the loss of the recognition model
  • L 1 represents the rounding loss
  • L 2 represents the cleanliness loss
  • represents the weight parameter corresponding to the cleanliness loss, for example, it can be set to 0.5.
  • L 2 represents the cleanliness loss
  • f represents the output of the cleanliness sub-model
  • y 2 represents the real cleanliness included in the output of the first sample
  • l fy 2 .
  • the rounding loss can be determined by formula five, namely the cross entropy loss function (English: CrossEntropyLoss):
  • L 1 represents the rounding loss
  • M represents the number of rounding methods
  • y 1,j represents the rounding method corresponding to the real cleanliness included in the first sample output
  • g j represents the rounding vector output by the rounding sub-model The value of the jth dimension in .
  • the initial learning rate of the training recognition model can be set to: 5e-2
  • the Batch size can be set to: 128,
  • the optimizer can be selected: SGD
  • Epoch can be set to: 60
  • Decay can be set to: 0.1
  • the sample organization image The size can be: 224 ⁇ 224.
  • each sample tissue image includes a plurality of cleanliness labels
  • the true cleanliness of the sample tissue image is determined according to the multiple cleanliness labels of the sample tissue image
  • the consistency of the sample tissue image is determined according to the sample Among the multiple cleanliness labels of the tissue image, the number of cleanliness labels matching the real cleanliness is determined.
  • the first sample output also includes a degree of consistency of the corresponding sample tissue image.
  • the cleanliness loss is determined from the output of the cleanliness sub-model, the true cleanliness and consistency contained in each first sample input.
  • each first sample input included in the first sample input set can be marked by a plurality of professionals (for example, personnel with more than 5 years of experience in the industry). After marking, each sample Tissue images are included with multiple cleanliness labels. Then, the true cleanliness and consistency of each sample tissue image can be determined according to the plurality of cleanliness labels of the sample tissue image.
  • the true cleanliness may be determined according to the number of identical cleanliness labels among the multiple cleanliness labels. For example, if a sample tissue image includes K cleanliness labels, among which more than K/2 cleanliness labels are 2 points, then it can be determined that the real cleanliness of the sample tissue image is 2 points. For another example, if a sample tissue image includes K cleanliness labels, and there are no more than K/2 identical cleanliness labels, then the sample tissue image can be deleted from the first sample input set, that is, the sample tissue image is discarded . In this way, the influence of subjectivity on the true cleanliness can be reduced, thereby ensuring the stability of the recognition model training.
  • the degree of consistency can be determined according to the number of cleanliness labels matching the real cleanliness among the multiple cleanliness labels of the sample tissue image.
  • a sample tissue image includes K cleanliness labels, among which, there are D (D ⁇ K/2) cleanliness labels with 3 points, the true cleanliness of the sample tissue image is 3 points, and the consistency of the sample tissue image is The degree is D.
  • the degree of consistency is used to indicate the degree of difficulty in distinguishing the image of the sample tissue. The higher the degree of consistency, the easier it is to distinguish the image of the sample tissue, and the lower the degree of consistency, the more difficult it is to distinguish the image of the sample tissue.
  • each first sample output may include not only the actual cleanliness of the corresponding sample tissue image, but also the consistency of the corresponding sample tissue image.
  • the cleanliness loss can be determined from the output of the cleanliness sub-model, the true cleanliness and consistency contained in each first sample input. Specifically, the cleanliness loss can be determined by formula six:
  • L 2 represents the loss of cleanliness
  • t represents a preset threshold
  • l fy 2
  • represents the preset control coefficient, for example, it can be set to 0.1
  • D represents the first sample output
  • K represents the possible degree of consistency in the output of the first sample, taking each sample tissue image including 5 cleanliness labels as an example, then the possible degrees of consistency are 3, 4, 5.
  • the consistency of the sample tissue image is introduced in the cleanliness loss, which can reduce the influence of subjectivity on the recognition model training, thereby improving the stability and accuracy of the recognition model.
  • Fig. 5 is a flow chart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 5, before step 102, the method may further include:
  • Step 104 classify the tissue image by using the pre-trained classification model to determine the target type of the tissue image.
  • step 102 may be:
  • the initial cleanliness and the target rounding method are determined according to the tissue image and the recognition model.
  • the tissue image collected by the endoscope can be input into a pre-trained classification model, so that the classification model can classify the tissue image, and the output of the classification model is the target type of the tissue image.
  • the target type may include: the first type and the second type, the first type is used to indicate that the quality of the tissue image meets the preset condition, indicating that the quality of the tissue image is high, and the second type is used to indicate that the quality of the tissue image does not meet the preset condition condition, indicating poor quality of tissue images.
  • the classification model is used to identify the type of the input image, and the classification model can be trained according to a large number of pre-collected training images and a type label corresponding to each training image.
  • the classification model can be, for example, CNN or LSTM, or an Encoder in Transformer (such as Vision Transformer), etc., which is not specifically limited in the present disclosure.
  • the preset conditions may include: the colonoscope is not blocked when the intestinal image is collected, and the distance between the colonoscope and the intestinal wall is greater than the preset distance when the intestinal image is collected Threshold, the exposure of the intestinal tract image is less than the preset exposure threshold, the blurriness of the intestinal tract image is less than the preset blurriness threshold, there is no intestinal adhesion in the intestinal tract image, and the like.
  • the intestinal tract is covered by sewage, or the colonoscope is too close to the intestinal wall, the intestinal image is overexposed, the intestinal image is too blurred, or the intestinal adhesion occurs, the quality of the intestinal image does not meet the preset conditions.
  • the tissue image can be input into the recognition model, so that the recognition model can determine the initial cleanliness and the rounding method of the target. That is to say, when it is determined that the quality of the tissue image is high, the tissue image is then identified. In the case where the target type indicates that the quality of the tissue image does not meet the preset condition, the tissue image may be discarded directly. Further, the image collected by the endoscope in the next collection cycle may be selected, and the above steps may be repeated to determine the cleanliness of the tissue cavity.
  • Fig. 6 is a flowchart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 6, the implementation of step 104 may include:
  • Step 1041 perform preprocessing on the tissue image, and divide the preprocessed tissue image into multiple sub-images of equal size.
  • Step 1042 according to the image vector corresponding to each sub-image and the position vector corresponding to the sub-image, determine the token corresponding to the sub-image, and the position vector is used to indicate the position of the sub-image in the preprocessed tissue image.
  • Step 1043 Input the token corresponding to each sub-image and the token corresponding to the tissue image into the encoder to obtain a local encoding vector corresponding to each sub-image and a global encoding vector corresponding to the tissue image.
  • Step 1044 input the global encoding vector and multiple local encoding vectors into the classification layer, so as to obtain the target type output by the classification layer.
  • the classification model may include: an encoder and a classification layer, and may also include a linear projection layer.
  • the encoder can be the Encoder in Vision Transformer
  • the classification layer can be MLP (English: Multilayer Perceptron Head)
  • the linear projection layer can be understood as a fully connected layer.
  • the tissue image can be preprocessed to enhance the data included in the tissue image.
  • the preprocessing can include: random affine transformation, random brightness, contrast, saturation, hue adjustment, size transformation, etc., and finally get
  • the preprocessed tissue image may be an image of a specified size (for example, 224*224).
  • the preprocessed tissue image can be divided into multiple sub-images of equal size (which can be represented as patches) according to the specified size. For example, the preprocessed tissue image is 224*224, and the specified size is 16*16, then you can Divide the preprocessed tissue image into 196 sub-images.
  • each sub-image can be flattened by using the linear projection layer to obtain an image vector corresponding to the sub-image (which can be expressed as patch embedding), and the image vector can represent the sub-image.
  • a position vector (may be expressed as position embedding) for indicating the position of the sub-image in the preprocessed tissue image may also be generated, where the size of the position embedding is the same as that of the patch embedding. It should be noted that the position embedding can be randomly generated, and the encoder can learn the representation of the position of the corresponding sub-image in the tissue image.
  • a token corresponding to the sub-image (which can be expressed as a token) can be generated.
  • the token corresponding to each sub-image may be obtained by concatenating the image vector and the position vector of the sub-image.
  • the token corresponding to the tissue image may also be generated.
  • an image vector and a position vector can be randomly generated and concatenated to serve as tokens corresponding to the tissue image.
  • the token corresponding to each sub-image and the token corresponding to the tissue image can be input into the encoder, and the encoder can generate a local encoding vector corresponding to each sub-image according to the token corresponding to each sub-image.
  • the encoder can also be based on Tokens corresponding to all sub-images generate global encoding vectors corresponding to tissue images.
  • the local encoding vector can be understood as a vector learned by the encoder and can represent the corresponding sub-image
  • the global encoding vector can be understood as the vector learned by the encoder and can represent the entire tissue image.
  • the global encoding vector and multiple local encoding vectors can be input into the classification layer, and the output of the classification layer is the target type.
  • the global encoding vector and multiple local encoding vectors can be concatenated to obtain a comprehensive encoding vector, and then the integrated encoding vector is input into the classification layer, and the classification layer can determine the matching of tissue images with various types according to the integrated encoding vector. Probability, and finally the type with the highest matching probability is used as the target type. Since the input of the classification layer includes both the global encoding vector and each local encoding vector, the characteristics of the entire tissue image and each sub-image are integrated, that is, the global information and local information are considered, which can effectively improve the classification accuracy of the classification model. .
  • Fig. 7 is a flow chart showing a training classification model according to an exemplary embodiment. As shown in Fig. 7, the classification model is obtained by training in the following manner:
  • Step C obtaining a second sample input set and a second sample output set
  • the second sample input set includes: a plurality of second sample inputs, each second sample input includes a sample tissue image, and the second sample output set includes each The second sample input corresponds to the second sample output, and each second sample output includes the true type of the corresponding sample tissue image.
  • step D the second sample input set is used as the input of the classification model, and the second sample output set is used as the output of the classification model, so as to train the classification model.
  • the second sample input set includes a plurality of second sample inputs, and each second sample input may be a sample tissue image, and the sample tissue image may be, for example, a tissue image collected during an endoscopic examination before.
  • the second sample output set includes a second sample output corresponding to each second sample input, and each second sample output includes the true type of the corresponding sample tissue image, and the true type may include: the first type and the second type, The first type is used to indicate that the quality of the tissue image meets the preset condition, and the second type is used to indicate that the quality of the tissue image does not meet the preset condition.
  • the second sample input set can be used as the input of the classification model, and then the second sample output set can be used as the output of the classification model to train the classification model, so that when the second sample input set is input, the classification
  • the output of the model can be matched with the second sample output set.
  • the difference (or mean square error) with the second sample output set can be used as the loss function of the classification model, with the goal of reducing the loss function, and the backpropagation algorithm is used to correct the neurons in the classification model.
  • the parameters of the neuron may be, for example, the weight and bias of the neuron.
  • the loss function of the classification model can be shown in Formula 7 (ie, the cross-entropy loss function):
  • L class represents the loss function of the classification model
  • Indicates the output of the classification model (which can be understood as the matching probability between the sample tissue image and the qth type)
  • s q represents the matching probability between the real type of the sample tissue image and the qth type
  • F represents the number of real types.
  • the real type includes a first type and a second type
  • the first type is used to indicate that the quality of the tissue image meets the preset condition
  • the disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating-point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • the disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
  • Fig. 8 is a block diagram of a device for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 8, the device 200 may include:
  • the obtaining module 201 is configured to obtain tissue images collected by the endoscope.
  • the recognition module 202 is configured to determine the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, and the initial cleanliness is a floating-point type.
  • the rounding module 203 is configured to round the initial cleanliness according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • Fig. 9 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment.
  • the identification model includes: a feature extraction sub-model, a cleanliness sub-model and a rounding sub-model.
  • the identification module 202 may include:
  • the feature extraction sub-module 2021 is configured to input the tissue image into the feature extraction sub-model to obtain the image features output by the feature extraction sub-model for characterizing the tissue image.
  • the processing sub-module 2022 is used to input the image features into the cleanliness sub-model and the rounding sub-model respectively, so as to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model.
  • the determining sub-module 2023 is configured to determine the initial cleanliness according to the cleanliness vector, and determine the target rounding method according to the rounding vector.
  • the determining submodule 2023 can be used to perform the following steps:
  • Step 1) According to the cleanliness vector, determine the matching probabilities of the tissue image and various cleanliness types.
  • Step 2) Determine the initial cleanliness according to the weight corresponding to each cleanliness type and the matching probability of the tissue image and multiple cleanliness types.
  • Step 3 Determine the matching probabilities of the tissue image and multiple rounding methods according to the rounding vector.
  • Step 4) Determine the target rounding method among the multiple rounding methods according to the matching probabilities between the tissue image and the multiple rounding methods.
  • the recognition model is trained by:
  • Step A obtaining a first sample input set and a first sample output set
  • the first sample input set includes: a plurality of first sample inputs, each first sample input includes a sample tissue image, the first sample The output set includes a first sample output corresponding to each first sample input, each first sample output including the true cleanliness of the corresponding sample tissue image.
  • step B the first sample input set is used as the input of the recognition model, and the first sample output set is used as the output of the recognition model, so as to train the recognition model.
  • the loss of the identification model is determined according to the cleanliness loss and the rounding loss
  • the cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set
  • the rounding loss is determined according to the output of the rounding sub-model and the first sample output set This output set is OK.
  • each sample tissue image includes multiple cleanliness labels
  • the real cleanliness of the sample tissue image is determined according to the multiple cleanliness labels of the sample tissue image
  • the consistency of the sample tissue image is determined according to the Among the multiple cleanliness labels of the sample tissue image, the number of cleanliness labels matching the real cleanliness is determined.
  • the first sample output also includes a degree of consistency of the corresponding sample tissue image.
  • the cleanliness loss is determined from the output of the cleanliness sub-model, the true cleanliness and consistency contained in each first sample input.
  • Fig. 10 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 10, the device 200 further includes:
  • the classification module 204 is configured to classify the tissue image by using the pre-trained classification model to determine the target type of the tissue image before determining the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model.
  • the recognition module 202 may be configured to determine the initial cleanliness and the rounding method of the target according to the tissue image and the recognition model if the target type indicates that the quality of the tissue image satisfies a preset condition.
  • Fig. 11 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment.
  • the classification module 204 may include:
  • the preprocessing sub-module 2041 is configured to preprocess the tissue image, and divide the preprocessed tissue image into multiple sub-images of equal size.
  • the token determination sub-module 2042 is configured to determine the token corresponding to the sub-image according to the image vector corresponding to each sub-image and the position vector corresponding to the sub-image, and the position vector is used to indicate the organization of the sub-image after preprocessing position in the image.
  • the encoding sub-module 2043 is configured to input the token corresponding to each sub-image and the token corresponding to the tissue image into the encoder to obtain a local encoding vector corresponding to each sub-image and a global encoding vector corresponding to the tissue image.
  • the classification sub-module 2044 is configured to input the global encoding vector and multiple local encoding vectors into the classification layer, so as to obtain the target type output by the classification layer.
  • the classification model is trained by:
  • Step C obtaining a second sample input set and a second sample output set
  • the second sample input set includes: a plurality of second sample inputs, each second sample input includes a sample tissue image, and the second sample output set includes each The second sample input corresponds to the second sample output, and each second sample output includes the true type of the corresponding sample tissue image.
  • step D the second sample input set is used as the input of the classification model, and the second sample output set is used as the output of the classification model, so as to train the classification model.
  • the disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating-point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  • the disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
  • FIG. 12 shows a schematic structural diagram of an electronic device (for example, the execution subject in the above embodiments, which may be a terminal device or a server) 300 suitable for implementing the embodiments of the present disclosure.
  • the terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 12 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
  • an electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may be randomly accessed according to a program stored in a read-only memory (ROM) 302 or loaded from a storage device 308.
  • a processing device such as a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • various appropriate actions and processes are executed by programs in the memory (RAM) 303 .
  • RAM 303 various programs and data necessary for the operation of the electronic device 300 are also stored.
  • the processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304.
  • An input/output (I/O) interface 305 is also connected to the bus 304 .
  • the following devices can be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibrating an output device 307 such as a computer; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309.
  • the communication means 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. While FIG. 12 shows electronic device 300 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 309, or from storage means 308, or from ROM 302.
  • the processing device 301 When the computer program is executed by the processing device 301, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the terminal device and the server can communicate with any currently known or future-developed network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks ("LANs”), wide area networks ("WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires the tissue image collected by the endoscope; according to the tissue image and the pre-trained Identifying the model, determining the initial cleanliness and the target rounding method, the initial cleanliness is a floating-point type; according to the target rounding method, rounding the initial cleanliness to obtain the cleanliness of the tissue image , the cleanliness is an integer.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider to connected via the Internet.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the module itself under certain circumstances, for example, the obtaining module may also be described as a "module for obtaining tissue images".
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • Example 1 provides a method for determining the cleanliness of a tissue cavity, including: acquiring a tissue image collected by an endoscope; according to the tissue image and a pre-trained recognition model, determining an initial Cleanliness and target rounding method, the initial cleanliness is a floating point type; according to the target rounding method, the initial cleanliness is rounded to obtain the cleanliness of the tissue image, the cleanliness is an integer.
  • Example 2 provides the method of Example 1, the recognition model includes: a feature extraction sub-model, a cleanliness sub-model and a rounding sub-model;
  • the trained recognition model determines the initial cleanliness and the target rounding method, including: inputting the tissue image into the feature extraction sub-model to obtain an image output by the feature extraction sub-model for characterizing the tissue image feature; input the image feature into the cleanliness sub-model and the rounding sub-model respectively, to obtain the cleanliness vector output by the cleanliness sub-model, and the rounding vector output by the rounding sub-model;
  • the initial cleanliness is determined according to the cleanliness vector
  • the target rounding manner is determined according to the rounding vector.
  • Example 3 provides the method of Example 2, the determining the initial cleanliness according to the cleanliness vector includes: determining the tissue image according to the cleanliness vector Matching probabilities with multiple types of cleanliness; determining the initial cleanliness according to the weight corresponding to each type of cleanliness and the matching probability of the tissue image with multiple types of cleanliness;
  • the rounding vector, determining the target rounding method includes: according to the rounding vector, determining the matching probability of the tissue image and multiple rounding methods; according to the tissue image and multiple rounding methods The matching probability of , and determine the target rounding method among multiple rounding methods.
  • Example 4 provides the method of Example 2, the recognition model is obtained by training in the following manner: obtaining a first sample input set and a first sample output set, the first A sample input set includes: a plurality of first sample inputs, each of the first sample inputs includes a sample tissue image, and the first sample output set includes a corresponding to each of the first sample inputs The first sample output, each of the first sample outputs includes the true cleanliness of the corresponding sample tissue image; the first sample input set is used as the input of the recognition model, and the first The sample output set is used as the output of the recognition model to train the recognition model; the loss of the recognition model is determined according to the cleanliness loss and the rounding loss, and the cleanliness loss is determined according to the output of the cleanliness sub-model determined with the first sample output set, and the rounding loss is determined according to the output of the rounding sub-model and the first sample output set.
  • Example 5 provides the method of Example 4, each of the sample tissue images includes a plurality of cleanliness labels, and the real cleanliness of the sample tissue image is based on the plurality of cleanliness labels of the sample tissue image.
  • the cleanliness label is determined, and the consistency of the sample tissue image is determined according to the number of the cleanliness labels that match the real cleanliness among the multiple cleanliness labels of the sample tissue image; the first The sample output also includes the consistency of the corresponding sample tissue image; the cleanliness loss is based on the output of the cleanliness sub-model, the true cleanliness included in each of the first sample inputs, and the The degree of consistency is determined.
  • Example 6 provides the method of Example 1, before determining the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, the method further Including: using a pre-trained classification model to classify the tissue image to determine the target type of the tissue image; determining the initial cleanliness and target rounding method according to the tissue image and the pre-trained recognition model, The method includes: if the target type indicates that the quality of the tissue image satisfies a preset condition, determining the initial cleanliness and the target rounding method according to the tissue image and the recognition model.
  • Example 7 provides the method of Example 6, the classification model includes: an encoder and a classification layer, and the pre-trained classification model is used to classify the tissue image to determine
  • the target type of the tissue image includes: preprocessing the tissue image, and dividing the preprocessed tissue image into multiple sub-images of equal size; according to the image vector corresponding to each of the sub-images, The position vector corresponding to the sub-image determines the token corresponding to the sub-image, and the position vector is used to indicate the position of the sub-image in the preprocessed tissue image; each of the sub-images corresponds to token, and the token corresponding to the tissue image is input into the encoder to obtain a local encoding vector corresponding to each sub-image, and a global encoding vector corresponding to the tissue image; combine the global encoding vector and a plurality of the local encoding vectors An encoded vector is input to a classification layer to obtain the object type output by the classification layer.
  • Example 8 provides the method of Example 7, the classification model is obtained by training in the following manner: obtaining a second sample input set and a second sample output set, the second sample The input set includes: a plurality of second sample inputs, each of which includes a sample tissue image, and the second sample output set includes a second sample output corresponding to each of the second sample inputs, each The second sample output includes the true type of the corresponding sample tissue image; the second sample input set is used as the input of the classification model, and the second sample output set is used as the output of the classification model, to train the classification model.
  • Example 9 provides a device for determining the cleanliness of a tissue cavity, including: an acquisition module for acquiring tissue images collected by an endoscope; an identification module for The image and the pre-trained recognition model determine the initial cleanliness and the target rounding method, the initial cleanliness is a floating point type; the rounding module is used to round the initial cleanliness according to the target rounding method integer to obtain the cleanliness of the tissue image, and the cleanliness is integer.
  • Example 10 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the methods described in Example 1 to Example 8 are implemented.
  • Example 11 provides an electronic device, including: a storage device on which a computer program is stored; a processing device configured to execute the computer program in the storage device to Implement the steps of the method described in Example 1 to Example 8.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Radiology & Medical Imaging (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Endoscopes (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure relates to a method and apparatus for determining the cleanliness of a tissue cavity, and a readable medium and an electronic device, and relates to the technical field of image processing. The method comprises: firstly, acquiring a tissue image that is collected by an endoscope; then, according to the tissue image and a pre-trained recognition model, determining an initial cleanliness and a target rounding mode, wherein the initial cleanliness is of a floating-point type; and finally, according to the target rounding mode, rounding the initial cleanliness, so as to obtain the cleanliness of the tissue image, wherein the cleanliness is of an integer type. In the present disclosure, a floating point-type initial cleanliness and a target rounding mode applicable to a tissue image are determined by means of a recognition model, and the initial cleanliness is then rounded by using the target rounding mode, so as to obtain the cleanliness of the tissue image, such that the accuracy of the cleanliness can be improved.

Description

组织腔清洁度的确定方法、装置、可读介质和电子设备Method, device, readable medium and electronic device for determining the cleanliness of a tissue cavity
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202111033610.8、申请日为2021年09月03日,名称为“组织腔清洁度的确定方法、装置、可读介质和电子设备”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on the Chinese patent application with the application number 202111033610.8 and the filing date on September 03, 2021, entitled "Method, device, readable medium and electronic equipment for determining the cleanliness of tissue cavity", and requires the Chinese patent application The priority of this Chinese patent application, the entire content of this Chinese patent application is hereby incorporated into this application as a reference.
技术领域technical field
本公开涉及图像处理技术领域,具体地,涉及一种组织腔清洁度的确定方法、装置、可读介质和电子设备。The present disclosure relates to the technical field of image processing, and in particular, to a method, device, readable medium and electronic equipment for determining the cleanliness of a tissue cavity.
背景技术Background technique
内窥镜上设置有光学镜头、图像传感器、光源等组件,能够进入人体内部进行检查,使得医生能够直观地观察到人体内部的情况,在医疗领域得到了广泛应用。要保证内窥镜检查的结果准确,需要对组织腔内的清洁度进行判断,如果清洁度过低,说明组织准备不足,可能造成漏检较小的息肉或者腺瘤的问题,甚至造成内窥镜检查失败,需要重复检查的问题。因此,准确地识别组织的清洁度,能够保证内窥镜检查的有效性和准确性。内窥镜例如可以为肠镜、胃镜等。针对肠镜来说,所检查的组织即为肠道,需要识别的是肠腔的清洁度,针对胃镜来说,所检查的组织即为食道或者胃部,需要识别的是食管腔体或者胃内腔体的清洁度。The endoscope is equipped with optical lens, image sensor, light source and other components, which can enter the inside of the human body for inspection, so that doctors can intuitively observe the internal conditions of the human body, and have been widely used in the medical field. To ensure the accuracy of endoscopic examination results, it is necessary to judge the cleanliness of the tissue cavity. If the cleanliness is too low, it means that the tissue preparation is insufficient, which may cause the problem of missing small polyps or adenomas, and even cause endoscopy. A mirror check failed and a repeat check is required. Therefore, accurately identifying the cleanliness of tissues can ensure the validity and accuracy of endoscopy. The endoscope may be, for example, a colonoscope, a gastroscope, or the like. For colonoscopy, the inspected tissue is the intestinal tract, and what needs to be identified is the cleanliness of the intestinal lumen. For gastroscopy, the inspected tissue is the esophagus or stomach, and what needs to be identified is the esophageal cavity or Cleanliness of gastric cavity.
然而,组织腔的清洁度通常是在内窥镜检查结束后的退镜阶段,由专业人员根据组织的实际检查情况来确定,对于专业人员的经验、操作水平要求较高,并且存在一定的主观性,很难保证准确识别组织腔的清洁度。However, the cleanliness of the tissue cavity is usually determined by professionals at the stage of withdrawing the endoscope after the endoscopic examination, based on the actual inspection of the tissue. The requirements for the experience and operation level of the professionals are relatively high, and there is a certain degree of subjectivity. However, it is difficult to ensure accurate identification of the cleanliness of the tissue cavity.
发明内容Contents of the invention
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This Summary is provided to introduce a simplified form of concepts that are described in detail later in the Detailed Description. This summary of the invention is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
第一方面,本公开提供一种组织腔清洁度的确定方法,所述方法包括:In a first aspect, the present disclosure provides a method for determining the cleanliness of a tissue cavity, the method comprising:
获取内窥镜采集的组织图像;Obtain tissue images collected by the endoscope;
根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;Determine the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, and the initial cleanliness is a floating-point type;
按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。According to the target rounding manner, the initial cleanliness is rounded to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
第二方面,本公开提供一种组织腔清洁度的确定装置,所述装置包括:In a second aspect, the present disclosure provides a device for determining the cleanliness of a tissue cavity, the device comprising:
获取模块,用于获取内窥镜采集的组织图像;An acquisition module, configured to acquire tissue images collected by the endoscope;
识别模块,用于根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;A recognition module, configured to determine an initial cleanliness and a target rounding method according to the tissue image and a pre-trained recognition model, where the initial cleanliness is a floating-point type;
取整模块,用于按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。The rounding module is configured to round the initial cleanliness according to the target rounding manner to obtain the cleanliness of the tissue image, and the cleanliness is integer.
第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现本公开第一方面所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect of the present disclosure are implemented.
第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:
存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
处理装置,用于执行所述存储装置中的所述计算机程序,以实现本公开第一方面所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.
通过上述技术方案,本公开首先获取内窥镜采集的组织图像,之后根据组织图像和预先训练的识别模型,确定浮点型的初始清洁度和目标取整方式。最后按照目标取整方式,对初始清洁度进行取整,以得到组织图像的清洁度,清洁度为整型。本公开通过识别模型确定浮点型的初始清洁度和适用于组织图像的目标取整方式,从而利用目标取整方式对初始清洁度进行取整,以得到组织图像的清洁度,能够提高清洁度的准确性。Through the above technical solution, the present disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer. The disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.
附图说明Description of drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。在附图中:The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:
图1是根据一示例性实施例示出的一种组织腔清洁度的确定方法的流程图;Fig. 1 is a flow chart of a method for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图2是根据一示例性实施例示出的另一种组织腔清洁度的确定方法的流程图;Fig. 2 is a flowchart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图3是根据一示例性实施例示出的一种识别模型的示意图;Fig. 3 is a schematic diagram of a recognition model shown according to an exemplary embodiment;
图4是根据一示例性实施例示出的一种训练识别模型的流程图;Fig. 4 is a flowchart showing a training recognition model according to an exemplary embodiment;
图5是根据一示例性实施例示出的另一种组织腔清洁度的确定方法的流程图;Fig. 5 is a flow chart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图6是根据一示例性实施例示出的另一种组织腔清洁度的确定方法的流程图;Fig. 6 is a flowchart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图7是根据一示例性实施例示出的一种训练分类模型的流程图;Fig. 7 is a flow chart showing a training classification model according to an exemplary embodiment;
图8是根据一示例性实施例示出的一种组织腔清洁度的确定装置的框图;Fig. 8 is a block diagram of a device for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图9是根据一示例性实施例示出的另一种组织腔清洁度的确定装置的框图;Fig. 9 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图10是根据一示例性实施例示出的另一种组织腔清洁度的确定装置的框图;Fig. 10 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图11是根据一示例性实施例示出的另一种组织腔清洁度的确定装置的框图;Fig. 11 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment;
图12是根据一示例性实施例示出的一种电子设备的框图。Fig. 12 is a block diagram of an electronic device according to an exemplary embodiment.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein; A more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only, and are not intended to limit the protection scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that the various steps described in the method implementations of the present disclosure may be executed in different orders, and/or executed in parallel. Additionally, method embodiments may include additional steps and/or omit performing illustrated steps. The scope of the present disclosure is not limited in this regard.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "comprise" and its variations are open-ended, ie "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one further embodiment"; the term "some embodiments" means "at least some embodiments." Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the sequence of functions performed by these devices, modules or units or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more" multiple".
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are used for illustrative purposes only, and are not used to limit the scope of these messages or information.
图1是根据一示例性实施例示出的一种组织腔清洁度的确定方法的流程图,如图1所示,该方法包括以下步骤:Fig. 1 is a flowchart of a method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 1, the method includes the following steps:
步骤101,获取内窥镜采集的组织图像。 Step 101, acquire tissue images collected by an endoscope.
举例来说,在进行内窥镜检查时,内窥镜会按照预设的采集周期不断地采集组织中的图像,本实施例中的组织图像,可以为当前时刻内窥镜采集的图像,也可以是任一时刻内窥镜采集的图像。也就是说,组织图像可以是内窥镜在进入组织过程(即进镜过程)中采集的图像,也可以是内窥镜在退出组织过程(即退镜过程)中采集的图像,本公开对此不作具体限定。进一步的,在得到组织图像之后,还可以对组织图像进行预处理,可以理解为对组织图像中包括的数据进行增强处理。预处理可以包括:随机仿射变换,随机亮度、对比度、饱和度、色度调整,随机擦除部分像素,翻转处理(包括:左右翻转、上下翻转、旋转等),尺寸变换(英文:Resize)等处理,最后得到的预处理后的组织图像可以是指定尺寸(例如可以是224*224)的图像。For example, when performing an endoscopic inspection, the endoscope will continuously collect images in the tissue according to the preset collection period. The tissue image in this embodiment can be the image collected by the endoscope at the current moment, or It can be an image collected by the endoscope at any time. That is to say, the tissue image can be an image collected by the endoscope during the process of entering the tissue (ie, the process of entering the mirror), or it can be an image collected by the endoscope during the process of withdrawing from the tissue (ie, the process of withdrawing the mirror). This is not specifically limited. Further, after the tissue image is obtained, the tissue image can also be preprocessed, which can be understood as performing enhancement processing on the data included in the tissue image. Preprocessing can include: random affine transformation, random brightness, contrast, saturation, chroma adjustment, random erasing of some pixels, flip processing (including: left-right flip, up-down flip, rotation, etc.), size transformation (English: Resize) and so on, the finally obtained preprocessed tissue image may be an image of a specified size (for example, it may be 224*224).
步骤102,根据组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,初始清洁度为浮点型。Step 102: Determine the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, where the initial cleanliness is a floating-point type.
示例的,可以将经过预处理的组织图像,输入预先训练的识别模型,以使识别模型对组织图像进行识别,输出浮点型的初始清洁度和目标取整方式。具体的,识别模型能够确定组织图像与多种清洁度类型的匹配概率,然后根据多个匹配概率来确定初始清洁度,初始清洁度为浮点型,也就是说初始清洁度通常不是整数。多种清洁度类型,用于指示组织图像的清洁程度,以内窥镜为肠镜,组织图像为肠道图像来举例,多种清洁度类型可以是波士顿肠道清洁度评分标准(英文:Boston Bowel Preparation Scale,缩写:BBPS)中的四种类型:即清洁度类型为0分,对应“由于无法清除的固体和液体粪便导致整段肠粘膜无法观测”、清洁度类型为1分,对应“由于污斑、浑浊液体、残留粪便导致的部分肠道粘膜无法观测”、清洁度类型为2分,对应“肠道粘膜观察良好,但残留少量污斑、浑浊液体、粪便”、清洁度类型为3分,对应“肠道粘膜观察良好,基本无残留污斑、浑浊液体、粪便”。进一步的,识别模型还能够确定组织图像与多种取整方式的匹配概率,然后根据多个匹配概率来确定目标取整方式。多种取整方式例如可以包括:向上取整(例如ceil函数)、向下取整(例如floor函数)等。其中,识别模型可以根据预先采集的大量的训练图像,和每个训练图像对应的清洁度标签,对识别模型进行训练。识别模型例如可以是CNN(英文:Convolutional Neural Networks,中文:卷积神经网络)或者LSTM(英文:Long Short-Term Memory,中文:长短期记忆网络),也可以是Transformer(例如Vision Transformer)中的Encoder等,本公开对此不作具体限定。For example, the preprocessed tissue image can be input into the pre-trained recognition model, so that the recognition model can recognize the tissue image, and output the initial cleanliness and target rounding method of floating point. Specifically, the recognition model can determine the matching probabilities of the tissue image and multiple types of cleanliness, and then determine the initial cleanliness according to the multiple matching probabilities. The initial cleanliness is a floating point type, that is to say, the initial cleanliness is usually not an integer. Various types of cleanliness are used to indicate the cleanliness of tissue images. For example, an endoscope is a colonoscope, and a tissue image is an intestinal image. The multiple cleanliness types can be the Boston Bowel Cleanliness Score Standard (English: Boston Bowel Preparation Scale, abbreviation: BBPS) in the four types: that is, the cleanliness type is 0 points, corresponding to "the entire intestinal mucosa cannot be observed due to solid and liquid feces that cannot be removed", and the cleanliness type is 1 point, corresponding to "due to Part of the intestinal mucosa cannot be observed due to stains, turbid liquid, and residual feces", the cleanliness type is 2 points, corresponding to "the intestinal mucosa is well observed, but a small amount of stains, turbid liquid, and feces remain", and the cleanliness type is 3 Score, corresponding to "the intestinal mucosa is well observed, basically no residual stains, turbid liquid, and feces". Further, the recognition model can also determine the matching probability of the tissue image and multiple rounding methods, and then determine the target rounding method according to the multiple matching probabilities. The multiple rounding methods may include, for example: rounding up (such as the ceil function), rounding down (such as the floor function), and the like. Wherein, the recognition model can be trained according to a large number of pre-collected training images and a cleanliness label corresponding to each training image. The recognition model can be, for example, CNN (English: Convolutional Neural Networks, Chinese: convolutional neural network) or LSTM (English: Long Short-Term Memory, Chinese: long-term short-term memory network), or Transformer (such as Vision Transformer). Encoder, etc., this disclosure does not specifically limit it.
步骤103,按照目标取整方式,对初始清洁度进行取整,以得到组织图像的清洁度,清洁度为整型。In step 103, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
示例的,在得到识别模型输出的初始清洁度和目标取整方式后,可以按照目标取整方式,对初始清洁度进行取整,以得到整型的组织图像的清洁度。若目标取整方式为向上取整,那么可以对初始清洁度进行向上取整,以作为组织图像的清洁度,若目标取整方式为向下取整,那么可以对初始清洁度进行向下取整,以作为组织图像的清洁度。例如,初始清洁度为2.8,若目标取整方式为向上取整,那么清洁度为3,若目标取整方式为向下取整,那么清洁度为2。相比于随机选择取整方式对浮点型的清洁度进行取整,引入随机误差,降低清洁度的准确性的处理方式,本实施例能够利用识别模型从组织图像中学习到适用于组织图像的目标取整方式,从而得到组织图像的清洁度,能够有效提高清洁度的鲁棒性和准确性。进一步的,由于组织图像可以是内窥镜在任一时刻采集的图像,因此,本实施例能 够实时确定组织腔当前的清洁度,而不限制在退镜过程中对清洁度进行判断,能够及时根据组织腔的清洁度来确定内窥镜的下一步操作,避免了无效进镜、重复检查等问题。For example, after obtaining the initial cleanliness output by the recognition model and the target rounding method, the initial cleanliness may be rounded according to the target rounding method, so as to obtain the cleanliness of the integer tissue image. If the target rounding method is upward rounding, then the initial cleanliness can be rounded up as the cleanliness of the tissue image; if the target rounding method is downward rounding, then the initial cleanliness can be rounded down Integrate as the cleanliness of the tissue image. For example, the initial cleanliness is 2.8, if the target rounding method is up, then the cleanliness is 3, if the target rounding method is down, then the cleanliness is 2. Compared with randomly selecting the rounding method to round the floating-point cleanliness, introducing random errors, and reducing the accuracy of the cleanliness, this embodiment can use the recognition model to learn from tissue images that are suitable for tissue images. The target rounding method is used to obtain the cleanliness of the tissue image, which can effectively improve the robustness and accuracy of the cleanliness. Furthermore, since the tissue image can be an image collected by the endoscope at any time, this embodiment can determine the current cleanliness of the tissue cavity in real time, without limiting the cleanliness judgment during the process of withdrawing the mirror, and can be timely based on The cleanliness of the tissue cavity is used to determine the next operation of the endoscope, avoiding problems such as invalid mirror entry and repeated inspections.
需要说明的是,本公开实施例中所述的内窥镜,例如可以是肠镜、胃镜,若内窥镜为肠镜,那么上述组织图像即为肠道图像,组织腔即为肠腔,那么本实施例确定的是肠腔的清洁度。若内窥镜为胃镜,那么上述组织图像可以为食道图像、胃部图像或者十二指肠图像,相应的,组织腔可以为食管腔体、胃内腔体、十二指肠腔,那么本实施例确定的是食管腔体、胃内腔体、十二指肠腔的清洁度。本公开中,内窥镜还可以用于采集其他具有腔体的组织的图像,以确定组织腔的清洁度,本公开对此不作具体限定。It should be noted that the endoscope described in the embodiments of the present disclosure can be, for example, a colonoscope or a gastroscope. If the endoscope is a colonoscope, then the above-mentioned tissue image is an intestinal image, and the tissue cavity is the intestinal cavity. Then this embodiment determines the cleanliness of the intestinal lumen. If the endoscope is a gastroscope, then the tissue image above can be an image of the esophagus, stomach or duodenum, and correspondingly, the tissue cavity can be the cavity of the esophagus, the cavity of the stomach, or the cavity of the duodenum, then In this embodiment, the cleanliness of esophageal cavity, gastric cavity and duodenal cavity are determined. In the present disclosure, the endoscope can also be used to collect images of other tissues with cavities to determine the cleanliness of the tissue cavities, which is not specifically limited in the present disclosure.
综上所述,本公开首先获取内窥镜采集的组织图像,之后根据组织图像和预先训练的识别模型,确定浮点型的初始清洁度和目标取整方式。最后按照目标取整方式,对初始清洁度进行取整,以得到组织图像的清洁度,清洁度为整型。本公开通过识别模型确定浮点型的初始清洁度和适用于组织图像的目标取整方式,从而利用目标取整方式对初始清洁度进行取整,以得到组织图像的清洁度,能够提高清洁度的准确性。To sum up, the disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating-point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer. The disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
图2是根据一示例性实施例示出的另一种组织腔清洁度的确定方法的流程图,如图2所示,识别模型如图3所示,其中包括:特征提取子模型、清洁度子模型和取整子模型。具体的,特征提取子模型的结构例如可以是Vision Transformer中的Encoder,也可以其他能够提取图像特征的结构,本公开对此不作具体限定。清洁度子模型的结构例如可以是两个线性层(可以理解为全连接层),通过ReLU非线性层级联在一起,也可以是其他结构,取整子模型的结构例如可以是一个线性层,也可以是其他结构,本公开对此不作具体限定。Fig. 2 is a flow chart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 2, the recognition model is shown in Fig. 3, which includes: model and rounded submodels. Specifically, the structure of the feature extraction sub-model may be, for example, the Encoder in the Vision Transformer, or other structures capable of extracting image features, which are not specifically limited in the present disclosure. The structure of the cleanliness sub-model can be, for example, two linear layers (which can be understood as fully connected layers), cascaded together through the ReLU nonlinear layer, or other structures. The structure of the rounding sub-model can be, for example, a linear layer. Other structures are also possible, which is not specifically limited in the present disclosure.
相应的,步骤102的实现方式可以包括:Correspondingly, the implementation of step 102 may include:
步骤1021,将组织图像输入特征提取子模型,以得到特征提取子模型输出的,用于表征组织图像的图像特征。 Step 1021, input the tissue image into the feature extraction sub-model to obtain the image features output by the feature extraction sub-model for characterizing the tissue image.
示例的,首先将组织图像输入特征提取子模型,以得到特征提取子模型输出的,用于表征组织图像的图像特征。下面以特征提取子模型的结构是Vision Transformer中的Encoder为例,对提取图像特征的过程进行具体说明。For example, the tissue image is first input into the feature extraction sub-model to obtain the image features output by the feature extraction sub-model for characterizing the tissue image. In the following, the structure of the feature extraction sub-model is the Encoder in the Vision Transformer as an example to describe the process of extracting image features in detail.
先将输入的组织图像按照指定大小划分为大小相等的多个子图像(可以表示为patch),例如,输入的组织图像为224*224,指定大小为16*16,那么可以将组织图像划分为196个子图像。然后可以利用线性投射层(英文:Linear Projection)先将每个子图像进行展平处理,得到该子图像对应的图像向量(可以表示为patch embedding),图像向量能够表征该子图像。进一步的,还可以生成用于指示该子图像在组织图像中的位置的位置向量(可以表示为position embedding),其中,position embedding的大小与patch embedding的大小相同。需要说明的是,position embedding可以随机生成,Encoder能够学习到对应的子图像在组织图像的位置的表征。之后,可以根据每个子图像的图像向量和位置向量,生成该子图像对应的令牌(可以表示为token)。具体的,每个子图像对应的令牌,可以是将该子图像的图像向量和位置向量进行拼接(可以理解为concat)得到的。First divide the input tissue image into multiple sub-images of equal size (which can be expressed as patches) according to the specified size. For example, if the input tissue image is 224*224 and the specified size is 16*16, then the tissue image can be divided into 196 sub-image. Then, the linear projection layer (English: Linear Projection) can be used to flatten each sub-image to obtain an image vector corresponding to the sub-image (which can be expressed as patch embedding), and the image vector can represent the sub-image. Further, a position vector (which may be represented as position embedding) for indicating the position of the sub-image in the tissue image may also be generated, where the size of the position embedding is the same as that of the patch embedding. It should be noted that the position embedding can be randomly generated, and the Encoder can learn the representation of the position of the corresponding sub-image in the tissue image. Afterwards, according to the image vector and position vector of each sub-image, a token corresponding to the sub-image (which can be expressed as a token) can be generated. Specifically, the token corresponding to each sub-image may be obtained by concatenating the image vector and the position vector of the sub-image (which can be understood as concat).
进一步的,在得到每个子图像对应的令牌之后,还可以生成组织图像对应的令牌。例如,可以随机生成一个图像向量和一个位置向量,并进行拼接,以作为组织图像对应的令牌。Further, after the token corresponding to each sub-image is obtained, the token corresponding to the tissue image may also be generated. For example, an image vector and a position vector can be randomly generated and concatenated to serve as tokens corresponding to the tissue image.
之后,可以将每个子图像对应的令牌,和组织图像对应的令牌输入编码器,编码器能够根据每个子图像对应的令牌,生成每个子图像对应的局部编码向量,同时,还能够根据全部子图像对应的令牌,生成组织图像对应的全局编码向量。其中,局部编码向量可以理解为编码器学习到的,能够表征对应的子图像的向量,全局编码向量可以理解为编码器学习到的,能够表征整个组织图像的向量。最后,可以将全局编码向量作为特征提取子模型的输出,即图像特征。也可以将全局编码向量和局部编码向 量进行拼接,作为特征提取子模型的输出,即图像特征,这样,图像特征既能够表征全局的信息,又能够表征局部的信息。Afterwards, the token corresponding to each sub-image and the token corresponding to the tissue image can be input into the encoder, and the encoder can generate a local encoding vector corresponding to each sub-image according to the token corresponding to each sub-image. At the same time, it can also be based on Tokens corresponding to all sub-images generate global encoding vectors corresponding to tissue images. Wherein, the local encoding vector can be understood as a vector learned by the encoder and can represent the corresponding sub-image, and the global encoding vector can be understood as the vector learned by the encoder and can represent the entire tissue image. Finally, the global encoding vector can be used as the output of the feature extraction sub-model, i.e. image features. It is also possible to concatenate the global encoding vector and the local encoding vector as the output of the feature extraction sub-model, that is, the image feature. In this way, the image feature can not only represent the global information, but also represent the local information.
步骤1022,将图像特征分别输入清洁度子模型和取整子模型,以得到清洁度子模型输出的清洁度向量,和取整子模型输出的取整向量。In step 1022, the image features are respectively input into the cleanliness sub-model and the rounding sub-model to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model.
步骤1023,根据清洁度向量,确定初始清洁度,并根据取整向量,确定目标取整方式。 Step 1023, determine the initial cleanliness according to the cleanliness vector, and determine the target rounding method according to the rounding vector.
示例的,可以将图像特征分别输入清洁度子模型和取整子模型,以得到清洁度子模型输出的清洁度向量,和取整子模型输出的取整向量。其中,清洁度子模型输出的清洁度向量的维度,与清洁度类型的数量相同。例如,以组织图像为肠道图像(即内窥镜为肠镜)为例,BBPS包括四种类型的清洁度类型,那么清洁度向量的维度可以为1*4,每个维度对应一种清洁度类型。同样的,取整子模型输出的取整向量的维度,与取整方式的数量相同,例如,取整方式包括向上取整和向下取整两种,那么取整向量的维度可以为1*2,每个维度对应一种取整类型。最后再根据清洁度向量,确定初始清洁度,并根据取整向量,确定目标取整方式。For example, the image features can be input into the cleanliness sub-model and the rounding sub-model respectively to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model. Among them, the dimension of the cleanliness vector output by the cleanliness sub-model is the same as the number of cleanliness types. For example, if the tissue image is an intestinal image (that is, an endoscope is a colonoscope), the BBPS includes four types of cleanliness types, then the dimension of the cleanliness vector can be 1*4, and each dimension corresponds to a cleanliness degree type. Similarly, the dimension of the rounding vector output by the rounding sub-model is the same as the number of rounding methods. For example, the rounding methods include two types of rounding up and rounding down, so the dimension of the rounding vector can be 1* 2. Each dimension corresponds to a rounding type. Finally, the initial cleanliness is determined according to the cleanliness vector, and the target rounding method is determined according to the rounding vector.
在一种实现方式中,步骤1023中确定初始清洁度的方式可以包括:In one implementation, the manner of determining the initial cleanliness in step 1023 may include:
步骤1)根据清洁度向量,确定组织图像与多种清洁度类型的匹配概率。Step 1) According to the cleanliness vector, determine the matching probabilities of the tissue image and various cleanliness types.
步骤2)根据每种清洁度类型对应的权重,和组织图像与多种清洁度类型的匹配概率,确定初始清洁度。Step 2) Determine the initial cleanliness according to the weight corresponding to each cleanliness type and the matching probability of the tissue image and multiple cleanliness types.
举例来说,可以利用Softmax函数处理清洁度向量,得到组织图像与多种清洁度类型的匹配概率,然后根据每种清洁度类型对应的权重,和组织图像与多种清洁度类型的匹配概率,对多个匹配概率进行加权求和,以得到初始清洁度。在组织图像为肠道图像(即内窥镜为肠镜)的情况下,每种清洁度类型对应的权重可以根据BBPS的分值来确定。具体的,可以通过公式一来确定初始清洁度:For example, the Softmax function can be used to process the cleanliness vector to obtain the matching probability of the tissue image and various cleanliness types, and then according to the weight corresponding to each cleanliness type, and the matching probability of the tissue image and various cleanliness types, The multiple matching probabilities are weighted and summed to get the initial cleanliness. In the case that the tissue image is an intestinal image (that is, the endoscope is a colonoscope), the weight corresponding to each type of cleanliness can be determined according to the score of the BBPS. Specifically, the initial cleanliness can be determined by formula 1:
Figure PCTCN2022114259-appb-000001
Figure PCTCN2022114259-appb-000001
其中,S表示初始清洁度,N表示清洁度类型的数量,a i表示第i种清洁度类型对应的权重。p i(x)表示组织图像与第i种清洁度类型的匹配概率(可以理解为Softmax函数的输出),f i(x)表示清洁度向量中第i维的数值,x表示图像特征。以组织图像为肠道图像(即内窥镜为肠镜),按照BBPS确定对应的权重为例,其中清洁度类型为0分对应的权重为0,清洁度类型为1分对应的权重为1,清洁度类型为2分对应的权重为2,清洁度类型为3分对应的权重为3,那么N=4,a i=i。 Among them, S represents the initial cleanliness, N represents the number of cleanliness types, and a i represents the weight corresponding to the i-th cleanliness type. p i (x) represents the matching probability between the tissue image and the i-th cleanliness type (which can be understood as the output of the Softmax function), f i (x) represents the value of the i-th dimension in the cleanliness vector, and x represents the image feature. Take the tissue image as the intestinal image (that is, the endoscope is the colonoscope), and determine the corresponding weight according to the BBPS as an example, where the cleanliness type is 0 points and the corresponding weight is 0, and the cleanliness type is 1 point and the corresponding weight is 1 , the cleanliness type being 2 points corresponds to a weight of 2, and the cleanliness type is 3 points corresponding to a weight of 3, then N=4, a i =i.
步骤1023中确定目标取整方式的方式可以包括:The manner of determining the target rounding manner in step 1023 may include:
步骤3)根据取整向量,确定组织图像与多种取整方式的匹配概率。Step 3) Determine the matching probabilities of the tissue image and multiple rounding methods according to the rounding vector.
步骤4)根据组织图像与多种取整方式的匹配概率,在多种取整方式中确定目标取整方式。Step 4) Determine the target rounding method among the multiple rounding methods according to the matching probabilities between the tissue image and the multiple rounding methods.
示例的,同样可以利用Softmax函数处理取整向量,得到组织图像与多种取整方式的匹配概率,然后在组织图像与多种取整方式的匹配概率中,选取对应的匹配概率最大的取整方式作为目标取整方式。具体的,可以通过公式二来确定组织图像与多种取整方式的匹配概率:As an example, the Softmax function can also be used to process the rounding vector to obtain the matching probability of the tissue image and multiple rounding methods, and then select the rounding with the highest corresponding matching probability among the matching probabilities of the tissue image and multiple rounding methods mode as the destination rounding mode. Specifically, formula 2 can be used to determine the matching probability of the tissue image and multiple rounding methods:
Figure PCTCN2022114259-appb-000002
Figure PCTCN2022114259-appb-000002
其中,M表示取整方式的数量,q j(x)表示组织图像与第j种取整方式的匹配概率,g j(x)表示取整向量中第j维的数值,x表示图像特征。以取整方式包括向上取整、向下取整为例,那么M=2。 Among them, M represents the number of rounding methods, q j (x) represents the matching probability of the tissue image and the jth rounding method, g j (x) represents the value of the jth dimension in the rounding vector, and x represents the image feature. Taking the rounding method including rounding up and rounding down as an example, then M=2.
图4是根据一示例性实施例示出的一种训练识别模型的流程图,如图4所示,识别模型是通过以下方式训练得到的:Fig. 4 is a flow chart showing a training recognition model according to an exemplary embodiment. As shown in Fig. 4, the recognition model is obtained by training in the following manner:
步骤A,获取第一样本输入集和第一样本输出集,第一样本输入集包括:多个第一样本输入,每个第一样本输入包括样本组织图像,第一样本输出集中包括与每个第一样本输入对应的第一样本输出,每个第一样本输出包括对应的样本组织图像的真实清洁度。Step A, obtaining a first sample input set and a first sample output set, the first sample input set includes: a plurality of first sample inputs, each first sample input includes a sample tissue image, the first sample The output set includes a first sample output corresponding to each first sample input, each first sample output including the true cleanliness of the corresponding sample tissue image.
步骤B,将第一样本输入集作为识别模型的输入,将第一样本输出集作为识别模型的输出,以训练识别模型。In step B, the first sample input set is used as the input of the recognition model, and the first sample output set is used as the output of the recognition model, so as to train the recognition model.
其中,识别模型的损失,根据清洁度损失和取整损失确定,清洁度损失根据清洁度子模型的输出与第一样本输出集确定,取整损失根据取整子模型的输出与第一样本输出集确定。Among them, the loss of the identification model is determined according to the cleanliness loss and the rounding loss, the cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set, and the rounding loss is determined according to the output of the rounding sub-model and the first sample output set This output set is OK.
举例来说,在对识别模型进行训练时,需要先获取用于训练识别模型的第一样本输入集和第一样本输出集。第一样本输入集中包括了多个第一样本输入,每个第一样本输入可以为一个样本组织图像,样本组织图像例如可以是之前执行内窥镜检查时采集到的组织图像。第一样本输出集中包括了与每个第一样本输入对应的第一样本输出,每个第一样本输出包括对应的样本组织图像的真实清洁度。真实清洁度用于指示样本组织图像的清洁程度,以内窥镜为肠镜,样本组织图像为样本肠道图像来举例,真实清洁度可以按照BBPS分为四种:即0分,对应“由于无法清除的固体和液体粪便导致整段肠粘膜无法观测”、1分,对应“由于污斑、浑浊液体、残留粪便导致的部分肠道粘膜无法观测”、2分,对应“肠道粘膜观察良好,但残留少量污斑、浑浊液体、粪便”、3分,对应“肠道粘膜观察良好,基本无残留污斑、浑浊液体、粪便”。For example, when training the recognition model, it is necessary to first obtain the first sample input set and the first sample output set used for training the recognition model. The first sample input set includes a plurality of first sample inputs, and each first sample input may be a sample tissue image, and the sample tissue image may be, for example, a tissue image collected during an endoscopic examination before. The first sample output set includes a first sample output corresponding to each first sample input, and each first sample output includes the true cleanliness of the corresponding sample tissue image. The real cleanliness is used to indicate the cleanliness of the sample tissue image. Taking an endoscope as a colonoscope and a sample tissue image as a sample intestinal image, the real cleanliness can be divided into four types according to the BBPS: 0 points, corresponding to "due to inability to Cleared solid and liquid feces lead to unobservable part of the intestinal mucosa", 1 point, corresponding to "partial intestinal mucosa cannot be observed due to stains, cloudy liquid, residual feces", 2 points, corresponding to "the intestinal mucosa is well observed, But a small amount of stains, turbid liquid, and feces remain", 3 points, corresponding to "the intestinal mucosa is well observed, and there are basically no residual stains, turbid liquid, and feces".
在对识别模型训练时,可以将第一样本输入集作为识别模型的输入,然后再将第一样本输出集作为识别模型的输出,来训练识别模型,使得在输入第一样本输入集时,识别模型的输出,能够和第一样本输出集匹配。例如,可以根据识别模型的输出,与第一样本输出集确定识别模型的损失函数,以降低损失函数为目标,利用反向传播算法来修正识别模型中的神经元的参数,神经元的参数例如可以是神经元的权重(英文:Weight)和偏置量(英文:Bias)。重复上述步骤,直至损失函数满足预设条件,例如损失函数小于预设的损失阈值,以达到训练识别模型的目的。When training the recognition model, the first sample input set can be used as the input of the recognition model, and then the first sample output set can be used as the output of the recognition model to train the recognition model, so that when the first sample input set is input When , the output of the recognition model can match the output set of the first sample. For example, the loss function of the recognition model can be determined according to the output of the recognition model and the first sample output set, with the goal of reducing the loss function, and the backpropagation algorithm is used to correct the parameters of the neurons in the recognition model, the parameters of the neurons For example, it may be a weight (English: Weight) and a bias (English: Bias) of a neuron. Repeat the above steps until the loss function satisfies the preset condition, for example, the loss function is smaller than the preset loss threshold, so as to achieve the purpose of training the recognition model.
具体的,识别模型的损失可以分为清洁度损失和取整损失两部分。其中,根清洁度损失根据清洁度子模型的输出与第一样本输出集确定,取整损失根据取整子模型的输出与第一样本输出集确定。Specifically, the loss of the recognition model can be divided into two parts: cleanliness loss and rounding loss. Wherein, the root cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set, and the rounding loss is determined according to the output of the rounding sub-model and the first sample output set.
识别模型的损失可以通过公式三来确定:The loss of the recognition model can be determined by Equation 3:
L=L 1+γL 2 公式三 L=L 1 +γL 2 formula three
其中,L表示识别模型的损失,L 1表示取整损失,L 2表示清洁度损失,γ表示清洁度损失对应的权重参数,例如可以设置为0.5。 Among them, L represents the loss of the recognition model, L 1 represents the rounding loss, L 2 represents the cleanliness loss, and γ represents the weight parameter corresponding to the cleanliness loss, for example, it can be set to 0.5.
进一步的,清洁度损失可以通过公式四来确定:Further, the cleanliness loss can be determined by formula 4:
L 2=|f-y 2| 2=l 2  公式四 L 2 =|fy 2 | 2 =l 2 Formula 4
其中,L 2表示清洁度损失,f表示清洁度子模型的输出,y 2表示第一样本输出包括的真实清洁度,l=f-y 2Wherein, L 2 represents the cleanliness loss, f represents the output of the cleanliness sub-model, y 2 represents the real cleanliness included in the output of the first sample, l=fy 2 .
取整损失可以通过公式五,即交叉熵损失函数(英文:CrossEntropyLoss)来确定:The rounding loss can be determined by formula five, namely the cross entropy loss function (English: CrossEntropyLoss):
Figure PCTCN2022114259-appb-000003
Figure PCTCN2022114259-appb-000003
其中,L 1表示取整损失,M表示取整方式的数量,y 1,j表示第一样本输出包括的真实清洁度对应的取整方式,g j表示取整子模型输出的取整向量中第j维的数值。 Among them, L 1 represents the rounding loss, M represents the number of rounding methods, y 1,j represents the rounding method corresponding to the real cleanliness included in the first sample output, and g j represents the rounding vector output by the rounding sub-model The value of the jth dimension in .
进一步的,训练识别模型的初始学习率可以设置为:5e-2,Batch size可以设置为:128,优化器可以选择:SGD,Epoch可以设置为:60,Decay可以设置为:0.1,样本组织图像的大小可以为:224×224。Further, the initial learning rate of the training recognition model can be set to: 5e-2, the Batch size can be set to: 128, the optimizer can be selected: SGD, Epoch can be set to: 60, Decay can be set to: 0.1, and the sample organization image The size can be: 224×224.
在一种实现方式中,每个样本组织图像包括多个清洁度标签,该样本组织图像的真实清洁度根据该样本组织图像的多个清洁度标签确定,该样本组织图像的一致度根据该样本组织图像的多个清洁度标签中,与真实清洁度匹配的清洁度标签的数量确定。第一样本输出还包括对应的样本组织图像的一致度。In one implementation, each sample tissue image includes a plurality of cleanliness labels, the true cleanliness of the sample tissue image is determined according to the multiple cleanliness labels of the sample tissue image, and the consistency of the sample tissue image is determined according to the sample Among the multiple cleanliness labels of the tissue image, the number of cleanliness labels matching the real cleanliness is determined. The first sample output also includes a degree of consistency of the corresponding sample tissue image.
相应的,清洁度损失根据清洁度子模型的输出、每个第一样本输入中包括的真实清洁度和一致度确定。Correspondingly, the cleanliness loss is determined from the output of the cleanliness sub-model, the true cleanliness and consistency contained in each first sample input.
示例的,以组织图像为肠道图像(即内窥镜为肠镜)为例,根据BBPS的评分标准可以看出,清洁度实际上是根据肠道粘膜和污斑、浑浊液体、残留粪便的面积占比来确定的,导致专业人员在对样本组织图像进行标注时,很容易受主观影响。因此,在对识别模型训练时,可以由多个专业人员(例如从业经验超过5年的人员)对第一样本输入集中包括的每个第一样本输入进行标注,标注之后,每个样本组织图像都包括有多个清洁度标签。然后,可以根据每个样本组织图像的多个清洁度标签确定该样本组织图像的真实清洁度和一致度。As an example, taking the tissue image as an intestinal image (that is, the endoscope is a colonoscope) as an example, according to the BBPS scoring standard, it can be seen that the cleanliness is actually based on the intestinal mucosa and stains, turbid liquid, and residual feces. It is determined based on the area ratio, which makes it easy for professionals to be subject to subjective influence when labeling sample tissue images. Therefore, when training the recognition model, each first sample input included in the first sample input set can be marked by a plurality of professionals (for example, personnel with more than 5 years of experience in the industry). After marking, each sample Tissue images are included with multiple cleanliness labels. Then, the true cleanliness and consistency of each sample tissue image can be determined according to the plurality of cleanliness labels of the sample tissue image.
具体的,真实清洁度可以根据多个清洁度标签中,相同的清洁度标签的数量来确定。例如,一个样本组织图像包括K个清洁度标签,其中有超过K/2个清洁度标签为2分,那么可以确定该样本组织图像的真实清洁度为2分。再比如,一个样本组织图像包括K个清洁度标签,其中不存在超过K/2个相同的清洁度标签,那么可以将该样本组织图像从第一样本输入集中删除,即丢弃该样本组织图像。这样,可以减少主观性对真实清洁度的影响,从而保证识别模型训练的稳定性。Specifically, the true cleanliness may be determined according to the number of identical cleanliness labels among the multiple cleanliness labels. For example, if a sample tissue image includes K cleanliness labels, among which more than K/2 cleanliness labels are 2 points, then it can be determined that the real cleanliness of the sample tissue image is 2 points. For another example, if a sample tissue image includes K cleanliness labels, and there are no more than K/2 identical cleanliness labels, then the sample tissue image can be deleted from the first sample input set, that is, the sample tissue image is discarded . In this way, the influence of subjectivity on the true cleanliness can be reduced, thereby ensuring the stability of the recognition model training.
一致度可以根据样本组织图像的多个清洁度标签中,与真实清洁度匹配的清洁度标签的数量确定。例如,一个样本组织图像包括K个清洁度标签,其中,有D(D≥K/2)个清洁度标签为3分,该样本组织图像的真实清洁度为3分,该样本组织图像的一致度为D。一致度用于表示区分样本组织图像的难易程度,一致度越高,说明该样本组织图像越容易分辨,一致度越低,说明该样本组织图像越难分辨。进一步的,第一样本输出集中,每个第一样本输出,除了包括对应的样本组织图像的真实清洁度之外,还可以包括对应的样本组织图像的一致度。The degree of consistency can be determined according to the number of cleanliness labels matching the real cleanliness among the multiple cleanliness labels of the sample tissue image. For example, a sample tissue image includes K cleanliness labels, among which, there are D (D≥K/2) cleanliness labels with 3 points, the true cleanliness of the sample tissue image is 3 points, and the consistency of the sample tissue image is The degree is D. The degree of consistency is used to indicate the degree of difficulty in distinguishing the image of the sample tissue. The higher the degree of consistency, the easier it is to distinguish the image of the sample tissue, and the lower the degree of consistency, the more difficult it is to distinguish the image of the sample tissue. Further, in the first sample output set, each first sample output may include not only the actual cleanliness of the corresponding sample tissue image, but also the consistency of the corresponding sample tissue image.
相应的,清洁度损失可以根据清洁度子模型的输出、每个第一样本输入中包括的真实清洁度和一致度确定。具体的,可以通过公式六来确定清洁度损失:Correspondingly, the cleanliness loss can be determined from the output of the cleanliness sub-model, the true cleanliness and consistency contained in each first sample input. Specifically, the cleanliness loss can be determined by formula six:
Figure PCTCN2022114259-appb-000004
Figure PCTCN2022114259-appb-000004
其中,L 2表示清洁度损失,t表示预设的阈值,l=f-y 2。α表示预设的控制系数,例如可以设置为0.1,β表示预设的偏执系数,用于保证在l=t时,上下两种计算结果相同,可以设置为0.2,D表示第一样本输出中包括的一致度,K表示第一样本输出中可能的一致度,以每个样本组织图像包括5个清洁度标签为例,那么可能的一致度即为3、4、5。 Wherein, L 2 represents the loss of cleanliness, t represents a preset threshold, and l=fy 2 . α represents the preset control coefficient, for example, it can be set to 0.1; β represents the preset bias coefficient, which is used to ensure that when l=t, the upper and lower calculation results are the same, and can be set to 0.2; D represents the first sample output The degree of consistency included in , K represents the possible degree of consistency in the output of the first sample, taking each sample tissue image including 5 cleanliness labels as an example, then the possible degrees of consistency are 3, 4, 5.
在清洁度损失中引入了样本组织图像的一致度,能够减少主观性对识别模型训练的影响,从而提高识别模型的稳定性和准确性。The consistency of the sample tissue image is introduced in the cleanliness loss, which can reduce the influence of subjectivity on the recognition model training, thereby improving the stability and accuracy of the recognition model.
图5是根据一示例性实施例示出的另一种组织腔清洁度的确定方法的流程图,如图5所示,在步骤102之前,该方法还可以包括:Fig. 5 is a flow chart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 5, before step 102, the method may further include:
步骤104,利用预先训练的分类模型对组织图像进行分类,以确定组织图像的目标类型。 Step 104, classify the tissue image by using the pre-trained classification model to determine the target type of the tissue image.
相应的,步骤102的实现方式可以为:Correspondingly, the implementation manner of step 102 may be:
若目标类型指示组织图像的质量满足预设条件,根据组织图像和识别模型,确定初始清洁度和目标取整方式。If the target type indicates that the quality of the tissue image satisfies the preset condition, the initial cleanliness and the target rounding method are determined according to the tissue image and the recognition model.
举例来说,可以将内窥镜采集的组织图像,输入预先训练的分类模型,以使分类模型对组织图像进行分类,分类模型输出的即为组织图像的目标类型。目标类型可以包括:第一类型和第二类型,第一类型用于指示组织图像的质量满足预设条件,表示组织图像的质量较高,第二类型用于指示组织图像的质量不满足预设条件,表示组织图像的质量较差。其中,分类模型用于识别输入的图像的类型,可以根据预先采集的大量的训练图像,和每个训练图像对应的类型标签,对分类模型进行训练。分类模型例如可以是CNN或者LSTM,也可以是Transformer(例如Vision Transformer)中的Encoder等,本公开对此不作具体限定。当内窥镜为肠镜,组织图像为肠道图像时,预设条件可以包括:采集肠道图像时肠镜未被遮挡、采集肠道图像时肠镜与肠壁的距离大于预设的距离阈值、肠道图像的曝光度小于预设的曝光度阈值、肠道图像的模糊度小于预设的模糊度阈值、肠道图像中的肠道未发生粘连等。例如,若肠道中有污水遮挡,或者肠镜离肠壁过近、肠道图像过曝、肠道图像过于模糊、肠道出现粘连等情况,那么肠道图像的质量不满足预设条件。For example, the tissue image collected by the endoscope can be input into a pre-trained classification model, so that the classification model can classify the tissue image, and the output of the classification model is the target type of the tissue image. The target type may include: the first type and the second type, the first type is used to indicate that the quality of the tissue image meets the preset condition, indicating that the quality of the tissue image is high, and the second type is used to indicate that the quality of the tissue image does not meet the preset condition condition, indicating poor quality of tissue images. Wherein, the classification model is used to identify the type of the input image, and the classification model can be trained according to a large number of pre-collected training images and a type label corresponding to each training image. The classification model can be, for example, CNN or LSTM, or an Encoder in Transformer (such as Vision Transformer), etc., which is not specifically limited in the present disclosure. When the endoscope is a colonoscope and the tissue image is an intestinal image, the preset conditions may include: the colonoscope is not blocked when the intestinal image is collected, and the distance between the colonoscope and the intestinal wall is greater than the preset distance when the intestinal image is collected Threshold, the exposure of the intestinal tract image is less than the preset exposure threshold, the blurriness of the intestinal tract image is less than the preset blurriness threshold, there is no intestinal adhesion in the intestinal tract image, and the like. For example, if the intestinal tract is covered by sewage, or the colonoscope is too close to the intestinal wall, the intestinal image is overexposed, the intestinal image is too blurred, or the intestinal adhesion occurs, the quality of the intestinal image does not meet the preset conditions.
相应的,可以在目标类型指示组织图像的质量满足预设条件的情况下,再将组织图像输入识别模型,以使识别模型确定初始清洁度和目标取整方式。也就是说,在确定组织图像的质量较高时,再对组织图像进行识别。在目标类型指示组织图像的质量不满足预设条件的情况下,可以直接丢弃组织图像。进一步的,可以选取内窥镜在下一采集周期采集的图像,重复执行上述步骤,以确定组织腔的清洁度。Correspondingly, when the target type indicates that the quality of the tissue image satisfies the preset condition, the tissue image can be input into the recognition model, so that the recognition model can determine the initial cleanliness and the rounding method of the target. That is to say, when it is determined that the quality of the tissue image is high, the tissue image is then identified. In the case where the target type indicates that the quality of the tissue image does not meet the preset condition, the tissue image may be discarded directly. Further, the image collected by the endoscope in the next collection cycle may be selected, and the above steps may be repeated to determine the cleanliness of the tissue cavity.
图6是根据一示例性实施例示出的另一种组织腔清洁度的确定方法的流程图,如图6所示,步骤104的实现方式可以包括:Fig. 6 is a flowchart of another method for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 6, the implementation of step 104 may include:
步骤1041,对组织图像进行预处理,并将预处理后的组织图像划分为大小相等的多个子图像。 Step 1041, perform preprocessing on the tissue image, and divide the preprocessed tissue image into multiple sub-images of equal size.
步骤1042,根据每个子图像对应的图像向量,和该子图像对应的位置向量,确定该子图像对应的令牌,位置向量用于指示该子图像在预处理后的组织图像中的位置。 Step 1042, according to the image vector corresponding to each sub-image and the position vector corresponding to the sub-image, determine the token corresponding to the sub-image, and the position vector is used to indicate the position of the sub-image in the preprocessed tissue image.
步骤1043,将每个子图像对应的令牌,和组织图像对应的令牌输入编码器,以得到每个子图像对应的局部编码向量,和组织图像对应的全局编码向量。Step 1043: Input the token corresponding to each sub-image and the token corresponding to the tissue image into the encoder to obtain a local encoding vector corresponding to each sub-image and a global encoding vector corresponding to the tissue image.
步骤1044,将全局编码向量和多个局部编码向量输入分类层,以得到分类层输出的目标类型。 Step 1044, input the global encoding vector and multiple local encoding vectors into the classification layer, so as to obtain the target type output by the classification layer.
示例的,分类模型可以包括:编码器和分类层,还可以包括线性投射层。其中,编码器可以为Vision Transformer中的Encoder,分类层可以为MLP(英文:Multilayer Perceptron Head),线性投射层可以理解为一个全连接层。Exemplarily, the classification model may include: an encoder and a classification layer, and may also include a linear projection layer. Among them, the encoder can be the Encoder in Vision Transformer, the classification layer can be MLP (English: Multilayer Perceptron Head), and the linear projection layer can be understood as a fully connected layer.
首先可以对组织图像进行预处理,以对组织图像中包括的数据进行增强处理,预处理可以包括:随机仿射变换,随机亮度、对比度、饱和度、色度调整,尺寸变换等处理,最后得到的预处理后的组织图像可以是指定尺寸(例如可以是224*224)的图像。之后,可以将预处理后的组织图像按照指定大小划分为大小相等的多个子图像(可以表示为patch),例如,预处理后的组织图像为224*224,指定大小为16*16,那么可以将预处理后的组织图像划分为196个子图像。First, the tissue image can be preprocessed to enhance the data included in the tissue image. The preprocessing can include: random affine transformation, random brightness, contrast, saturation, hue adjustment, size transformation, etc., and finally get The preprocessed tissue image may be an image of a specified size (for example, 224*224). After that, the preprocessed tissue image can be divided into multiple sub-images of equal size (which can be represented as patches) according to the specified size. For example, the preprocessed tissue image is 224*224, and the specified size is 16*16, then you can Divide the preprocessed tissue image into 196 sub-images.
之后,可以利用线性投射层先将每个子图像进行展平处理,得到该子图像对应的图像向量(可以表示为patch embedding),图像向量能够表征该子图像。进一步的,还可以生成用于指示该子图像在预处理后的组织图像中的位置的位置向量(可以表示为position embedding),其中,position embedding的大小与patch embedding的大小相同。需要说明的是,position embedding可以随机生成,编码器能够学习到对应的子图像在组织图像的位置的表征。之后,可以根据每个子图像的图像向量和位置向量,生成该子图像对应的令牌(可以表示为token)。具体的,每个子图像对应的令牌,可以是将该子图像的图像向量和位置向量进行拼接得到的。Afterwards, each sub-image can be flattened by using the linear projection layer to obtain an image vector corresponding to the sub-image (which can be expressed as patch embedding), and the image vector can represent the sub-image. Further, a position vector (may be expressed as position embedding) for indicating the position of the sub-image in the preprocessed tissue image may also be generated, where the size of the position embedding is the same as that of the patch embedding. It should be noted that the position embedding can be randomly generated, and the encoder can learn the representation of the position of the corresponding sub-image in the tissue image. Afterwards, according to the image vector and position vector of each sub-image, a token corresponding to the sub-image (which can be expressed as a token) can be generated. Specifically, the token corresponding to each sub-image may be obtained by concatenating the image vector and the position vector of the sub-image.
进一步的,在得到每个子图像对应的令牌之后,还可以生成组织图像对应的令牌。例如,可以随机生成一个图像向量和一个位置向量,并进行拼接,以作为组织图像对应的令牌。Further, after the token corresponding to each sub-image is obtained, the token corresponding to the tissue image may also be generated. For example, an image vector and a position vector can be randomly generated and concatenated to serve as tokens corresponding to the tissue image.
然后,可以将每个子图像对应的令牌,和组织图像对应的令牌输入编码器,编码器能够根据每个子图像对应的令牌,生成每个子图像对应的局部编码向量,同时,还能够根据全部子图像对应的令牌,生成组织图像对应的全局编码向量。其中,局部编码向量可以理解为编码器学习到的,能够表征对应的子图像的向量,全局编码向量可以理解为编码器学习到的,能够表征整个组织图像的向量。Then, the token corresponding to each sub-image and the token corresponding to the tissue image can be input into the encoder, and the encoder can generate a local encoding vector corresponding to each sub-image according to the token corresponding to each sub-image. At the same time, it can also be based on Tokens corresponding to all sub-images generate global encoding vectors corresponding to tissue images. Wherein, the local encoding vector can be understood as a vector learned by the encoder and can represent the corresponding sub-image, and the global encoding vector can be understood as the vector learned by the encoder and can represent the entire tissue image.
最后,可以将全局编码向量和多个局部编码向量输入分类层,分类层的输出即为目标类型。具体的,可以将全局编码向量和多个局部编码向量进行拼接,得到一个综合编码向量,然后将综合编码向量输入分类层,分类层能够根据综合编码向量,确定组织图像分别与多种类型的匹配概率,最后将匹配概率最大的类型作为目标类型。由于分类层的输入既包括全局编码向量,又包括各个局部编码向量,整合了整个组织图像和各个子图像的特征,即考虑了全局的信息和局部的信息,能够有效提高分类模型的分类准确度。Finally, the global encoding vector and multiple local encoding vectors can be input into the classification layer, and the output of the classification layer is the target type. Specifically, the global encoding vector and multiple local encoding vectors can be concatenated to obtain a comprehensive encoding vector, and then the integrated encoding vector is input into the classification layer, and the classification layer can determine the matching of tissue images with various types according to the integrated encoding vector. Probability, and finally the type with the highest matching probability is used as the target type. Since the input of the classification layer includes both the global encoding vector and each local encoding vector, the characteristics of the entire tissue image and each sub-image are integrated, that is, the global information and local information are considered, which can effectively improve the classification accuracy of the classification model. .
图7是根据一示例性实施例示出的一种训练分类模型的流程图,如图7所示,分类模型是通过以下方式训练得到的:Fig. 7 is a flow chart showing a training classification model according to an exemplary embodiment. As shown in Fig. 7, the classification model is obtained by training in the following manner:
步骤C,获取第二样本输入集和第二样本输出集,第二样本输入集包括:多个第二样本输入,每个第二样本输入包括样本组织图像,第二样本输出集中包括与每个第二样本输入对应的第二样本输出,每个第二样本输出包括对应的样本组织图像的真实类型。Step C, obtaining a second sample input set and a second sample output set, the second sample input set includes: a plurality of second sample inputs, each second sample input includes a sample tissue image, and the second sample output set includes each The second sample input corresponds to the second sample output, and each second sample output includes the true type of the corresponding sample tissue image.
步骤D,将第二样本输入集作为分类模型的输入,将第二样本输出集作为分类模型的输出,以训练分类模型。In step D, the second sample input set is used as the input of the classification model, and the second sample output set is used as the output of the classification model, so as to train the classification model.
举例来说,在对分类模型进行训练时,需要先获取用于训练分类模型的第二样本输入集和第二样本输出集。第二样本输入集中包括了多个第二样本输入,每个第二样本输入可以为一个样本组织图像, 样本组织图像例如可以是之前执行内窥镜检查时采集到的组织图像。第二样本输出集中包括了与每个第二样本输入对应的第二样本输出,每个第二样本输出包括对应的样本组织图像的真实类型,真实类型可以包括:第一类型和第二类型,第一类型用于指示组织图像的质量满足预设条件,第二类型用于指示组织图像的质量不满足预设条件。For example, when training a classification model, it is necessary to obtain a second sample input set and a second sample output set for training the classification model. The second sample input set includes a plurality of second sample inputs, and each second sample input may be a sample tissue image, and the sample tissue image may be, for example, a tissue image collected during an endoscopic examination before. The second sample output set includes a second sample output corresponding to each second sample input, and each second sample output includes the true type of the corresponding sample tissue image, and the true type may include: the first type and the second type, The first type is used to indicate that the quality of the tissue image meets the preset condition, and the second type is used to indicate that the quality of the tissue image does not meet the preset condition.
在对分类模型训练时,可以将第二样本输入集作为分类模型的输入,然后再将第二样本输出集作为分类模型的输出,来训练分类模型,使得在输入第二样本输入集时,分类模型的输出,能够和第二样本输出集匹配。例如,可以根据分类模型的输出,与第二样本输出集的差(或者均方差)作为分类模型的损失函数,以降低损失函数为目标,利用反向传播算法来修正分类模型中的神经元的参数,神经元的参数例如可以是神经元的权重和偏置量。重复上述步骤,直至损失函数满足预设条件,例如损失函数小于预设的损失阈值,以达到训练分类模型的目的。具体的,分类模型的损失函数可以如公式七(即交叉熵损失函数)所示:When training the classification model, the second sample input set can be used as the input of the classification model, and then the second sample output set can be used as the output of the classification model to train the classification model, so that when the second sample input set is input, the classification The output of the model can be matched with the second sample output set. For example, according to the output of the classification model, the difference (or mean square error) with the second sample output set can be used as the loss function of the classification model, with the goal of reducing the loss function, and the backpropagation algorithm is used to correct the neurons in the classification model. Parameters, the parameters of the neuron may be, for example, the weight and bias of the neuron. Repeat the above steps until the loss function satisfies the preset condition, for example, the loss function is smaller than the preset loss threshold, so as to achieve the purpose of training the classification model. Specifically, the loss function of the classification model can be shown in Formula 7 (ie, the cross-entropy loss function):
Figure PCTCN2022114259-appb-000005
Figure PCTCN2022114259-appb-000005
其中,L class表示分类模型的损失函数,
Figure PCTCN2022114259-appb-000006
表示分类模型的输出(可以理解为样本组织图像与第q种类型的匹配概率),s q表示样本组织图像的真实类型与第q种类型的匹配概率,F表示真实类型的种数。以真实类型包括第一类型和第二类型,第一类型用于指示组织图像的质量满足预设条件,第二类型用于指示组织图像的质量不满足预设条件为例,那么F=2。
Among them, L class represents the loss function of the classification model,
Figure PCTCN2022114259-appb-000006
Indicates the output of the classification model (which can be understood as the matching probability between the sample tissue image and the qth type), s q represents the matching probability between the real type of the sample tissue image and the qth type, and F represents the number of real types. Taking the real type includes a first type and a second type, the first type is used to indicate that the quality of the tissue image meets the preset condition, and the second type is used to indicate that the quality of the tissue image does not meet the preset condition, then F=2.
综上所述,本公开首先获取内窥镜采集的组织图像,之后根据组织图像和预先训练的识别模型,确定浮点型的初始清洁度和目标取整方式。最后按照目标取整方式,对初始清洁度进行取整,以得到组织图像的清洁度,清洁度为整型。本公开通过识别模型确定浮点型的初始清洁度和适用于组织图像的目标取整方式,从而利用目标取整方式对初始清洁度进行取整,以得到组织图像的清洁度,能够提高清洁度的准确性。To sum up, the disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating-point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer. The disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
图8是根据一示例性实施例示出的一种组织腔清洁度的确定装置的框图,如图8所示,该装置200可以包括:Fig. 8 is a block diagram of a device for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 8, the device 200 may include:
获取模块201,用于获取内窥镜采集的组织图像。The obtaining module 201 is configured to obtain tissue images collected by the endoscope.
识别模块202,用于根据组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,初始清洁度为浮点型。The recognition module 202 is configured to determine the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, and the initial cleanliness is a floating-point type.
取整模块203,用于按照目标取整方式,对初始清洁度进行取整,以得到组织图像的清洁度,清洁度为整型。The rounding module 203 is configured to round the initial cleanliness according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
图9是根据一示例性实施例示出的另一种组织腔清洁度的确定装置的框图,如图9所示,识别模型包括:特征提取子模型、清洁度子模型和取整子模型。Fig. 9 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 9 , the identification model includes: a feature extraction sub-model, a cleanliness sub-model and a rounding sub-model.
相应的,识别模块202可以包括:Correspondingly, the identification module 202 may include:
特征提取子模块2021,用于将组织图像输入特征提取子模型,以得到特征提取子模型输出的,用于表征组织图像的图像特征。The feature extraction sub-module 2021 is configured to input the tissue image into the feature extraction sub-model to obtain the image features output by the feature extraction sub-model for characterizing the tissue image.
处理子模块2022,用于将图像特征分别输入清洁度子模型和取整子模型,以得到清洁度子模型输出的清洁度向量,和取整子模型输出的取整向量。The processing sub-module 2022 is used to input the image features into the cleanliness sub-model and the rounding sub-model respectively, so as to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model.
确定子模块2023,用于根据清洁度向量,确定初始清洁度,并根据取整向量,确定目标取整方式。The determining sub-module 2023 is configured to determine the initial cleanliness according to the cleanliness vector, and determine the target rounding method according to the rounding vector.
在一种实现方式中,确定子模块2023可以用于执行以下步骤:In one implementation, the determining submodule 2023 can be used to perform the following steps:
步骤1)根据清洁度向量,确定组织图像与多种清洁度类型的匹配概率。Step 1) According to the cleanliness vector, determine the matching probabilities of the tissue image and various cleanliness types.
步骤2)根据每种清洁度类型对应的权重,和组织图像与多种清洁度类型的匹配概率,确定初始清洁度。Step 2) Determine the initial cleanliness according to the weight corresponding to each cleanliness type and the matching probability of the tissue image and multiple cleanliness types.
步骤3)根据取整向量,确定组织图像与多种取整方式的匹配概率。Step 3) Determine the matching probabilities of the tissue image and multiple rounding methods according to the rounding vector.
步骤4)根据组织图像与多种取整方式的匹配概率,在多种取整方式中确定目标取整方式。Step 4) Determine the target rounding method among the multiple rounding methods according to the matching probabilities between the tissue image and the multiple rounding methods.
在另一种实现方式中,识别模型是通过以下方式训练得到的:In another implementation, the recognition model is trained by:
步骤A,获取第一样本输入集和第一样本输出集,第一样本输入集包括:多个第一样本输入,每个第一样本输入包括样本组织图像,第一样本输出集中包括与每个第一样本输入对应的第一样本输出,每个第一样本输出包括对应的样本组织图像的真实清洁度。Step A, obtaining a first sample input set and a first sample output set, the first sample input set includes: a plurality of first sample inputs, each first sample input includes a sample tissue image, the first sample The output set includes a first sample output corresponding to each first sample input, each first sample output including the true cleanliness of the corresponding sample tissue image.
步骤B,将第一样本输入集作为识别模型的输入,将第一样本输出集作为识别模型的输出,以训练识别模型。In step B, the first sample input set is used as the input of the recognition model, and the first sample output set is used as the output of the recognition model, so as to train the recognition model.
其中,识别模型的损失,根据清洁度损失和取整损失确定,清洁度损失根据清洁度子模型的输出与第一样本输出集确定,取整损失根据取整子模型的输出与第一样本输出集确定。Among them, the loss of the identification model is determined according to the cleanliness loss and the rounding loss, the cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set, and the rounding loss is determined according to the output of the rounding sub-model and the first sample output set This output set is OK.
在又一种实现方式中,每个样本组织图像包括多个清洁度标签,该样本组织图像的真实清洁度根据该样本组织图像的多个清洁度标签确定,该样本组织图像的一致度根据该样本组织图像的多个清洁度标签中,与真实清洁度匹配的清洁度标签的数量确定。第一样本输出还包括对应的样本组织图像的一致度。In yet another implementation, each sample tissue image includes multiple cleanliness labels, the real cleanliness of the sample tissue image is determined according to the multiple cleanliness labels of the sample tissue image, and the consistency of the sample tissue image is determined according to the Among the multiple cleanliness labels of the sample tissue image, the number of cleanliness labels matching the real cleanliness is determined. The first sample output also includes a degree of consistency of the corresponding sample tissue image.
相应的,清洁度损失根据清洁度子模型的输出、每个第一样本输入中包括的真实清洁度和一致度确定。Correspondingly, the cleanliness loss is determined from the output of the cleanliness sub-model, the true cleanliness and consistency contained in each first sample input.
图10是根据一示例性实施例示出的另一种组织腔清洁度的确定装置的框图,如图10所示,该装置200还包括:Fig. 10 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 10, the device 200 further includes:
分类模块204,用于在根据组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式之前,利用预先训练的分类模型对组织图像进行分类,以确定组织图像的目标类型。The classification module 204 is configured to classify the tissue image by using the pre-trained classification model to determine the target type of the tissue image before determining the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model.
相应的,识别模块202可以用于若目标类型指示组织图像的质量满足预设条件,根据组织图像和识别模型,确定初始清洁度和目标取整方式。Correspondingly, the recognition module 202 may be configured to determine the initial cleanliness and the rounding method of the target according to the tissue image and the recognition model if the target type indicates that the quality of the tissue image satisfies a preset condition.
图11是根据一示例性实施例示出的另一种组织腔清洁度的确定装置的框图,如图11所示,分类模块204可以包括:Fig. 11 is a block diagram of another device for determining the cleanliness of a tissue cavity according to an exemplary embodiment. As shown in Fig. 11 , the classification module 204 may include:
预处理子模块2041,用于对组织图像进行预处理,并将预处理后的组织图像划分为大小相等的多个子图像。The preprocessing sub-module 2041 is configured to preprocess the tissue image, and divide the preprocessed tissue image into multiple sub-images of equal size.
令牌确定子模块2042,用于根据每个子图像对应的图像向量,和该子图像对应的位置向量,确定该子图像对应的令牌,位置向量用于指示该子图像在预处理后的组织图像中的位置。The token determination sub-module 2042 is configured to determine the token corresponding to the sub-image according to the image vector corresponding to each sub-image and the position vector corresponding to the sub-image, and the position vector is used to indicate the organization of the sub-image after preprocessing position in the image.
编码子模块2043,用于将每个子图像对应的令牌,和组织图像对应的令牌输入编码器,以得到每个子图像对应的局部编码向量,和组织图像对应的全局编码向量。The encoding sub-module 2043 is configured to input the token corresponding to each sub-image and the token corresponding to the tissue image into the encoder to obtain a local encoding vector corresponding to each sub-image and a global encoding vector corresponding to the tissue image.
分类子模块2044,用于将全局编码向量和多个局部编码向量输入分类层,以得到分类层输出的目标类型。The classification sub-module 2044 is configured to input the global encoding vector and multiple local encoding vectors into the classification layer, so as to obtain the target type output by the classification layer.
在一种实现方式中,分类模型是通过以下方式训练得到的:In one implementation, the classification model is trained by:
步骤C,获取第二样本输入集和第二样本输出集,第二样本输入集包括:多个第二样本输入,每个第二样本输入包括样本组织图像,第二样本输出集中包括与每个第二样本输入对应的第二样本输出,每个第二样本输出包括对应的样本组织图像的真实类型。Step C, obtaining a second sample input set and a second sample output set, the second sample input set includes: a plurality of second sample inputs, each second sample input includes a sample tissue image, and the second sample output set includes each The second sample input corresponds to the second sample output, and each second sample output includes the true type of the corresponding sample tissue image.
步骤D,将第二样本输入集作为分类模型的输入,将第二样本输出集作为分类模型的输出,以训练分类模型。In step D, the second sample input set is used as the input of the classification model, and the second sample output set is used as the output of the classification model, so as to train the classification model.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
综上所述,本公开首先获取内窥镜采集的组织图像,之后根据组织图像和预先训练的识别模型,确定浮点型的初始清洁度和目标取整方式。最后按照目标取整方式,对初始清洁度进行取整,以得到组织图像的清洁度,清洁度为整型。本公开通过识别模型确定浮点型的初始清洁度和适用于组织图像的目标取整方式,从而利用目标取整方式对初始清洁度进行取整,以得到组织图像的清洁度,能够提高清洁度的准确性。To sum up, the disclosure first obtains the tissue image collected by the endoscope, and then determines the initial cleanliness of the floating-point type and the target rounding method according to the tissue image and the pre-trained recognition model. Finally, the initial cleanliness is rounded according to the target rounding method to obtain the cleanliness of the tissue image, and the cleanliness is an integer. The disclosure determines the initial cleanliness of the floating-point type and the target rounding method suitable for tissue images through the recognition model, thereby using the target rounding method to round the initial cleanliness to obtain the cleanliness of the tissue image, which can improve the cleanliness accuracy.
下面参考图12,其示出了适于用来实现本公开实施例的电子设备(例如可以上述实施例中的执行主体,可以是终端设备或服务器)300的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图12示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 12 , it shows a schematic structural diagram of an electronic device (for example, the execution subject in the above embodiments, which may be a terminal device or a server) 300 suitable for implementing the embodiments of the present disclosure. The terminal equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 12 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
如图12所示,电子设备300可以包括处理装置(例如中央处理器、图形处理器等)301,其可以根据存储在只读存储器(ROM)302中的程序或者从存储装置308加载到随机访问存储器(RAM)303中的程序而执行各种适当的动作和处理。在RAM 303中,还存储有电子设备300操作所需的各种程序和数据。处理装置301、ROM 302以及RAM 303通过总线304彼此相连。输入/输出(I/O)接口305也连接至总线304。As shown in FIG. 12, an electronic device 300 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 301, which may be randomly accessed according to a program stored in a read-only memory (ROM) 302 or loaded from a storage device 308. Various appropriate actions and processes are executed by programs in the memory (RAM) 303 . In the RAM 303, various programs and data necessary for the operation of the electronic device 300 are also stored. The processing device 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to the bus 304 .
通常,以下装置可以连接至I/O接口305:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置306;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置307;包括例如磁带、硬盘等的存储装置308;以及通信装置309。通信装置309可以允许电子设备300与其他设备进行无线或有线通信以交换数据。虽然图12示出了具有各种装置的电子设备300,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibrating an output device 307 such as a computer; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to perform wireless or wired communication with other devices to exchange data. While FIG. 12 shows electronic device 300 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置309从网络上被下载和安装,或者从存储装置308被安装,或者从ROM 302被安装。在该计算机程序被处理装置301执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 309, or from storage means 308, or from ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置 或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,终端设备、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the terminal device and the server can communicate with any currently known or future-developed network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium The communication (eg, communication network) interconnections. Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取内窥镜采集的组织图像;根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires the tissue image collected by the endoscope; according to the tissue image and the pre-trained Identifying the model, determining the initial cleanliness and the target rounding method, the initial cleanliness is a floating-point type; according to the target rounding method, rounding the initial cleanliness to obtain the cleanliness of the tissue image , the cleanliness is an integer.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as "C" or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, using an Internet service provider to connected via the Internet).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,获取模块还可以被描述为“获取组织图像的模块”。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the module itself under certain circumstances, for example, the obtaining module may also be described as a "module for obtaining tissue images".
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
根据本公开的一个或多个实施例,示例1提供了一种组织腔清洁度的确定方法,包括:获取内窥镜采集的组织图像;根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。According to one or more embodiments of the present disclosure, Example 1 provides a method for determining the cleanliness of a tissue cavity, including: acquiring a tissue image collected by an endoscope; according to the tissue image and a pre-trained recognition model, determining an initial Cleanliness and target rounding method, the initial cleanliness is a floating point type; according to the target rounding method, the initial cleanliness is rounded to obtain the cleanliness of the tissue image, the cleanliness is an integer.
根据本公开的一个或多个实施例,示例2提供了示例1的方法,所述识别模型包括:特征提取子模型、清洁度子模型和取整子模型;所述根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,包括:将所述组织图像输入所述特征提取子模型,以得到所述特征提取子模型输出的,用于表征所述组织图像的图像特征;将所述图像特征分别输入所述清洁度子模型和所述取整子模型,以得到所述清洁度子模型输出的清洁度向量,和所述取整子模型输出的取整向量;根据所述清洁度向量,确定所述初始清洁度,并根据所述取整向量,确定所述目标取整方式。According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, the recognition model includes: a feature extraction sub-model, a cleanliness sub-model and a rounding sub-model; The trained recognition model determines the initial cleanliness and the target rounding method, including: inputting the tissue image into the feature extraction sub-model to obtain an image output by the feature extraction sub-model for characterizing the tissue image feature; input the image feature into the cleanliness sub-model and the rounding sub-model respectively, to obtain the cleanliness vector output by the cleanliness sub-model, and the rounding vector output by the rounding sub-model; The initial cleanliness is determined according to the cleanliness vector, and the target rounding manner is determined according to the rounding vector.
根据本公开的一个或多个实施例,示例3提供了示例2的方法,所述根据所述清洁度向量,确定所述初始清洁度,包括:根据所述清洁度向量,确定所述组织图像与多种清洁度类型的匹配概率;根据每种所述清洁度类型对应的权重,和所述组织图像与多种所述清洁度类型的匹配概率,确定所述初始清洁度;所述根据所述取整向量,确定所述目标取整方式,包括:根据所述取整向量,确定所述组织图像与多种取整方式的匹配概率;根据所述组织图像与多种所述取整方式的匹配概率,在多种所述取整方式中确定所述目标取整方式。According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, the determining the initial cleanliness according to the cleanliness vector includes: determining the tissue image according to the cleanliness vector Matching probabilities with multiple types of cleanliness; determining the initial cleanliness according to the weight corresponding to each type of cleanliness and the matching probability of the tissue image with multiple types of cleanliness; The rounding vector, determining the target rounding method, includes: according to the rounding vector, determining the matching probability of the tissue image and multiple rounding methods; according to the tissue image and multiple rounding methods The matching probability of , and determine the target rounding method among multiple rounding methods.
根据本公开的一个或多个实施例,示例4提供了示例2的方法,所述识别模型是通过以下方式训练得到的:获取第一样本输入集和第一样本输出集,所述第一样本输入集包括:多个第一样本输入,每个所述第一样本输入包括样本组织图像,所述第一样本输出集中包括与每个所述第一样本输入对应的第一样本输出,每个所述第一样本输出包括对应的所述样本组织图像的真实清洁度;将所述第一样本输入集作为所述识别模型的输入,将所述第一样本输出集作为所述识别模型的输出,以训练所述识别模型;所述识别模型的损失,根据清洁度损失和取整损失确定,所述清洁度损失根据所述清洁度子模型的输出与所述第一样本输出集确定,所述取整损失根据所述取整子模型的输出与所述第一样本输出集确定。According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, the recognition model is obtained by training in the following manner: obtaining a first sample input set and a first sample output set, the first A sample input set includes: a plurality of first sample inputs, each of the first sample inputs includes a sample tissue image, and the first sample output set includes a corresponding to each of the first sample inputs The first sample output, each of the first sample outputs includes the true cleanliness of the corresponding sample tissue image; the first sample input set is used as the input of the recognition model, and the first The sample output set is used as the output of the recognition model to train the recognition model; the loss of the recognition model is determined according to the cleanliness loss and the rounding loss, and the cleanliness loss is determined according to the output of the cleanliness sub-model determined with the first sample output set, and the rounding loss is determined according to the output of the rounding sub-model and the first sample output set.
根据本公开的一个或多个实施例,示例5提供了示例4的方法,每个所述样本组织图像包括多个清洁度标签,该样本组织图像的真实清洁度根据该样本组织图像的多个所述清洁度标签确定,该样本组织图像的一致度根据该样本组织图像的多个所述清洁度标签中,与所述真实清洁度匹配的所述清洁度标签的数量确定;所述第一样本输出还包括对应的所述样本组织图像的一致度;所述清洁度损失根据所述清洁度子模型的输出、每个所述第一样本输入中包括的所述真实清洁度和所述一致度确定。According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, each of the sample tissue images includes a plurality of cleanliness labels, and the real cleanliness of the sample tissue image is based on the plurality of cleanliness labels of the sample tissue image. The cleanliness label is determined, and the consistency of the sample tissue image is determined according to the number of the cleanliness labels that match the real cleanliness among the multiple cleanliness labels of the sample tissue image; the first The sample output also includes the consistency of the corresponding sample tissue image; the cleanliness loss is based on the output of the cleanliness sub-model, the true cleanliness included in each of the first sample inputs, and the The degree of consistency is determined.
根据本公开的一个或多个实施例,示例6提供了示例1的方法,在所述根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式之前,所述方法还包括:利用预先训练的分类模型对所述组织图像进行分类,以确定所述组织图像的目标类型;所述根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,包括:若所述目标类型指示所述组织图像的质量满足预设条件,根据所述组织图像和所述识别模型,确定所述初始清洁度和所述目标取整方式。According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, before determining the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, the method further Including: using a pre-trained classification model to classify the tissue image to determine the target type of the tissue image; determining the initial cleanliness and target rounding method according to the tissue image and the pre-trained recognition model, The method includes: if the target type indicates that the quality of the tissue image satisfies a preset condition, determining the initial cleanliness and the target rounding method according to the tissue image and the recognition model.
根据本公开的一个或多个实施例,示例7提供了示例6的方法,所述分类模型包括:编码器和分类层,所述利用预先训练的分类模型对所述组织图像进行分类,以确定所述组织图像的目标类型,包括:对所述组织图像进行预处理,并将预处理后的所述组织图像划分为大小相等的多个子图像;根据每个所述子图像对应的图像向量,和该子图像对应的位置向量,确定该子图像对应的令牌,所述位置向量用于指示该子图像在预处理后的所述组织图像中的位置;将每个所述子图像对应的令牌,和所述组织图像对应的令牌输入编码器,以得到每个子图像对应的局部编码向量,和所述组织图像对应的全 局编码向量;将所述全局编码向量和多个所述局部编码向量输入分类层,以得到所述分类层输出的所述目标类型。According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, the classification model includes: an encoder and a classification layer, and the pre-trained classification model is used to classify the tissue image to determine The target type of the tissue image includes: preprocessing the tissue image, and dividing the preprocessed tissue image into multiple sub-images of equal size; according to the image vector corresponding to each of the sub-images, The position vector corresponding to the sub-image determines the token corresponding to the sub-image, and the position vector is used to indicate the position of the sub-image in the preprocessed tissue image; each of the sub-images corresponds to token, and the token corresponding to the tissue image is input into the encoder to obtain a local encoding vector corresponding to each sub-image, and a global encoding vector corresponding to the tissue image; combine the global encoding vector and a plurality of the local encoding vectors An encoded vector is input to a classification layer to obtain the object type output by the classification layer.
根据本公开的一个或多个实施例,示例8提供了示例7的方法,所述分类模型是通过以下方式训练得到的:获取第二样本输入集和第二样本输出集,所述第二样本输入集包括:多个第二样本输入,每个所述第二样本输入包括样本组织图像,所述第二样本输出集中包括与每个所述第二样本输入对应的第二样本输出,每个所述第二样本输出包括对应的所述样本组织图像的真实类型;将所述第二样本输入集作为所述分类模型的输入,将所述第二样本输出集作为所述分类模型的输出,以训练所述分类模型。According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7, the classification model is obtained by training in the following manner: obtaining a second sample input set and a second sample output set, the second sample The input set includes: a plurality of second sample inputs, each of which includes a sample tissue image, and the second sample output set includes a second sample output corresponding to each of the second sample inputs, each The second sample output includes the true type of the corresponding sample tissue image; the second sample input set is used as the input of the classification model, and the second sample output set is used as the output of the classification model, to train the classification model.
根据本公开的一个或多个实施例,示例9提供了一种组织腔清洁度的确定装置,包括:获取模块,用于获取内窥镜采集的组织图像;识别模块,用于根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;取整模块,用于按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。According to one or more embodiments of the present disclosure, Example 9 provides a device for determining the cleanliness of a tissue cavity, including: an acquisition module for acquiring tissue images collected by an endoscope; an identification module for The image and the pre-trained recognition model determine the initial cleanliness and the target rounding method, the initial cleanliness is a floating point type; the rounding module is used to round the initial cleanliness according to the target rounding method integer to obtain the cleanliness of the tissue image, and the cleanliness is integer.
根据本公开的一个或多个实施例,示例10提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例1至示例8中所述方法的步骤。According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the methods described in Example 1 to Example 8 are implemented.
根据本公开的一个或多个实施例,示例11提供了一种电子设备,包括:存储装置,其上存储有计算机程序;处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例1至示例8中所述方法的步骤。According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including: a storage device on which a computer program is stored; a processing device configured to execute the computer program in the storage device to Implement the steps of the method described in Example 1 to Example 8.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principle. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (11)

  1. 一种组织腔清洁度的确定方法,其中,所述方法包括:A method for determining the cleanliness of a tissue cavity, wherein the method comprises:
    获取内窥镜采集的组织图像;Obtain tissue images collected by the endoscope;
    根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;Determine the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, and the initial cleanliness is a floating-point type;
    按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。According to the target rounding manner, the initial cleanliness is rounded to obtain the cleanliness of the tissue image, and the cleanliness is an integer.
  2. 根据权利要求1所述的方法,其中,所述识别模型包括:特征提取子模型、清洁度子模型和取整子模型;所述根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,包括:The method according to claim 1, wherein the identification model comprises: a feature extraction sub-model, a cleanliness sub-model and a rounding sub-model; the initial cleanliness is determined according to the tissue image and the pre-trained identification model and target rounding methods, including:
    将所述组织图像输入所述特征提取子模型,以得到所述特征提取子模型输出的,用于表征所述组织图像的图像特征;inputting the tissue image into the feature extraction sub-model to obtain image features output by the feature extraction sub-model for characterizing the tissue image;
    将所述图像特征分别输入所述清洁度子模型和所述取整子模型,以得到所述清洁度子模型输出的清洁度向量,和所述取整子模型输出的取整向量;Inputting the image features into the cleanliness sub-model and the rounding sub-model respectively to obtain the cleanliness vector output by the cleanliness sub-model and the rounding vector output by the rounding sub-model;
    根据所述清洁度向量,确定所述初始清洁度,并根据所述取整向量,确定所述目标取整方式。The initial cleanliness is determined according to the cleanliness vector, and the target rounding manner is determined according to the rounding vector.
  3. 根据权利要求2所述的方法,其中,所述根据所述清洁度向量,确定所述初始清洁度,包括:The method according to claim 2, wherein said determining said initial cleanliness according to said cleanliness vector comprises:
    根据所述清洁度向量,确定所述组织图像与多种清洁度类型的匹配概率;determining the matching probabilities of the tissue image and multiple cleanliness types according to the cleanliness vector;
    根据每种所述清洁度类型对应的权重,和所述组织图像与多种所述清洁度类型的匹配概率,确定所述初始清洁度;determining the initial cleanliness according to the weight corresponding to each of the cleanliness types and the matching probabilities of the tissue image and multiple cleanliness types;
    所述根据所述取整向量,确定所述目标取整方式,包括:The determining the target rounding method according to the rounding vector includes:
    根据所述取整向量,确定所述组织图像与多种取整方式的匹配概率;According to the rounding vector, determine the matching probability of the tissue image and multiple rounding methods;
    根据所述组织图像与多种所述取整方式的匹配概率,在多种所述取整方式中确定所述目标取整方式。The target rounding method is determined among the multiple rounding methods according to the matching probabilities of the tissue image and the multiple rounding methods.
  4. 根据权利要求2所述的方法,其中,所述识别模型是通过以下方式训练得到的:The method according to claim 2, wherein the recognition model is obtained by training in the following manner:
    获取第一样本输入集和第一样本输出集,所述第一样本输入集包括:多个第一样本输入,每个所述第一样本输入包括样本组织图像,所述第一样本输出集中包括与每个所述第一样本输入对应的第一样本输出,每个所述第一样本输出包括对应的所述样本组织图像的真实清洁度;Obtain a first sample input set and a first sample output set, the first sample input set includes: a plurality of first sample inputs, each of the first sample inputs includes a sample tissue image, the first sample input set includes: A sample output set includes a first sample output corresponding to each of the first sample inputs, and each of the first sample outputs includes the true cleanliness of the corresponding sample tissue image;
    将所述第一样本输入集作为所述识别模型的输入,将所述第一样本输出集作为所述识别模型的输出,以训练所述识别模型;using the first sample input set as an input to the recognition model, and using the first sample output set as an output of the recognition model to train the recognition model;
    所述识别模型的损失,根据清洁度损失和取整损失确定,所述清洁度损失根据所述清洁度子模型的输出与所述第一样本输出集确定,所述取整损失根据所述取整子模型的输出与所述第一样本输出集确定。The loss of the identification model is determined according to the cleanliness loss and the rounding loss, the cleanliness loss is determined according to the output of the cleanliness sub-model and the first sample output set, and the rounding loss is determined according to the The output of the rounded submodel is determined with the first set of sample outputs.
  5. 根据权利要求4所述的方法,其中,每个所述样本组织图像包括多个清洁度标签,该样本组织图像的真实清洁度根据该样本组织图像的多个所述清洁度标签确定,该样本组织图像的一致度根据该样本组织图像的多个所述清洁度标签中,与所述真实清洁度匹配的所述清洁度标签的数量确定;所述第一样本输出还包括对应的所述样本组织图像的一致度;The method according to claim 4, wherein each of the sample tissue images includes a plurality of cleanliness labels, the true cleanliness of the sample tissue image is determined according to the plurality of the cleanliness labels of the sample tissue image, the sample The consistency of the tissue image is determined according to the number of the cleanliness labels that match the real cleanliness among the multiple cleanliness labels of the sample tissue image; the first sample output also includes the corresponding Consistency of sample tissue images;
    所述清洁度损失根据所述清洁度子模型的输出、每个所述第一样本输入中包括的所述真实清洁度和所述一致度确定。The cleanliness loss is determined from the output of the cleanliness sub-model, the true cleanliness and the consistency included in each of the first sample inputs.
  6. 根据权利要求1所述的方法,其中,在所述根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式之前,所述方法还包括:The method according to claim 1, wherein, before determining the initial cleanliness and the target rounding method according to the tissue image and the pre-trained recognition model, the method further comprises:
    利用预先训练的分类模型对所述组织图像进行分类,以确定所述组织图像的目标类型;classifying the tissue image using a pre-trained classification model to determine the target type of the tissue image;
    所述根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,包括:The determining the initial cleanliness and target rounding method according to the tissue image and the pre-trained recognition model includes:
    若所述目标类型指示所述组织图像的质量满足预设条件,根据所述组织图像和所述识别模型,确定所述初始清洁度和所述目标取整方式。If the target type indicates that the quality of the tissue image satisfies a preset condition, determine the initial cleanliness and the target rounding method according to the tissue image and the identification model.
  7. 根据权利要求6所述的方法,其中,所述分类模型包括:编码器和分类层,所述利用预先训练的分类模型对所述组织图像进行分类,以确定所述组织图像的目标类型,包括:The method according to claim 6, wherein said classification model comprises: an encoder and a classification layer, said classifying said tissue image using a pre-trained classification model to determine the target type of said tissue image, comprising :
    对所述组织图像进行预处理,并将预处理后的所述组织图像划分为大小相等的多个子图像;Preprocessing the tissue image, and dividing the preprocessed tissue image into multiple sub-images of equal size;
    根据每个所述子图像对应的图像向量,和该子图像对应的位置向量,确定该子图像对应的令牌,所述位置向量用于指示该子图像在预处理后的所述组织图像中的位置;According to the image vector corresponding to each of the sub-images, and the position vector corresponding to the sub-image, determine the token corresponding to the sub-image, and the position vector is used to indicate that the sub-image is in the preprocessed tissue image s position;
    将每个所述子图像对应的令牌,和所述组织图像对应的令牌输入编码器,以得到每个子图像对应的局部编码向量,和所述组织图像对应的全局编码向量;Inputting the token corresponding to each sub-image and the token corresponding to the tissue image into an encoder to obtain a local coding vector corresponding to each sub-image and a global coding vector corresponding to the tissue image;
    将所述全局编码向量和多个所述局部编码向量输入分类层,以得到所述分类层输出的所述目标类型。Inputting the global encoding vector and the plurality of local encoding vectors into a classification layer to obtain the object type output by the classification layer.
  8. 根据权利要求7所述的方法,其中,所述分类模型是通过以下方式训练得到的:The method according to claim 7, wherein the classification model is obtained by training in the following manner:
    获取第二样本输入集和第二样本输出集,所述第二样本输入集包括:多个第二样本输入,每个所述第二样本输入包括样本组织图像,所述第二样本输出集中包括与每个所述第二样本输入对应的第二样本输出,每个所述第二样本输出包括对应的所述样本组织图像的真实类型;Obtain a second sample input set and a second sample output set, the second sample input set includes: a plurality of second sample inputs, each of the second sample inputs includes a sample tissue image, and the second sample output set includes a second sample output corresponding to each of the second sample inputs, each of the second sample outputs including the true type of the corresponding sample tissue image;
    将所述第二样本输入集作为所述分类模型的输入,将所述第二样本输出集作为所述分类模型的输出,以训练所述分类模型。The second sample input set is used as an input of the classification model, and the second sample output set is used as an output of the classification model, so as to train the classification model.
  9. 一种组织腔清洁度的确定装置,所述装置包括:A device for determining the cleanliness of a tissue cavity, the device comprising:
    获取模块,用于获取内窥镜采集的组织图像;An acquisition module, configured to acquire tissue images collected by the endoscope;
    识别模块,用于根据所述组织图像和预先训练的识别模型,确定初始清洁度和目标取整方式,所述初始清洁度为浮点型;A recognition module, configured to determine an initial cleanliness and a target rounding method according to the tissue image and a pre-trained recognition model, where the initial cleanliness is a floating-point type;
    取整模块,用于按照所述目标取整方式,对所述初始清洁度进行取整,以得到所述组织图像的清洁度,所述清洁度为整型。The rounding module is configured to round the initial cleanliness according to the target rounding manner to obtain the cleanliness of the tissue image, and the cleanliness is integer.
  10. 一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现权利要求1-8中任一项所述方法的步骤。A computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of the method according to any one of claims 1-8 are implemented.
  11. 一种电子设备,包括:An electronic device comprising:
    存储装置,其上存储有计算机程序;a storage device on which a computer program is stored;
    处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-8中任一项所述方法的步骤。A processing device configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1-8.
PCT/CN2022/114259 2021-09-03 2022-08-23 Method and apparatus for determining cleanliness of tissue cavity, and readable medium and electronic device WO2023030097A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111033610.8 2021-09-03
CN202111033610.8A CN113470030B (en) 2021-09-03 2021-09-03 Method and device for determining cleanliness of tissue cavity, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023030097A1 true WO2023030097A1 (en) 2023-03-09

Family

ID=77867368

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/114259 WO2023030097A1 (en) 2021-09-03 2022-08-23 Method and apparatus for determining cleanliness of tissue cavity, and readable medium and electronic device

Country Status (2)

Country Link
CN (1) CN113470030B (en)
WO (1) WO2023030097A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113470030B (en) * 2021-09-03 2021-11-23 北京字节跳动网络技术有限公司 Method and device for determining cleanliness of tissue cavity, readable medium and electronic equipment
CN113487609B (en) * 2021-09-06 2021-12-07 北京字节跳动网络技术有限公司 Tissue cavity positioning method and device, readable medium and electronic equipment
CN113658178B (en) * 2021-10-14 2022-01-25 北京字节跳动网络技术有限公司 Tissue image identification method and device, readable medium and electronic equipment
CN114332019B (en) * 2021-12-29 2023-07-04 小荷医疗器械(海南)有限公司 Endoscopic image detection assistance system, method, medium, and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295715A (en) * 2016-08-22 2017-01-04 电子科技大学 A kind of leucorrhea cleannes automatic classification method based on BP neural network classifier
US20180247107A1 (en) * 2015-09-30 2018-08-30 Siemens Healthcare Gmbh Method and system for classification of endoscopic images using deep decision networks
CN111127426A (en) * 2019-12-23 2020-05-08 山东大学齐鲁医院 Gastric mucosa cleanliness evaluation method and system based on deep learning
CN111932532A (en) * 2020-09-21 2020-11-13 安翰科技(武汉)股份有限公司 Method for evaluating capsule endoscope without reference image, electronic device, and medium
CN113012162A (en) * 2021-03-08 2021-06-22 重庆金山医疗器械有限公司 Method and device for detecting cleanliness of endoscopy examination area and related equipment
CN113470030A (en) * 2021-09-03 2021-10-01 北京字节跳动网络技术有限公司 Method and device for determining cleanliness of tissue cavity, readable medium and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110266914B (en) * 2019-07-23 2021-08-24 北京小米移动软件有限公司 Image shooting method, device and computer readable storage medium
CN112686162B (en) * 2020-12-31 2023-12-15 鄂尔多斯市空港大数据运营有限公司 Method, device, equipment and storage medium for detecting clean state of warehouse environment
CN113240042B (en) * 2021-06-01 2023-08-29 平安科技(深圳)有限公司 Image classification preprocessing, image classification method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180247107A1 (en) * 2015-09-30 2018-08-30 Siemens Healthcare Gmbh Method and system for classification of endoscopic images using deep decision networks
CN106295715A (en) * 2016-08-22 2017-01-04 电子科技大学 A kind of leucorrhea cleannes automatic classification method based on BP neural network classifier
CN111127426A (en) * 2019-12-23 2020-05-08 山东大学齐鲁医院 Gastric mucosa cleanliness evaluation method and system based on deep learning
CN111932532A (en) * 2020-09-21 2020-11-13 安翰科技(武汉)股份有限公司 Method for evaluating capsule endoscope without reference image, electronic device, and medium
CN113012162A (en) * 2021-03-08 2021-06-22 重庆金山医疗器械有限公司 Method and device for detecting cleanliness of endoscopy examination area and related equipment
CN113470030A (en) * 2021-09-03 2021-10-01 北京字节跳动网络技术有限公司 Method and device for determining cleanliness of tissue cavity, readable medium and electronic equipment

Also Published As

Publication number Publication date
CN113470030B (en) 2021-11-23
CN113470030A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
WO2023030097A1 (en) Method and apparatus for determining cleanliness of tissue cavity, and readable medium and electronic device
CN110909780B (en) Image recognition model training and image recognition method, device and system
WO2023030373A1 (en) Method and apparatus for positioning tissue cavity, and readable medium and electronic device
WO2023030370A1 (en) Endoscope image detection method and apparatus, storage medium, and electronic device
WO2023061080A1 (en) Method and apparatus for recognizing tissue image, readable medium, and electronic device
WO2023030298A1 (en) Polyp typing method, model training method and related apparatus
WO2023029741A1 (en) Tissue cavity locating method and apparatus for endoscope, medium and device
CN113496489A (en) Training method of endoscope image classification model, image classification method and device
WO2023030523A1 (en) Tissue cavity positioning method and apparatus for endoscope, medium and device
CN115082747B (en) Zero-sample gastric ulcer classification system based on block confrontation
CN113470029B (en) Training method and device, image processing method, electronic device and storage medium
CN113469295B (en) Training method for generating model, polyp recognition method, device, medium, and apparatus
WO2023125008A1 (en) Artificial intelligence-based endoscope image processing method and apparatus, medium and device
CN115115897B (en) Multi-modal pre-trained gastric tumor classification system
CN114399465A (en) Benign and malignant ulcer identification method and system
CN114782760A (en) Stomach disease picture classification system based on multitask learning
Venkatayogi et al. Classification of colorectal cancer polyps via transfer learning and vision-based tactile sensing
WO2023165332A1 (en) Tissue cavity positioning method, apparatus, readable medium, and electronic device
WO2023030426A1 (en) Polyp recognition method and apparatus, medium, and device
WO2023185497A1 (en) Tissue image recognition method and apparatus, and readable medium and electronic device
WO2023185516A1 (en) Method and apparatus for training image recognition model, and recognition method and apparatus, and medium and device
CN114937178A (en) Multi-modality-based image classification method and device, readable medium and electronic equipment
CN116434287A (en) Face image detection method and device, electronic equipment and storage medium
CN114266915A (en) Artificial intelligence-based nasointestinal tube ultrasonic identification and positioning method
Rifai et al. Analysis for diagnosis of pneumonia symptoms using chest X-ray based on MobileNetV2 models with image enhancement using white balance and contrast limited adaptive histogram equalization (CLAHE)

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22863236

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE