Cancer classification comparison learning method based on twin network

Through the cancer classification comparison learning method based on twin network, the problem of low accuracy in cancer classification prediction of pathological slice images with large color differences is solved, and high-quality feature extraction and accurate cancer classification prediction are achieved.

CN119863673APending Publication Date: 2025-04-22BEIJING THOROUGH FUTURE INC

Patent Information

Application Number
CN202411686350.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the prior art, when using pathological section images with large color differences for cancer classification prediction, it is difficult to extract key features of pathological section images, resulting in a decrease in prediction accuracy.

Method used

Using the cancer classification comparison learning method based on twin networks, multiple samples are acquired through acquisition devices and tested pathological slice images, cancer category judgment and labeling are performed, and training pairs are randomly paired to create similarity measurements between pathological slice images by twin networks, and feature vectors with characterization capabilities are generated to train cancer classification prediction models.

Benefits of technology

Effectively extracting feature vectors with characterization capabilities in pathological section images improves the training sample quality and classification prediction accuracy of cancer classification prediction model, and reduces the impact of pathological section image staining on classification prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863673A_ABST
    Figure CN119863673A_ABST
Patent Text Reader

Abstract

The invention discloses a cancer classification comparison learning method based on a twinborn network, and the method comprises the steps: obtaining a plurality of sample pathological section images and test pathological section images through collection equipment, carrying out the cancer type judgment of each sample pathological section image, carrying out the marking according to a judgment result, obtaining corresponding first marking data, and carrying out the classification comparison of the test pathological section images; the method comprises the following steps: respectively carrying out similar and heterogeneous random pairing on different sample pathological section images according to cancer categories to obtain a plurality of training pairs, creating a twin network, sequentially inputting each training pair into the twin network, and respectively learning similarity measurement between the pathological section images in different training pairs to obtain a trained twin network, and acquiring and using feature vectors with representation capability generated during twin network training and corresponding second annotation data to train a cancer classification prediction model, inputting all the test pathological section images into the cancer classification prediction model to obtain a plurality of classification prediction results, and visualizing the classification prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cancer classification comparative learning based on twin networks, and in particular to a cancer classification comparative learning method based on twin networks. Background Art

[0002] In the field of intelligent pathology, pathological images play a key role in medical diagnosis. In general, in order to make the cell structure more clearly identifiable, pathological sections must be stained before they can be collected and converted into pathological section images. Even if the same staining method is used for different pathological sections, due to the different types of cells in the pathological sections or slight differences in the staining time and concentration of the dye during the staining process, there will be significant color differences between different pathological sections.

[0003] This significant color difference poses a huge challenge to cancer classification. When using pathological section images with large color differences to train classification prediction models, the extracted training image feature vectors will not have representation capabilities, resulting in the trained model not having generalization capabilities. For example, the invention of application number 202211629416.0 discloses a pathological image classification method based on machine learning. When training a pre-trained convolutional neural network, it directly divides all training data into five parts, and selects four of them in turn as training data for training. However, it does not take into account that the staining differences in the training data will cause the problem of the representation ability strength of the extracted feature vectors, or when pathological section images with large color differences are input into the trained cancer classification prediction model, it will be difficult to extract the key pathological features of the pathological section images, resulting in a decrease in the prediction accuracy of pathological section images with large color differences. Summary of the invention

[0004] In response to the above-mentioned problems, the present invention provides a cancer classification comparative learning method based on a twin network to solve the problem of low prediction accuracy of the cancer classification model mentioned in the background technology for pathological section images with large differences in staining degrees.

[0005] A cancer classification comparative learning method based on a twin network comprises the following steps:

[0006] Acquire multiple sample pathological slice images and test pathological slice images through an acquisition device;

[0007] Determine the cancer category of each sample pathological slice image, and annotate it according to the determination result to obtain corresponding first annotated data, and randomly pair the different sample pathological slice images of the same type and different types according to the cancer category to obtain multiple training pairs;

[0008] Create a twin network, input each training pair into the twin network in turn, and obtain the trained twin network by learning the similarity metrics between pathological slice images in different training pairs respectively;

[0009] Acquire and use the feature vectors with representation capabilities generated during the training of the twin network and their corresponding second labeled data to train a cancer classification prediction model;

[0010] All test pathological section images are input into the cancer classification prediction model to obtain multiple classification prediction results and visualize them.

[0011] Preferably, acquiring a plurality of sample pathological slice images and test pathological slice images by an acquisition device includes:

[0012] Preparing a first number of pathological sections, and sequentially placing the first number of pathological sections on a collection device after staining;

[0013] Using an acquisition device to sequentially acquire images of a first number of pathological slices to obtain a first number of pathological slice images;

[0014] performing normalization processing on a first number of pathological slice images;

[0015] The normalized first number of pathological slice images are randomly divided into a second number of sample pathological slice images and a second number of test pathological slice images, wherein the first number is twice the second number.

[0016] Preferably, the cancer category of each sample pathological slice image is judged, and annotated according to the judgment result to obtain corresponding first annotated data, and different sample pathological slice images are randomly paired with the same type and different types according to the cancer category to obtain multiple training pairs, including:

[0017] Determine the category of cancer origin cells in each sample pathological slice image based on the cell morphology, structure, and tissue arrangement in the sample pathological slice image;

[0018] Annotate each sample pathological slice image at the image level according to the judgment result to obtain first annotation data of the sample pathological slice image;

[0019] According to the second number of first labeled data, using the first pairing function to randomly pair the first sample pathological slice images of the same cancer category to obtain a third number of first training pairs;

[0020] According to the second number of first labeled data, a second pairing function is used to randomly pair second sample pathological slice images of different cancer categories to obtain a fourth number of second training pairs.

[0021] Preferably, a twin network is created, each training pair is input into the twin network in sequence, and a trained twin network is obtained by respectively learning the similarity metrics between pathological slice images in different training pairs, including:

[0022] The preset first convolutional neural network is used as the first subnetwork of the first twin network, the first subnetwork is copied to obtain a second subnetwork that is exactly the same as the first subnetwork, and the first subnetwork and the second subnetwork are combined into the first twin network;

[0023] Obtain the fifth number of first neuron weights of the first twin network;

[0024] Repeat the following steps:

[0025] A target training pair is randomly selected from the third number of first training pairs and the fourth number of second training pairs and input into the first twin network, and the first and second sub-networks are used for calculation to obtain the first eigenvector and the second eigenvector;

[0026] Calculate the Euclidean distance between the first eigenvector and the second eigenvector;

[0027] Compare the Euclidean distance with the preset sample distance to obtain a first comparison result, and use a preset first loss function to calculate the first comparison result to obtain a first loss value;

[0028] Calculate the first gradient of each first neuron weight based on the first loss value using a back propagation algorithm according to the first loss value;

[0029] Based on each first gradient, the stochastic gradient descent algorithm is used to update the weight of the first neuron corresponding to it in the first twin network. This process is the similarity measure between the pathological slice images in the learning target training pair;

[0030] The first loss value is compared with the preset first loss threshold. When the first loss value is less than the preset first loss threshold, the repeated execution is stopped to obtain a trained target twin network.

[0031] Preferably, the step of acquiring and using the feature vector with characterization capability generated during the training of the twin network and its corresponding second annotation data to train the cancer classification prediction model includes:

[0032] Obtain multiple first eigenvectors and multiple second eigenvectors generated by the trained target twin network during repeated training;

[0033] Mapping each first eigenvector and each second eigenvector into a two-dimensional space using a preset dimensionality reduction technique, and obtaining a plurality of clustering regions in the two-dimensional space;

[0034] Respectively obtain a number of third eigenvectors contained in each clustering area, and regard each third eigenvector as a eigenvector with representation capability;

[0035] Obtaining a preset second convolutional neural network and a sixth number of second neuron weights thereof, and using the preset second convolutional neural network as an initial model of a cancer classification prediction model;

[0036] Repeat the following steps:

[0037] Randomly select a target feature vector from all third feature vectors and input it into a preset second convolutional neural network to obtain a first prediction output;

[0038] Using a preset second loss function to calculate the difference between the first prediction output and the second labeled data corresponding to the target feature vector, to obtain a third loss value;

[0039] According to the third loss value, a back propagation algorithm is used to calculate a second gradient of each second neuron weight based on the third loss value;

[0040] Based on each second gradient, using a stochastic gradient descent algorithm to update a second neuron weight corresponding to the second gradient in a preset second convolutional neural network;

[0041] The third loss value is compared with the preset second loss threshold. When the third loss value is less than the preset second loss threshold, the repeated execution is stopped to obtain a trained target classification prediction model.

[0042] Preferably, all test pathological slice images are input into the cancer classification prediction model to obtain multiple classification prediction results and visualize them, including:

[0043] inputting a second number of test pathological section images into the trained target cancer classification prediction model;

[0044] Using the trained target cancer classification prediction model to perform classification prediction on the second number of input test pathology slice images, to obtain a classification prediction result corresponding to each test pathology slice image;

[0045] Obtaining the probability of each cancer category predicted for each test pathology slice image according to the classification prediction result corresponding to the test pathology slice image;

[0046] For each test pathology section image, the predicted probability of each cancer category is converted into a pie chart form, and the pie chart is combined with the test pathology section image.

[0047] Preferably, the preset first convolutional neural network is used as the first subnetwork of the first twin network, the first subnetwork is copied to obtain a second subnetwork that is exactly the same as the first subnetwork, and the first subnetwork and the second subnetwork are combined into a first twin network, including:

[0048] Using the preset first convolutional neural network as the first sub-network of the first twin network, and obtaining the architecture of the first sub-network and the fifth number of neuron weights;

[0049] Create an empty network according to the architecture of the first subnetwork;

[0050] The fifth number of neuron weights of the first sub-network is copied to the empty network to obtain a second sub-network that is identical to the first sub-network;

[0051] The first sub-network and the second sub-network are connected at the same comparison layer to obtain the first twin network.

[0052] Preferably, for each test pathology slice image, the predicted probability of each cancer category is converted into a pie chart, and the pie chart is combined with the test pathology slice image, including:

[0053] Generate a corresponding first pie chart according to the predicted probability of each cancer category of each test pathological slice image, mark each sector in each first pie chart with a different color, and indicate the corresponding cancer category name with text;

[0054] Set the background of each first pie chart to a preset transparency;

[0055] Modifying each first pie chart to a preset size and superimposing it with the corresponding test pathology slice image and placing it at a preset position to obtain a target test pathology slice image;

[0056] The target test pathology slice image is used as a sample on the user display screen.

[0057] Preferably, the process of normalizing the first number of pathological slice images includes:

[0058] Separate each normalized pathological slice image into three channels of RGB, and obtain a separated image of each channel;

[0059] Applying multi-scale Gaussian filtering to a first channel of the three channels to obtain a first channel after first processing;

[0060] Processing the first channel using a bilateral filter to obtain the first channel after the second processing;

[0061] Converting the first channel after the first processing to the HIS space to obtain a first brightness channel, a first hue channel and a first saturation channel;

[0062] Converting the second processed first channel to the HIS space to obtain a second brightness channel, a second hue channel, and a second saturation channel;

[0063] Perform two-dimensional four-layer wavelet decomposition on the first brightness channel to obtain a first low-frequency component and a first high-frequency component;

[0064] Perform two-dimensional four-layer wavelet decomposition on the second brightness channel to obtain a second low-frequency component and a second high-frequency component;

[0065] The first low-frequency component, the second low-frequency component, the first high-frequency component and the second high-frequency component are fused according to the rule of taking the maximum modulus value of the low-frequency component and taking the weighted average of the high-frequency component to obtain a fused enhanced brightness channel;

[0066] Merging the enhanced brightness channel with the first hue channel, the first saturation channel, the second hue channel, and the second saturation channel to obtain a third processed first channel;

[0067] Using a median filter to remove noise from the second channel using a preset window area to obtain a first processed second channel;

[0068] Performing edge enhancement processing on the first processed second channel using Sobel edge detection to obtain a second processed second channel;

[0069] The third channel is smoothed using a mean filter to obtain the first processed third channel;

[0070] Performing image enhancement processing on the third channel of the first processing using the Laplacian operator to obtain the third channel of the second processing;

[0071] Create an empty image in RGB format with the same size as the first separated image;

[0072] Sequentially acquiring and limiting the values ​​of the first separated image of the first channel after the third processing, the values ​​of the second separated image of the second channel after the second processing, and the values ​​of the third separated image of the third channel after the second processing within a preset range;

[0073] Distribute the value of the first separated image of the first channel after the third processing to the empty image with a first weight to obtain a first distributed image;

[0074] Distribute the value of the second separated image of the second channel of the second processing to the first distributed image with a second weight to obtain a second distributed image;

[0075] Distribute the value of the third channel of the second processing to the second distribution image with a third weight to obtain a third distribution image;

[0076] compressing the third allocated image into a preset format by using preset compression software to obtain a compressed image;

[0077] The compressed image is used as a sample for dividing a sample pathological image and a test pathological image.

[0078] Preferably, the process of displaying the target test pathological slice image on the user display screen includes:

[0079] A monitoring program is set to receive user instructions in real time. If the user instruction is to directly display the complete pathological slice image, the format of the target test image is converted into a bmp format to obtain a first processed image;

[0080] Divide the first processed image into a plurality of second pixel regions with a preset second area, and extract the second pixel point at the first position, the third pixel point at the second position, and so on in each second pixel region;

[0081] combining a second pixel point, a third pixel point, etc. at the same position into a plurality of first sub-images;

[0082] Convert the color mode of each first sub-image from RSG format to YUV format;

[0083] Input each first sub-image into a preset conversion software in sequence to generate a first video sequence in a YUV format;

[0084] Compressing the first video sequence in the YUV format using the HEVC encoding format to obtain a compressed second video sequence;

[0085] Decoding the second video sequence to obtain a decoded third video sequence;

[0086] Extracting each frame of the third video sequence, converting the color mode of each frame of the image from the YUV format to the RGB format, and saving the image to obtain a plurality of second sub-images;

[0087] Recombining each second sub-image into a second processed image according to the segmentation order of the corresponding first sub-image;

[0088] The second processed image is used as the sample presented at this time;

[0089] If the user instruction is to display a tile image of a pathological slice image, each target test image is cut without intervals at a preset third area to obtain a plurality of third processed images;

[0090] Inputting each third processed image into the trained target cancer prediction classification model to obtain a second classification prediction result corresponding to each third processed image;

[0091] Generate a predicted probability of each cancer for the corresponding third processed image according to each second classification prediction result, convert it into a second pie chart, and place the second pie chart at a preset position corresponding to the third processed image to obtain a fourth processed image;

[0092] The fourth processed image is used as a sample for display at this time.

[0093] Through the above technical solution, the present invention can achieve the following beneficial effects:

[0094] By using the twin network for comparative learning, the similarities and differences between sample pathological section images are learned, so that the twin network can effectively extract feature vectors with representation capabilities in the pathological section images, thereby improving the quality of training samples for subsequent training of cancer classification prediction models and improving the classification prediction accuracy of cancer classification prediction models.

[0095] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0096] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0097] Figure 1 A workflow diagram of a cancer classification comparative learning method based on a twin network provided by the present invention;

[0098] Figure 2 Another workflow diagram of a cancer classification comparative learning method based on a twin network provided by the present invention;

[0099] Figure 3 Another workflow diagram of the cancer classification comparative learning method based on twin networks provided by the present invention. DETAILED DESCRIPTION

[0100] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0101] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0102] In the field of intelligent pathology, pathological images play a key role in medical diagnosis. In general, in order to make the cell structure more clearly identifiable, pathological sections must be stained before they can be collected and converted into pathological section images. Even if the same staining method is used for different pathological sections, due to the different types of cells in the pathological sections or slight differences in the staining time and concentration of the dye during the staining process, there will be significant color differences between different pathological sections.

[0103] This significant color difference poses a huge challenge to cancer classification. When using pathological slice images with large color differences for classification prediction model training, the extracted training image feature vectors do not have representation capabilities, resulting in the trained model not having generalization capabilities. For example, the invention of application number 202211629416.0 discloses a pathological image classification method based on machine learning. When training a pre-trained convolutional neural network, it directly divides all training data into five parts, and selects four of them in turn as training data for training, but does not take into account that the staining differences in the training data will cause the strength of the representation ability of the extracted feature vectors, or when pathological slice images with large color differences are input into the trained cancer classification prediction model, it will be difficult to extract the key pathological features of the pathological slice images, resulting in a decrease in the prediction accuracy of pathological slice images with large color differences. In order to solve the above problems, the present embodiment discloses a cancer classification comparative learning method based on a twin network.

[0104] Example 1

[0105] This embodiment provides a cancer classification comparative learning method based on a twin network. Figure 1 As shown, including:

[0106] Step S10, acquiring a plurality of sample pathological slice images and a test pathological slice image by an acquisition device;

[0107] Step S20, judging the cancer category of each sample pathological slice image, and annotating them according to the judgment result to obtain corresponding first annotated data, and randomly pairing the different sample pathological slice images of the same type and different types according to the cancer category to obtain multiple training pairs;

[0108] Step S30, creating a twin network, inputting each training pair into the twin network in sequence, and obtaining a trained twin network by learning the similarity metrics between pathological slice images in different training pairs respectively;

[0109] Step S40, acquiring and using the feature vector with characterization capability generated during the twin network training and its corresponding second annotation data to train a cancer classification prediction model;

[0110] Step S50: input all the test pathological slice images into the cancer classification prediction model to obtain multiple classification prediction results and visualize them.

[0111] In this embodiment, the acquisition device refers to a microscope, which is selected here as a high-magnification optical microscope equipped with a photographing device and software;

[0112] In this embodiment, cancer category determination refers to determining the category of cancer origin cells in the pathological slice image based on the morphology, structure, and tissue arrangement of the cells in the pathological slice image;

[0113] In this embodiment, the same-type and different-type pairing refers to first pairing the same-type pathology slice images and then pairing the different-type pathology slice images according to the different cancer categories annotated in the pathology slice images, and the random pairing refers to pairing using a preset function;

[0114] In this embodiment, the training pair refers to a set of two pathological slice images obtained by pairing the same type or different types;

[0115] In this embodiment, similarity measurement is a method used in machine learning to quantify the similarity between two objects;

[0116] In this embodiment, the sample pathological slice image refers to the pathological slice image used for training the model;

[0117] In this embodiment, the test pathological section image refers to a pathological section image used to be input into a trained cancer classification model for cancer classification;

[0118] In this embodiment, the first annotation data is a cancer category determination result associated with each sample pathological slice image;

[0119] In this embodiment, the types of cancer include, but are not limited to, melanoma, adenocarcinoma, and renal cell carcinoma;

[0120] In this embodiment, the twin network is a special neural network architecture that has two identical sub-networks and shares weights;

[0121] In this embodiment, the representation capability refers to whether the important characteristics of the data can be captured;

[0122] In this embodiment, a feature vector refers to a set of data containing important data characteristics in an image;

[0123] In this embodiment, the cancer classification prediction model refers to a big data model based on deep learning;

[0124] In this embodiment, the classification prediction result refers to the probabilities of various cancers predicted for the pathological slice image.

[0125] The working principle of the above technical solution is: obtain multiple sample pathological slice images and test pathological slice images through the acquisition equipment; judge the cancer category of each sample pathological slice image, and annotate it according to the judgment result to obtain the corresponding first annotation data, and randomly pair different sample pathological slice images of the same type and different types according to the cancer category to obtain multiple training pairs; create a twin network, input each training pair into the twin network in turn, and obtain the trained twin network by learning the similarity measurement between the pathological slice images in different training pairs respectively; obtain and use the feature vector with representation capability generated during the twin network training and its corresponding second annotation data to train the cancer classification prediction model; input all test pathological slice images into the cancer classification prediction model to obtain multiple classification prediction results and visualize them.

[0126] The beneficial effects of the above technical solution are: using the twin network to learn the similarity measurement between pathological section images, and using the feature vectors with representation capabilities generated during training to train the cancer classification prediction model, can effectively improve the accuracy of the cancer classification prediction model in classifying and predicting pathological section images with large staining differences, and reduce the impact of pathological section image staining on classification prediction. In addition, using the cancer classification prediction model to classify and predict and visualize the test pathological section images can enable medical personnel to perform pathological analysis and diagnosis more intuitively and conveniently, improve the efficiency of medical diagnosis, and provide strong support for the early detection and treatment of cancer.

[0127] Example 2

[0128] like Figure 2 As shown, a plurality of sample pathological slice images and test pathological slice images are acquired by an acquisition device, including:

[0129] Step S101, preparing a first number of pathological sections, and placing the first number of pathological sections in a collection device in sequence after staining;

[0130] Step S102: using an acquisition device to sequentially acquire images of a first number of pathological slices to obtain a first number of pathological slice images;

[0131] Step S103, performing normalization processing on a first number of pathological slice images;

[0132] Step S104: randomly divide the normalized first number of pathological slice images into a second number of sample pathological slice images and a second number of test pathological slice images, wherein the first number is twice the second number.

[0133] In this embodiment, the larger the first number is, the better the training effect is, and it is set to 10000 here;

[0134] In this embodiment, staining refers to immersing the pathological section in a special staining solution, where the staining solution is selected as eosin and hematoxylin;

[0135] In this embodiment, the acquisition device is a microscope, which is selected as a high-magnification optical microscope equipped with a photographing device and software;

[0136] In this embodiment, image acquisition means that after the pathological slice is placed on the acquisition device, the acquisition device magnifies the pathological slice to a desired size through a high-magnification optical microscope, and further calls the shooting device and software to shoot and save the pathological slice image at this time;

[0137] In this embodiment, the second number is set to 5000;

[0138] In this embodiment, the normalization processing refers to limiting the pixels of the pathological slice image to [0, 1] after processing. The processing method is that if the original pixel value of the pathological slice image is in [0, 255], each original pixel value of the pathological slice image is divided by 255.

[0139] The beneficial effects of the above technical solution are: by preparing a sufficient number of pathological section samples, the number of pathological section images collected subsequently can be sufficient, thereby providing a solid foundation for model training; staining the pathological sections can enhance the key features in the pathological sections; normalizing all collected pathological section images can improve the accuracy of image processing and analysis; dividing the pathological section images into sample pathological section images and test pathological section images can avoid classification anomalies during testing.

[0140] Example 3

[0141] like Figure 3 As shown, the cancer category of each sample pathological slice image is judged, and annotated according to the judgment result to obtain the corresponding first annotated data. Different sample pathological slice images are randomly paired with the same type and different types according to the cancer category to obtain multiple training pairs, including:

[0142] Step S201, judging the type of cancer origin cells of each sample pathological slice image according to the cell morphology, structure and tissue arrangement in the sample pathological slice image;

[0143] Step S202: annotate each sample pathology slice image at the image level according to the judgment result to obtain first annotation data of the sample pathology slice image;

[0144] Step S203: randomly pair first sample pathological slice images of the same cancer category using a first pairing function according to a second number of first labeled data to obtain a third number of first training pairs;

[0145] Step S204: According to the second number of first labeled data, use a second pairing function to randomly pair the second sample pathological slice images of different cancer categories to obtain a fourth number of second training pairs.

[0146] In this embodiment, cell morphology refers to the shape of the cell including round, oval, and rod;

[0147] In this embodiment, the cell structure refers to the structure inside the cell, including but not limited to the nucleus, mitochondria, endoplasmic reticulum, etc.;

[0148] In this embodiment, the cell tissue arrangement refers to whether the cells are arranged neatly;

[0149] In this embodiment, image-level annotation refers to a common weakly supervised semantic segmentation, which only annotates the category to which the image belongs. Here, the annotation format is (sample pathology slice image number, the sample pathology slice image address, and the category of the annotated cancer origin cell of the sample pathology slice image);

[0150] In this embodiment, the pairing function refers to a computer function that can perform tasks according to the functions set by the user;

[0151] In this embodiment, the first pairing function refers to a computer function that matches sample pathology slice images of the same category according to the category of the annotated cancer origin cell of each sample pathology slice image in the annotated data;

[0152] In this embodiment, the second pairing function refers to a computer function that matches sample pathology slice images of different categories according to the category of the labeled cancer origin cell of each sample pathology slice image in the labeled data.

[0153] The beneficial effects of the above technical solution are as follows: by judging the cancer category based on the cell morphology, structure, and tissue arrangement in the sample pathological section image, the accuracy of the cancer category judgment can be effectively improved; by using image-level annotation of the cancer category of the picture, the annotation task can be completed conveniently and quickly; by using the preset pairing function to pair the sample pathological section images with the same or different categories, the randomness of the pairing is effectively improved, and the quality of the training samples is improved.

[0154] Example 4

[0155] Create a twin network, input each training pair into the twin network in turn, and obtain the trained twin network by learning the similarity metrics between pathological slice images in different training pairs, including:

[0156] The preset first convolutional neural network is used as the first subnetwork of the first twin network, the first subnetwork is copied to obtain a second subnetwork that is exactly the same as the first subnetwork, and the first subnetwork and the second subnetwork are combined into the first twin network;

[0157] Obtain the fifth number of first neuron weights of the first twin network;

[0158] Repeat the following steps:

[0159] A target training pair is randomly selected from the third number of first training pairs and the fourth number of second training pairs and input into the first twin network, and the first and second sub-networks are used for calculation to obtain the first eigenvector and the second eigenvector;

[0160] Calculate the Euclidean distance between the first eigenvector and the second eigenvector;

[0161] Compare the Euclidean distance with the preset sample distance to obtain a first comparison result, and use a preset first loss function to calculate the first comparison result to obtain a first loss value;

[0162] Calculate the first gradient of each first neuron weight based on the first loss value using a back propagation algorithm according to the first loss value;

[0163] Based on each first gradient, the stochastic gradient descent algorithm is used to update the weight of the first neuron corresponding to it in the first twin network. This process is the similarity measure between the pathological slice images in the learning target training pair;

[0164] The first loss value is compared with the preset first loss threshold. When the first loss value is less than the preset first loss threshold, the repeated execution is stopped to obtain a trained target twin network.

[0165] In this embodiment, the preset first convolutional neural network can be designed as three convolutional layers, three maximum pooling layers, one flattening layer, and two fully connected layers;

[0166] In this embodiment, the back propagation algorithm refers to a method used to adjust the weights of neurons in a neural network, which is based on the gradient descent method;

[0167] In this embodiment, the fifth number can be set to 128;

[0168] In this embodiment, the reason for repeatedly executing the steps is that the twin network needs to be optimized and trained multiple times according to the loss value in order to find the neuron weights that can minimize the loss value, so that a feature vector with representation ability can be extracted from the image;

[0169] In this embodiment, Euclidean distance refers to a method of calculating the straight-line distance between two points;

[0170] In this embodiment, the stochastic gradient descent algorithm is an algorithm commonly used in machine learning, which finds the optimal solution by gradually adjusting the weights in the neural network to move in the direction of reducing the loss value;

[0171] In this embodiment, gradient refers to a vector, a vector, indicating that the directional derivative of a function at that point changes the most along that direction;

[0172] In this embodiment, the first loss threshold may be set to 0.01;

[0173] In this embodiment, the first loss function is preset to be contrastive loss.

[0174] The beneficial effects of the above technical solution are: by presetting the first convolutional neural network to construct the first twin network, and then using the backpropagation algorithm and the stochastic gradient descent algorithm to update the first twin network according to the first loss value, the first neuron weight can be effectively updated, and the training speed is accelerated. By calculating the Euclidean distance between the first and second eigenvectors, and then comparing the Euclidean distance with the preset distance and using the preset first loss function to calculate the loss value, the system can effectively learn the similarity measure between sample pathological section images, which helps to improve the classification effect of the model. When the first loss value is less than the first loss threshold, the training is terminated to avoid overtraining.

[0175] Example 5

[0176] Acquiring and using the feature vectors with representation capabilities generated during the training of the twin network and their corresponding second labeled data to train a cancer classification prediction model, including:

[0177] Obtain multiple first eigenvectors and multiple second eigenvectors generated by the trained target twin network during repeated training;

[0178] Mapping each first eigenvector and each second eigenvector into a two-dimensional space using a preset dimensionality reduction technique, and obtaining a plurality of clustering regions in the two-dimensional space;

[0179] Respectively obtain a number of third eigenvectors contained in each clustering area, and regard each third eigenvector as a eigenvector with representation capability;

[0180] Obtaining a preset second convolutional neural network and a sixth number of second neuron weights thereof, and using the preset second convolutional neural network as an initial model of a cancer classification prediction model;

[0181] Repeat the following steps:

[0182] Randomly select a target feature vector from all third feature vectors and input it into a preset second convolutional neural network to obtain a first prediction output;

[0183] Using a preset second loss function to calculate the difference between the first prediction output and the second labeled data corresponding to the target feature vector, to obtain a third loss value;

[0184] According to the third loss value, a back propagation algorithm is used to calculate a second gradient of each second neuron weight based on the third loss value;

[0185] Based on each second gradient, using a stochastic gradient descent algorithm to update a second neuron weight corresponding to the second gradient in a preset second convolutional neural network;

[0186] The third loss value is compared with the preset second loss threshold. When the third loss value is less than the preset second loss threshold, the repeated execution is stopped to obtain a trained target classification prediction model.

[0187] In this embodiment, the preset dimensionality reduction technique is a method of reducing a high-dimensional feature vector to a two-dimensional space, and principal component analysis (PCA) is used here;

[0188] In this embodiment, the clustering region refers to a region where a type of feature vectors are clustered. Feature vectors in the clustering region are considered to have representation capabilities, while feature vectors outside the clustering region are considered to have no representation capabilities.

[0189] In this embodiment, the characterization capability refers to the ability to effectively represent a type of cancer;

[0190] In this embodiment, the sixth number can be set to 256;

[0191] In this embodiment, the preset second convolution can be designed as four convolution layers, three maximum pooling layers, a flattening layer, and two fully connected layers;

[0192] In this embodiment, the preset second loss function adopts a multi-classification cross entropy loss function.

[0193] The beneficial effects of the above technical solution are: by using multiple feature vectors obtained before the completion of the first twin network training and visualizing them through dimensionality reduction technology, it is easier to distinguish feature vectors with characterization capabilities, thereby improving the resolution efficiency. When the second loss value is less than the second loss threshold, a trained target classification prediction model is obtained, which can effectively avoid over-training.

[0194] Example 6

[0195] All test pathology slide images were input into the cancer classification prediction model to obtain multiple classification prediction results and visualize them, including:

[0196] inputting a second number of test pathological section images into the trained target cancer classification prediction model;

[0197] Using the trained target cancer classification prediction model to perform classification prediction on the second number of input test pathology slice images, to obtain a classification prediction result corresponding to each test pathology slice image;

[0198] Obtaining the probability of each cancer category predicted for each test pathology slice image according to the classification prediction result corresponding to the test pathology slice image;

[0199] For each test pathology section image, the predicted probability of each cancer category is converted into a pie chart form, and the pie chart is combined with the test pathology section image.

[0200] In this embodiment, cancer categories include but are not limited to breast cancer, lung cancer, colon cancer, and prostate cancer;

[0201] In this embodiment, the classification prediction result includes each test pathology slice image and the probability of each cancer category predicted therefor;

[0202] In this embodiment, the probability of each cancer category in the pie chart only displays the three cancers with the highest probability, and the remaining cancers are combined into other items for display.

[0203] The beneficial effects of the above technical solution are: by inputting the test pathological slice image into the trained target classification cancer classification prediction model, the corresponding classification prediction result is obtained, and artificial intelligence is used to classify and predict the pathological slice image, thereby improving the efficiency of classification prediction. For each test pathological slice image, the probability of each cancer category predicted is converted into a pie chart, and the pie chart is combined with the test pathological slice image, which allows doctors to more conveniently see the possibility of each cancer, thereby improving diagnostic efficiency.

[0204] Example 7

[0205] The preset first convolutional neural network is used as the first sub-network of the first twin network, the first sub-network is copied to obtain a second sub-network that is exactly the same as the first sub-network, and the first sub-network and the second sub-network are combined into a first twin network, including:

[0206] Using the preset first convolutional neural network as the first sub-network of the first twin network, and obtaining the architecture of the first sub-network and the fifth number of neuron weights;

[0207] Create an empty network according to the architecture of the first subnetwork;

[0208] The fifth number of neuron weights of the first sub-network is copied to the empty network to obtain a second sub-network that is identical to the first sub-network;

[0209] The first sub-network and the second sub-network are connected at the same comparison layer to obtain the first twin network.

[0210] In this embodiment, the empty network refers to a newly created neural network, but has not yet been assigned any specific weight values;

[0211] In this embodiment, the neuron weights include but are not limited to convolutional layer weights and fully connected layer weights;

[0212] In this embodiment, the architecture of the first sub-network can be set as follows: the following “-” indicates the connection between the architectures, convolution layer 1-pooling layer 1-convolution layer 2-pooling layer 2-convolution layer 3-pooling layer 3-flattening layer-fully connected layer-output layer;

[0213] In this embodiment, the comparison layer is to calculate the similarity between two feature vectors obtained according to the twin network sub-network and the input training pair, and the Euclidean distance is selected here.

[0214] The beneficial effect of the above technical solution is: by using the preset first convolutional neural network as the first subnetwork of the first twin network, and copying the first subnetwork from the architecture to the neuron weights to obtain a second subnetwork that is exactly the same as the first subnetwork, in this way, a subnetwork with exactly the same structure can be created while keeping the neuron weights consistent, and the creation efficiency is improved. The two subnetworks are connected to the same comparison layer to obtain the first twin network, thereby enhancing the generalization ability of the model.

[0215] Example 8

[0216] For each test pathology slice image, the predicted probability of each cancer category is converted into a pie chart, and the pie chart is combined with the test pathology slice image, including:

[0217] Generate a corresponding first pie chart according to the predicted probability of each cancer category of each test pathological slice image, mark each sector in each first pie chart with a different color, and indicate the corresponding cancer category name with text;

[0218] Set the background of each first pie chart to a preset transparency;

[0219] Modifying each first pie chart to a preset size and superimposing it with the corresponding test pathology slice image and placing it at a preset position to obtain a target test pathology slice image;

[0220] The target test pathology slice image is used as a sample on the user display screen.

[0221] In this embodiment, a pie chart refers to a circular statistical chart;

[0222] In this embodiment, the different colors need to be different from the background color of each sector and the text color of the sector;

[0223] In this embodiment, the preset transparency can be set to 60%;

[0224] In this embodiment, the preset position here can be set at the upper right corner of the sample pathological slice image;

[0225] In this embodiment, only the five cancer categories with the highest classification prediction probabilities are displayed in the pie chart, and all remaining categories are combined into other items for display.

[0226] The beneficial effect of the above technical solution is: by generating a predicted cancer category prediction pie chart for each test pathology slice image, setting it to a transparent background and modifying it to a preset size, and then superimposing it with the corresponding test pathology slice image, the doctor can intuitively see the predicted probability of each cancer when viewing the test pathology slice image, and reduce the probability of the tile image obscuring the pathological features of the test pathology slice, thereby improving the doctor's analysis efficiency.

[0227] Example 9

[0228] The process of normalizing the first number of pathological slice images includes:

[0229] Separate each normalized pathological slice image into three channels of RGB, and obtain a separated image of each channel;

[0230] Applying multi-scale Gaussian filtering to a first channel of the three channels to obtain a first channel after first processing;

[0231] Processing the first channel using a bilateral filter to obtain the first channel after the second processing;

[0232] Converting the first channel after the first processing to the HIS space to obtain a first brightness channel, a first hue channel and a first saturation channel;

[0233] Converting the second processed first channel to the HIS space to obtain a second brightness channel, a second hue channel, and a second saturation channel;

[0234] Perform two-dimensional four-layer wavelet decomposition on the first brightness channel to obtain a first low-frequency component and a first high-frequency component;

[0235] Perform two-dimensional four-layer wavelet decomposition on the second brightness channel to obtain a second low-frequency component and a second high-frequency component;

[0236] The first low-frequency component, the second low-frequency component, the first high-frequency component and the second high-frequency component are fused according to the rule of taking the maximum modulus value of the low-frequency component and taking the weighted average of the high-frequency component to obtain a fused enhanced brightness channel;

[0237] Merging the enhanced brightness channel with the first hue channel, the first saturation channel, the second hue channel, and the second saturation channel to obtain a third processed first channel;

[0238] Using a median filter to remove noise from the second channel using a preset window area to obtain a first processed second channel;

[0239] Performing edge enhancement processing on the first processed second channel using Sobel edge detection to obtain a second processed second channel;

[0240] The third channel is smoothed using a mean filter to obtain the first processed third channel;

[0241] Performing image enhancement processing on the third channel of the first processing using the Laplacian operator to obtain the third channel of the second processing;

[0242] Create an empty image in RGB format with the same size as the first separated image;

[0243] Sequentially acquiring and limiting the values ​​of the first separated image of the first channel after the third processing, the values ​​of the second separated image of the second channel after the second processing, and the values ​​of the third separated image of the third channel after the second processing within a preset range;

[0244] Distribute the value of the first separated image of the first channel after the third processing to the empty image with a first weight to obtain a first distributed image;

[0245] Distribute the value of the second separated image of the second channel of the second processing to the first distributed image with a second weight to obtain a second distributed image;

[0246] Distribute the value of the third channel of the second processing to the second distribution image with a third weight to obtain a third distribution image;

[0247] compressing the third allocated image into a preset format by using preset compression software to obtain a compressed image;

[0248] The compressed image is used as a sample for dividing a sample pathological image and a test pathological image.

[0249] In this embodiment, the multi-scale Gaussian filtering process refers to processing the image using Gaussian kernels of different scales;

[0250] In this embodiment, the bilateral filter refers to a filter that preserves edges but smoothes the interior of an image;

[0251] In this embodiment, the four-layer wavelet decomposition refers to decomposing the image into four levels of low-frequency and high-frequency components through wavelet transform, which is used to extract multi-scale features of the image;

[0252] In this embodiment, the low-frequency component refers to the portion of the image that represents the approximate outline and has the overall structural information of the image;

[0253] In this embodiment, the high frequency component refers to the part of the image that represents details, such as edges and textures;

[0254] In this embodiment, the HIS space refers to a color space, which is composed of a hue channel, a brightness channel, and a saturation channel;

[0255] In this embodiment, Sobel edge detection is an image edge detection algorithm that can effectively identify edges and lines in an image;

[0256] In this embodiment, the Laplacian operator refers to a mathematical operator used for image processing, which is used to calculate the second-order derivative of an image;

[0257] In this embodiment, the first weight is set to 0.4;

[0258] In this embodiment, the second weight is set to 0.3;

[0259] In this embodiment, the third weight is set to 0.3;

[0260] In this embodiment, the preset compression software is image compression software;

[0261] In this embodiment, the preset format is set to jpeg;

[0262] In this embodiment, the preset range is (0, 255);

[0263] In this embodiment, the empty image in RGB format refers to a blank image that contains three channels of RGB.

[0264] The beneficial effects of the above technical solution are: by different processing of the three RGB channels of each pathological slice image, its brightness, edge and smoothness are effectively enhanced, the subtle structure and texture characteristics of the pathological slice image can be better highlighted, the image recognizability and resolution are improved, and the training accuracy problem of the twin network and cancer classification prediction model caused by insufficient image processing is solved.

[0265] Example 10

[0266] The process of displaying the target test pathological slice image on the user display screen includes:

[0267] A monitoring program is set to receive user instructions in real time. If the user instruction is to directly display the complete pathological slice image, the format of the target test image is converted into a bmp format to obtain a first processed image;

[0268] Divide the first processed image into a plurality of second pixel regions with a preset second area, and extract the second pixel point at the first position, the third pixel point at the second position, and so on in each second pixel region;

[0269] combining a second pixel point, a third pixel point, etc. at the same position into a plurality of first sub-images;

[0270] Convert the color mode of each first sub-image from RSG format to YUV format;

[0271] Input each first sub-image into a preset conversion software in sequence to generate a first video sequence in a YUV format;

[0272] Compressing the first video sequence in the YUV format using the HEVC encoding format to obtain a compressed second video sequence;

[0273] Decoding the second video sequence to obtain a decoded third video sequence;

[0274] Extracting each frame of the third video sequence, converting the color mode of each frame of the image from the YUV format to the RGB format, and saving the image to obtain a plurality of second sub-images;

[0275] Recombining each second sub-image into a second processed image according to the segmentation order of the corresponding first sub-image;

[0276] The second processed image is used as the sample presented at this time;

[0277] If the user instruction is to display a tile image of a pathological slice image, each target test image is cut without intervals at a preset third area to obtain a plurality of third processed images;

[0278] Inputting each third processed image into the trained target cancer prediction classification model to obtain a second classification prediction result corresponding to each third processed image;

[0279] Generate a predicted probability of each cancer for the corresponding third processed image according to each second classification prediction result, convert it into a second pie chart, and place the second pie chart at a preset position corresponding to the third processed image to obtain a fourth processed image;

[0280] The fourth processed image is used as a sample for display at this time.

[0281] In this embodiment, the bmp format is a bitmap format;

[0282] In this embodiment, the preset second area can be set to 1 / 64 of the original image;

[0283] In this embodiment, the RGB format is three channels of red, green and blue;

[0284] In this embodiment, the YUV format is a color space format commonly used in video encoding;

[0285] In this embodiment, the preset conversion software is a conversion software that converts images into videos;

[0286] In this embodiment, HEVC encoding is also known as h.265, which is an advanced video compression standard;

[0287] In this embodiment, decoding refers to the process of converting the encoded data back to its original format;

[0288] In this embodiment, the segmentation order is a specific order when segmenting the image;

[0289] In this embodiment, the purpose of the non-interval cutting is to avoid missing the information of any area;

[0290] In this embodiment, the tile image refers to a plurality of small images divided into a large image.

[0291] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0292] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A cancer classification comparative learning method based on twin networks, characterized in that: include: Acquire multiple sample pathological slice images and test pathological slice images through an acquisition device; Determine the cancer category of each sample pathological slice image, and annotate it according to the determination result to obtain corresponding first annotated data, and randomly pair the different sample pathological slice images of the same type and different types according to the cancer category to obtain multiple training pairs; Create a twin network, input each training pair into the twin network in turn, and obtain the trained twin network by learning the similarity metrics between pathological slice images in different training pairs respectively; Acquire and use the feature vectors with representation capabilities generated during the training of the twin network and their corresponding second labeled data to train a cancer classification prediction model; All test pathological section images are input into the cancer classification prediction model to obtain multiple classification prediction results and visualize them.

2. The cancer classification comparative learning method based on a twin network according to claim 1, characterized in that: The method of acquiring a plurality of sample pathological slice images and a test pathological slice image by using an acquisition device includes: Preparing a first number of pathological sections, and sequentially placing the first number of pathological sections on a collection device after staining; Using an acquisition device to sequentially acquire images of a first number of pathological slices to obtain a first number of pathological slice images; performing normalization processing on a first number of pathological slice images; The normalized first number of pathological slice images are randomly divided into a second number of sample pathological slice images and a second number of test pathological slice images, wherein the first number is twice the second number.

3. The cancer classification comparative learning method based on twin network according to claim 1, characterized in that: The cancer category of each sample pathological slice image is judged, and annotated according to the judgment result to obtain corresponding first annotated data, and different sample pathological slice images are randomly paired with the same type and different types according to the cancer category to obtain multiple training pairs, including: Determine the category of cancer origin cells in each sample pathological slice image based on the cell morphology, structure, and tissue arrangement in the sample pathological slice image; Annotate each sample pathological slice image at the image level according to the judgment result to obtain first annotation data of the sample pathological slice image; According to the second number of first labeled data, using the first pairing function to randomly pair the first sample pathological slice images of the same cancer category to obtain a third number of first training pairs; According to the second number of first labeled data, a second pairing function is used to randomly pair second sample pathological slice images of different cancer categories to obtain a fourth number of second training pairs.

4. The cancer classification comparative learning method based on twin network according to claim 3, characterized in that: Create a twin network, input each training pair into the twin network in turn, and obtain the trained twin network by learning the similarity metrics between pathological slice images in different training pairs, including: The preset first convolutional neural network is used as the first subnetwork of the first twin network, the first subnetwork is copied to obtain a second subnetwork that is exactly the same as the first subnetwork, and the first subnetwork and the second subnetwork are combined into the first twin network; Obtain the fifth number of first neuron weights of the first twin network; Repeat the following steps: A target training pair is randomly selected from the third number of first training pairs and the fourth number of second training pairs and input into the first twin network, and the first and second sub-networks are used for calculation to obtain the first eigenvector and the second eigenvector; Calculate the Euclidean distance between the first eigenvector and the second eigenvector; Compare the Euclidean distance with the preset sample distance to obtain a first comparison result, and use a preset first loss function to calculate the first comparison result to obtain a first loss value; Calculate the first gradient of each first neuron weight based on the first loss value using a back propagation algorithm according to the first loss value; Based on each first gradient, the stochastic gradient descent algorithm is used to update the weight of the first neuron corresponding to it in the first twin network. This process is the similarity measure between the pathological slice images in the learning target training pair; The first loss value is compared with the preset first loss threshold. When the first loss value is less than the preset first loss threshold, the repeated execution is stopped to obtain a trained target twin network.

5. The cancer classification comparative learning method based on twin networks according to claim 4, characterized in that: Acquiring and using the feature vectors with representation capabilities generated during the training of the twin network and their corresponding second labeled data to train a cancer classification prediction model, including: Obtain multiple first eigenvectors and multiple second eigenvectors generated by the trained target twin network during repeated training; Mapping each first eigenvector and each second eigenvector into a two-dimensional space using a preset dimensionality reduction technique, and obtaining a plurality of clustering regions in the two-dimensional space; Respectively obtain a number of third eigenvectors contained in each clustering area, and regard each third eigenvector as a eigenvector with representation capability; Obtaining a preset second convolutional neural network and a sixth number of second neuron weights thereof, and using the preset second convolutional neural network as an initial model of a cancer classification prediction model; Repeat the following steps: Randomly select a target feature vector from all third feature vectors and input it into a preset second convolutional neural network to obtain a first prediction output; Using a preset second loss function to calculate the difference between the first prediction output and the second labeled data corresponding to the target feature vector, to obtain a third loss value; According to the third loss value, a back propagation algorithm is used to calculate a second gradient of each second neuron weight based on the third loss value; Based on each second gradient, using a stochastic gradient descent algorithm to update a second neuron weight corresponding to the second gradient in a preset second convolutional neural network; The third loss value is compared with the preset second loss threshold. When the third loss value is less than the preset second loss threshold, the repeated execution is stopped to obtain a trained target classification prediction model.

6. The cancer classification comparative learning method based on twin networks according to claim 2, characterized in that: All test pathology slide images were input into the cancer classification prediction model to obtain multiple classification prediction results and visualize them, including: Inputting a second number of test pathological section images into the trained target cancer classification prediction model; Using the trained target cancer classification prediction model to perform classification prediction on the second number of input test pathology slice images, to obtain a classification prediction result corresponding to each test pathology slice image; Obtaining the probability of each cancer category predicted for each test pathology slice image according to the classification prediction result corresponding to the test pathology slice image; For each test pathology section image, the predicted probability of each cancer category is converted into a pie chart form, and the pie chart is combined with the test pathology section image.

7. The cancer classification comparative learning method based on twin network according to claim 4, characterized in that: The method uses the preset first convolutional neural network as the first subnetwork of the first twin network, copies the first subnetwork to obtain a second subnetwork that is completely identical to the first subnetwork, and combines the first subnetwork and the second subnetwork into the first twin network, including: Using the preset first convolutional neural network as the first sub-network of the first twin network, and obtaining the architecture of the first sub-network and the fifth number of neuron weights; Create an empty network according to the architecture of the first subnetwork; The fifth number of neuron weights of the first sub-network is copied to the empty network to obtain a second sub-network that is identical to the first sub-network; The first sub-network and the second sub-network are connected at the same comparison layer to obtain the first twin network.

8. The cancer classification comparative learning method based on twin networks according to claim 6, characterized in that: The method of converting the predicted probability of each cancer category of each test pathology slice image into a pie chart form and combining the pie chart with the test pathology slice image comprises: Generate a corresponding first pie chart according to the predicted probability of each cancer category of each test pathological slice image, mark each sector in each first pie chart with a different color, and indicate the corresponding cancer category name with text; Set the background of each first pie chart to a preset transparency; Modifying each first pie chart to a preset size and superimposing it with the corresponding test pathology slice image and placing it at a preset position to obtain a target test pathology slice image; The target test pathology slice image is used as a sample on the user display screen.

9. The cancer classification comparative learning method based on twin network according to claim 2, characterized in that: The process of normalizing the first number of pathological slice images includes: Separate each normalized pathological slice image into three channels of RGB, and obtain a separated image of each channel; Applying multi-scale Gaussian filtering to a first channel of the three channels to obtain a first channel after first processing; Processing the first channel using a bilateral filter to obtain the first channel after the second processing; Converting the first channel after the first processing to the HIS space to obtain a first brightness channel, a first hue channel and a first saturation channel; Converting the second processed first channel to the HIS space to obtain a second brightness channel, a second hue channel, and a second saturation channel; Perform two-dimensional four-layer wavelet decomposition on the first brightness channel to obtain a first low-frequency component and a first high-frequency component; Perform two-dimensional four-layer wavelet decomposition on the second brightness channel to obtain a second low-frequency component and a second high-frequency component; The first low-frequency component, the second low-frequency component, the first high-frequency component and the second high-frequency component are fused according to the rule of taking the maximum modulus value of the low-frequency component and taking the weighted average of the high-frequency component to obtain a fused enhanced brightness channel; Merging the enhanced brightness channel with the first hue channel, the first saturation channel, the second hue channel, and the second saturation channel to obtain a third processed first channel; Using a median filter to remove noise from the second channel using a preset window area to obtain a first processed second channel; Performing edge enhancement processing on the first processed second channel using Sobel edge detection to obtain a second processed second channel; The third channel is smoothed using a mean filter to obtain the first processed third channel; Performing image enhancement processing on the third channel of the first processing using the Laplacian operator to obtain the third channel of the second processing; Create an empty image in RGB format with the same size as the first separated image; Sequentially acquiring and limiting the values ​​of the first separated image of the first channel after the third processing, the values ​​of the second separated image of the second channel after the second processing, and the values ​​of the third separated image of the third channel after the second processing within a preset range; Distribute the value of the first separated image of the first channel after the third processing to the empty image with a first weight to obtain a first distributed image; Distribute the value of the second separated image of the second channel of the second processing to the first distributed image with a second weight to obtain a second distributed image; Distribute the value of the third channel of the second processing to the second distribution image with a third weight to obtain a third distribution image; compressing the third allocated image into a preset format by using preset compression software to obtain a compressed image; The compressed image is used as a sample for dividing a sample pathological image and a test pathological image.

10. The cancer classification comparative learning method based on twin network according to claim 8, characterized in that: The process of displaying the target test pathological slice image on the user display screen includes: A monitoring program is set up to receive user instructions in real time. If the received user instruction is to directly display the complete pathological slice image, the format of the target test image is converted into a bmp format; The target test image converted into the bmp format is divided into a plurality of pixel regions of preset areas, and the first pixel point at the first position, the second pixel point at the second position, and so on are extracted from each pixel region until the last pixel point; Combining the extracted pixels at the same position into a first sub-image according to the order and position of extraction; Convert the color mode of the first sub-image from RSG format to YUV format; Inputting all the first sub-images into a preset conversion software in sequence to generate a first video sequence in a YUV format; Compressing the first video sequence in YUV format using the HEVC encoding format to obtain a compressed second video sequence; Decoding the second video sequence to obtain a decoded third video sequence; Extracting each frame of the third video sequence, converting the color mode of each frame of the image from the YUV format to the RGB format, and saving each frame of the image to obtain a plurality of second sub-images; Recombining all the second sub-images into a plurality of second processed images according to the order of extracting pixels in the process of generating all the first sub-images; The second processed image is converted into a grayscale image, and subjected to a smoothing process to obtain a smoothed third processed image; Using a preset Laplacian filter matrix to perform convolution calculation on the third processed image to obtain a result of the convolution calculation, and multiplying the result of the convolution calculation by a preset coefficient to obtain a calculated fourth processed image; The fourth processed image is used as a sample for the user display screen presentation.

Citation Information

Patent Citations

  • A Machine Learning-Based Method and System for Classifying Pathological Images

    CN115631386B

  • Disease recognitionmethod based on lightweight twin convolutional neural network

    CN112598658A

  • Traditional Chinese medicine tongue image greasy feature classification method based on deep metric learning

    CN112633301A

  • Systems & Methods for Computational Pathology using Points-of-interest

    US20180232883A1

  • Pathological diagnosis assisting method using ai, and assisting device

    US20230045882A1

Cited By

  • Tumor pathological image segmentation method and system based on graph convolution contrast learning network

    CN120563847A

  • Multi-time-sequence hepatocellular carcinoma curative effect prediction system based on twin network and storage medium

    CN121256336A