Correctable bag-level classification model training method and device based on instance image label

By employing a training method for a calibrable bag-level classification model based on instance image labels, the problem of diluted role of key instance images is solved, improving the accuracy and interpretability of pathological slide analysis, reducing transfer costs, and making it applicable to various panoramic pathological scan images and bag-level classification tasks.

CN122265747APending Publication Date: 2026-06-23NANCHANG FIRST HOSPITAL +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANCHANG FIRST HOSPITAL
Filing Date
2026-05-27
Publication Date
2026-06-23

Smart Images

  • Figure CN122265747A_ABST
    Figure CN122265747A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on instance image label's correctable package level classification model training method and equipment, the steps of this method are as follows: obtaining panoramic pathology scanning image and corresponding package level label;Image pre-processing and instance image segmentation are carried out to panoramic pathology scanning image;Instance feature package is obtained by using self-supervised learning model to instance image feature extraction;Package level classification model is trained by the package level label and instance feature package obtained;High contribution degree instance image training instance image classifier is screened;The prediction result of package level classification model is corrected using the output result of instance image classifier.The application is suitable for a variety of formats panoramic pathology scanning image classification tasks, can reduce package level classification model repeated training time and instance image level classification error, improve the accuracy and robustness of package level classification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, specifically relating to a training method and device for a calibrable packet-level classification model based on instance image labels. Background Technology

[0002] Currently, panoramic pathology scan image classification tasks often employ a packet-level learning strategy. This involves segmenting the panoramic pathology scan image into several instance images, with the feature matrices of all instance images forming an instance feature bag. Packet-level classification models are then trained using these packet-level labels. At present, the approach of extracting instance feature matrices based on self-supervised learning models and then combining them with packet-level classification models has been widely applied in various fields of analysis. However, existing packet-level classification models trained using packet-level learning still have significant shortcomings: On the one hand, existing bag-level classification models pay close attention to bag-level labels and aggregate features to complete classification after assigning weights to different instance images through attention mechanisms. However, in pathological slide analysis, a few key instance images are often the core of determining the classification results. The role of these key instance images is easily diluted by the equal weights of a large number of ordinary instance images, which leads to a decrease in the ability of bag-level classification models to capture key features and ultimately results in incorrect predictions, making it difficult to meet the accuracy requirements of pathological diagnosis.

[0003] On the other hand, after the existing packet-level classification model is trained, when it is used for out-of-domain tasks, the training data needs to be collected again and the entire process of retraining the packet-level classification model needs to be completed. This not only consumes a lot of computing power and storage resources, but also requires data to be labeled and preprocessed again, resulting in high time costs and poor generalization and transferability of the obtained packet-level classification model.

[0004] Meanwhile, panoramic pathological scan image analysis places extremely high demands on the interpretability of bag-level classification models. Existing bag-level classification models can only output bag-level classification results, making it difficult to accurately trace the feature contributions at the instance image level, thus failing to provide users with intuitive decision-making basis and limiting their practical application. Summary of the Invention

[0005] This invention addresses the problems of diluted critical instance image role, high transfer costs, and poor interpretability in existing packet-level classification models. It provides a correctable packet-level classification model training method and device based on instance image labels, achieved through the following technical solutions: This invention provides a method for training a calibrable bag-level classification model based on instance image labels, using panoramic pathological scan images as the processing object, and includes the following steps: Step 1: Obtain panoramic pathological scan images and their corresponding packet-level labels as the training dataset for the packet-level classification model; Step 2: Perform image preprocessing on the acquired panoramic pathology scan images, and output example images and their spatial location information; Step 3: Input the instance image into the self-supervised learning model for feature extraction, generate the instance feature matrix, and construct the instance feature package by combining the spatial location information of the instance image; Step 4: Train a packet-level classification model using the instance feature package and the packet-level label, and verify the basic performance of the packet-level classification model to obtain the trained packet-level classification model; Step 5: Input the instance feature package of panoramic pathological scan images in the training dataset into the trained package-level classification model, and output the instance image attention weights; filter high-contribution instance images whose instance image attention weights meet the preset filtering conditions; obtain the high-contribution instance image labels, and train the instance image classifier using the high-contribution instance image labels and the instance feature matrix of the high-contribution instance images. Step Six: Input the instance feature package obtained by feature extraction from the panoramic pathology scan image to be classified using the self-supervised learning model into the trained package-level classification model to obtain the preliminary prediction result and the instance image attention weights of the panoramic pathology scan image to be classified; based on the instance image attention weights of the panoramic pathology scan image to be classified, select the high-contribution instance images in the panoramic pathology scan image to be classified; input the instance feature matrix corresponding to the high-contribution instance images in the panoramic pathology scan image to be classified into the instance image classifier to obtain the corrected prediction result; perform weighted fusion of the preliminary prediction result and the corrected prediction result to obtain the final classification result.

[0006] Furthermore, the panoramic pathological scan image format mentioned in step one includes svs, tif, tiff, kfb, png, and jpg. The package-level label is a specific classification task label, such as benign or malignant tumor, gene mutation status, pathological subtype, etc. The panoramic pathological scan image must meet the package-level label definition, with no tissue damage, folding, staining contamination, and no serious noise or noise points.

[0007] Furthermore, the image preprocessing described in step two includes three steps: background removal, isometric segmentation, and quality control. First, the panoramic pathological scan image is processed to remove the background, retaining the tissue region image in the slice. Then, the panoramic pathological scan image is isometrically segmented into several images with uniform actual physical distance as initial instance images. The initial instance images are then subjected to quality control to remove invalid instance images such as contentless regions, empty cavities, and background regions, while the spatial position information of the valid instance images after quality control is saved.

[0008] Furthermore, the self-supervised learning model is a visual converter model based on DINOv2 self-supervised learning fine-tuning. Valid instance images with spatial location information are color-standardized and size-unified before being input into the visual converter model based on DINOv2 self-supervised learning fine-tuning. The feature extraction module of the visual converter model based on DINOv2 self-supervised learning fine-tuning performs instance feature extraction, and outputs an N×Z dimensional instance feature matrix (N is the number of valid instance images in a single panoramic pathological scan image, and Z is the feature dimension). The N×Z dimensional feature matrix of a single panoramic pathological scan image corresponding to the package-level label is regarded as an instance feature package.

[0009] Furthermore, the packet-level classification model described in step four is a gated attention packet-level classification model, which consists of an initialization fully connected layer, a gated attention layer, and a packet-level feature matrix classifier layer. According to the specific classification task (such as tumor benign or malignant differentiation, gene mutation prediction), several packets and their corresponding packet-level labels are divided into training set, test set, and validation set, which are input into the packet-level classification model for training. The basic classification performance of the packet-level classification model is verified by cross-validation, and the attention weights of each instance image in the packet-level classification model are output.

[0010] Furthermore, in step four, the basic performance verification indicators of the package-level classification model mainly include the area under the ROC (Receiver Operating Characteristic) curve and the accuracy.

[0011] Furthermore, the high-contribution instance images mentioned in step five are instance images that rank highly in the attention weight of the bag-level classification model, such as the core area of ​​a tumor in a pathological slide or a panoramic pathological scan image with significant features. After selecting high-contribution instance images through the instance image attention weight of the bag-level classification model, the instance image labels of the high-contribution instance images are manually labeled (such as tumor cell density, karyotype features, gene mutation positive / negative, etc.). The instance feature matrix of the high-contribution instance images and the manually labeled instance image labels are combined to train the instance image classifier.

[0012] Furthermore, in step six, the primary prediction result is the package-level label probability output by the package-level classification model; the corrected prediction result is the instance summary label probability obtained by inputting the instance feature matrix corresponding to the high-contribution instance images selected based on attention weights into the instance image classifier.

[0013] In another aspect, the present invention provides an apparatus including a memory and a data processor, wherein the memory stores a computer program, and the computer program is executed by the data processor to perform the described correctable packet-level classification model training method based on instance image labels.

[0014] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a data processor, implements the above-described method for training a correctable packet-level classification model based on instance image labels.

[0015] The beneficial effects of this invention are: The bag-level classification model training method of the present invention strengthens the decision-making role of decisive high-contribution instance images in panoramic pathological scan images by using an external instance image classifier. This solves the problem of the dilution of the role of key instance images in existing bag-level classification models, effectively reduces instance image-level classification errors, and significantly improves the prediction accuracy of the model in pathological classification tasks. The packet-level classification model training method of this invention decomposes the training difficulty, separating the basic feature learning of the packet-level classification model from the precise correction at the instance image level. For different downstream pathological tasks (such as different cancer types and different gene mutation predictions), only the instance image classifier needs to be retrained to complete the packet-level classification model adaptation, without the need for a full-process retraining of the packet-level classification model, which greatly reduces the consumption of computing power and time resources and has low algorithm migration costs. The packet-level classification model can output the contribution weight of each instance image in the panoramic pathological scan image, accurately locate the spatial position of high-contribution key instance images, and at the same time, the instance image classifier can provide the discrimination criteria at the instance image level, and can more intuitively view the decision core area of ​​the packet-level classification model. During the training of the packet-level classification model, the classification results of the packet-level classification model are optimized through the instance image-level correction process, which effectively reduces the risk of overfitting of the packet-level classification model and makes the packet-level classification model have good adaptability to panoramic pathological scan images of different qualities and tasks. This bag-level classification model training method is applicable to various formats of panoramic pathological scan images and various bag-level classification tasks (benign / malignant differentiation, gene mutation prediction, pathological subtype classification, etc.). It can be seamlessly integrated with existing self-supervised learning models and bag-level classification models, and is especially suitable for fields such as panoramic pathological scan image analysis and radiomics analysis, providing technical support for bag-level classification model training and result correction for bag-level classification tasks. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 A schematic diagram of the packet-level classification model structure is provided for correction. Figure 3 ROC curve for a simple package-level classification model; Figure 4 The confusion matrix for a simple packet-level classification model; Figure 5 To calibrate the ROC curve of the packet-level classification model; Figure 6 To correct the confusion matrix of the packet-level classification model. Detailed Implementation

[0017] To better understand the above-mentioned objectives, features, and advantages of this invention, the following section uses the benign / malignant differentiation of breast cancer pathological sections as the core application scenario to elaborate in detail the training method of the correctable packet-level classification model based on instance image labels of this invention, and also describes the corresponding device implementation. The specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0018] like Figure 1 As shown, this embodiment provides a method for training a calibrable bag-level classification model based on instance image labels, and the steps are as follows: Step 1: Image and corresponding package-level label acquisition: Obtain panoramic pathological scan images of breast cancer and their corresponding package-level labels as the training dataset for the package-level classification model; Step 2, Image Preprocessing and Instance Image Segmentation: Perform image preprocessing on the acquired panoramic pathological scan images of breast cancer, and output instance images and instance image spatial location information; Step 3: Feature Extraction and Instance Feature Package Construction: Input the instance image into the self-supervised learning model for feature extraction, generate the instance feature matrix, and construct the breast cancer instance feature package by combining the spatial location information of the instance image; Step 4: Packet-level classification model training and performance verification: Train a packet-level classification model for distinguishing between benign and malignant breast cancer using instance feature packets and packet-level labels, and verify the basic performance of the packet-level classification model. Step 5: High-contribution instance image screening and instance image classifier training: Input the instance feature package of the panoramic pathology scan image of breast cancer into the trained package-level classification model, and output the normalized instance image attention weights; use the instance image attention weights to screen out high-contribution instance images that meet the preset screening conditions; manually label the instance image labels of the high-contribution instance images; train the instance image classifier using the high-contribution instance image labels and the instance feature matrix corresponding to the high-contribution instance image labels. Step Six: Weighted Correction and Final Classification: The instance feature packets obtained after feature extraction from the panoramic pathological scan image of breast cancer to be classified by the self-supervised learning model are input into the trained packet-level classification model to obtain the packet-level label probabilities. The process involves: assigning attention weights to instance images of the panoramic pathological scan images of breast cancer to be classified; selecting high-contribution instance images from the panoramic pathological scan images of breast cancer to be classified based on these attention weights; and inputting the instance feature matrix corresponding to the high-contribution instance images from the panoramic pathological scan images of breast cancer to be classified into an instance image classifier to obtain the instance summary label probability. ;Please determine the probability of package-level tags and instance summary label probability The final classification of benign and malignant breast cancers was obtained by weighted correction using a weighted fusion strategy.

[0019] Specifically, in step one of this embodiment, clinical paraffin-embedded breast cancer tissue sections stained with hematoxylin and eosin (HE) are collected and digitally generated into panoramic pathological scan images (WSI) using a professional pathological slide scanner. The scan supports mainstream formats such as SVS, TIF, TIFF, KFB, PNG, and JPG, with a scanning resolution of 20×. Simultaneously, panoramic pathological scan images of normal breast tissue are collected as benign control samples. According to the panoramic pathological scan image quality control standards, sections without tissue, with overlapping or damaged tissue, severely stained, blurry, or containing noise are discarded. Panoramic pathological scan images with intact tissue, clear images, uniform staining, and no severe noise are retained, ensuring that the image content conforms to the package-level label definition. Two or more senior pathologists labeled panoramic pathological scan images with benign or malignant class labels (labels were only divided into "benign" and "malignant") based on the gold standard diagnostic results. A total of 311 samples from the same source were collected as the training dataset for the classification model, including 144 panoramic pathological scan images of malignant breast cancer and 167 panoramic pathological scan images of benign normal breast tissue. Another 100 samples from a different source served as an external independent validation set, including 50 panoramic pathological scan images of malignant breast cancer and 50 panoramic pathological scan images of benign normal breast tissue, all with clear pathological diagnostic evidence. The 311 samples in the training dataset were used for training the classification model, while the 100 samples in the external independent validation set were used to evaluate the model's performance.

[0020] The core of step two in this embodiment is to decompose the panoramic pathological scan image of breast cancer into standardized instance images, remove invalid regions, retain valid instance images, and record the spatial location of the instance images, laying the foundation for subsequent feature extraction and packet-level classification model training. Background segmentation was performed on the selected panoramic pathological scan images of breast cancer. Blank background areas in the slices were filtered out using the RGB color thresholding method, and only the effective area images containing mammary alveoli, ducts, stroma and other tissues were retained to avoid background noise from interfering with subsequent analysis. Based on the panoramic pathological scan images of breast cancer, the effective tissue area was divided into several initial instance images at standard equidistant intervals of 128μm × 128μm, corresponding to a pixel size of 256 pixels × 256 pixels. This ensured that the physical scale of all instance images was uniform and met the visual scale requirements for pathological diagnosis. The initial instance images underwent layer-by-layer quality control, eliminating invalid instance images and retaining only those with pathological analysis value: Three-channel grayscale thresholds were set to eliminate pure white, pure black, or near-pure color instance images, retaining instance images with an average grayscale of 20–250 after inversion, a mean variance of >320 for the three channels, and a median grayscale of 20–250; Invalid instance images without pathological tissue, empty cavities, or contaminated with impurities were eliminated using an image semantic segmentation algorithm; Image gradient method was used to calculate sharpness, setting a sharpness threshold of 200, eliminating blurry instance images with sharpness below the threshold, ensuring that the texture, karyotype, and other pathological features of the instance images were clearly distinguishable. All quality-controlled instance images are labeled with spatial location information (X / Y coordinates) to form an instance image set for a single panoramic pathological scan image of breast cancer, and the number of instance images N for a single panoramic pathological scan image of breast cancer is recorded at the same time. Reference Figure 2 In this embodiment, the self-supervised learning model described in step three adopts a Vision Transformer (ViT) model based on DINOv2 self-supervised learning fine-tuning. The ViT model includes one patch embedding layer, a convolutional projection layer, and a stack of 24 attention layers (Transformer blocks). Each of the 24 attention layer stacks contains a QKV linear layer, normalization, and a multilayer perceptron. The QKV linear layers represent query (Q), key (K), and value (V) linear layers, respectively, and are basic components of the Transformer attention mechanism.

[0021] In step three of this embodiment, the instance images input to the self-supervised learning model need to be standardized: all instance images of a single panoramic pathological scan image of breast cancer are preprocessed uniformly, including color standardization, size standardization (scaled to 224 pixels × 224 pixels × 3 channels), and normalization. The standardized instance images, combined with their spatial location information, are input into the pre-trained ViT model in batches of 128 images. The instance images are transformed into patch features through a patch embedding layer, and deep feature encoding is performed through a convolutional projection layer. Then, feature extraction is performed through a stack of 24 attention layers. The features output by the last stack of attention layers are L2 normalized, and the output is an N×1024-dimensional instance feature matrix (N is the number of instance images in a single panoramic pathology scan of breast cancer, and 1024 is the feature dimension). The N×1024-dimensional instance feature matrix corresponding to a single panoramic pathological scan image of breast cancer is regarded as an instance feature package. Each instance feature package corresponds to a benign / malignant package-level label. The instance feature packages of all 311 samples are constructed and used as input data for training the package-level classification model.

[0022] Reference Figure 2 In step four of this embodiment, the package-level classification model selected is a gated attention package-level classification model adapted to pathological slide analysis (Clustering-constrained Attention Multiple Instance Learning / Attention-based Multiple Instance Learning, CLAM / ABMIL), which balances feature aggregation capability and contribution quantification. The gated attention package-level classification model consists of the following: Initialize the fully connected layer: the input dimension is 1024 (the dimension of the instance feature matrix), the hidden layer dimension is 512, set one random deactivation layer (dropout parameter is set to 0.2), there is no final linear layer, and the output encoded instance feature matrix is ​​N×512 dimensional; Gated attention layer: A gated attention network is selected with an input dimension of 512, an attention hiding dimension of 256, and dropout=0.2. The gated attention layer obtains the attention weights of all instance images of the panoramic pathology scan image. The attention weights of all instance images of the panoramic pathology scan image are N×1 in dimension, which are 1×N in dimension after transpose. Attention Masking and Normalization: An attention masking layer is added to reset the attention weights of the original instance images of invalid instance images to their minimum values, preventing them from participating in feature aggregation. Then, the attention weights of the original instance images are normalized using the Softmax activation function for the number of instance images (N) in a single panoramic breast cancer pathology scan image, resulting in normalized instance image attention weights. (1×N dimensional), with a weight sum of 1; The instance features are aggregated based on the attention weights of the instance images and then input into the packet-level feature matrix classifier. The packet-level feature matrix classifier is a linear classifier with an input dimension of 512 and an output dimension of 2 (binary classification of benign and malignant). After passing through the Softmax activation function, the packet-level label probability is obtained. The gated attention bag-level classification model is trained using the PyTorch framework. During training, the loss values ​​and the area under the receiver operating characteristic (ROC) curves of the training and validation sets are monitored in real time. After training, the optimal weights of the gated attention bag-level classification model are saved, and the model outputs the bag-level label probability for each input pathology. Normalized instance image attention weights (1×N dimensions), encoded instance feature matrix (N×512 dimensions), and package-level global aggregated features (1×512 dimensions). In step four of this embodiment, the performance verification of the gated attention packet-level classification model uses the area under the ROC curve and accuracy as the main evaluation indicators for the performance of the gated attention packet-level classification model. For example... Figure 3 and Figure 4 As shown, the area under the optimal ROC curve for the gated attention-based classification model on the external validation set for benign / malignant differentiation of panoramic pathological scan images of breast cancer is 0.9282 (see Figure 1). Figure 3 The accuracy rate is 93% (see) Figure 4 It can achieve basic packet-level benign and malignant discrimination, but there are some samples that are misclassified because the attention weight of the core instance image is diluted by the ordinary instance image. It needs to be corrected by the instance image classifier.

[0023] Step five of this embodiment is the core innovation of the invention. Based on the attention weight of the instance image output by the gated attention packet-level classification model, high-contribution key instance images are selected. The instance image classifier is trained by manually labeling the instance images and externally connected to the gated attention packet-level classification model. By weighted fusion of the instance image labels and the corresponding instance feature matrix, the initial classification result of the gated attention packet-level classification model is accurately corrected, and the decision-making role of key instance images is strengthened. Based on the trained gated attention packet-level classification model, output normalized instance image attention weights. The top n instances of attention weight (n is a set parameter, n=10 in this embodiment) in each panoramic pathological scan image of breast cancer are selected as high contribution instance images. Two or more senior pathologists performed double-blind manual annotation on all selected high-contribution instance images, assigning instance image level binary labels (labels consistent with package level labels, 0 for benign instance images and 1 for malignant instance images). The annotation was based on the pathological morphological characteristics of the instance images, and the annotation results were verified and confirmed by two or more senior pathologists to ensure the accuracy of instance image labels. The training process of the instance image classifier is as follows: The 1024-dimensional original instance feature matrix of high-contribution instance images is used as input, and the instance image labels are used as supervision signals to train an instance image classifier adapted to the features of panoramic pathological scan images of breast cancer. The specific structure of the instance image classifier includes: a fully connected layer with an input dimension of 1024 and an output dimension of 512, a ReLU activation function, a random deactivation layer with a dropout rate of 0.25, a fully connected layer with an input dimension of 512 and an output dimension of 2, and a Sigmoid activation function for binary classification tasks.

[0024] In step six of this embodiment, the trained instance image classifier is externalized to the gated attention packet-level classification model to form the final correctable gated attention packet-level classification model based on instance image labels. The correction logic is deeply integrated with the output of the gated attention packet-level classification model without structural changes. Correction is achieved only through result weighting, ensuring that the core architecture of the original gated attention packet-level classification model remains unchanged. The specific correction process is as follows: Input the feature package of a panoramic pathology scan image of breast cancer into a gated attention-based bag-level classification model, and output the bag-level label probability. Instance image attention weights Attention weights are applied to the top n instance images (n is a set parameter, in this embodiment n=10); Input the 1024-dimensional original features of the top n most contributing instance images to the instance image classifier, and output the summary label probability of the instances. ; The final prediction probability is calculated using a weighted fusion method. The formula for the final prediction probability is: ; In the formula, To output the packet-level label probability; Summarize the label probabilities for each instance; The base weights for the initial prediction results of the gated attention packet-level classification model; Adjust the weights for the discrimination results of the instance image classifier; This is the final predicted probability; if If the result is positive, the panoramic pathological scan image is determined to be malignant; otherwise, it is benign. This embodiment takes... That is, package-level prediction accounts for 70%, and instance-level correction accounts for 30%.

[0025] like Figure 5 and Figure 6 As shown, the area under the ROC curve of the corrected gated attention-based classification model increased to 0.9793 in external validation (see...). Figure 5 Compared to the uncorrected gated attention packet-level classification model, the accuracy improved from 93% to 98% (see...). Figure 6 This effectively solves the problem of diluted attention weights in key instance images.

[0026] This invention strengthens the decision-making power of key instance images in the final classification task of panoramic pathological scan images by weighted correction of the bag-level classification model through an external instance image classifier. Compared with a simple bag-level classification model, this method strengthens the core role of key instance images in the classification results of panoramic pathological scan images, improves prediction performance, and enhances the interpretability of the bag-level classification model. By decomposing the training difficulty, the risk of overfitting is reduced, enabling the trained bag-level classification model to be compatible with any downstream analysis task, significantly reducing the algorithm migration cost.

[0027] In one embodiment, a training device for a calibrable bag-level classification model based on instance image labels is provided, comprising a data processor and a memory. The memory stores a computer program, and when the data processor executes the computer program, it implements the calibrable bag-level classification model training method based on instance image labels as described in the above embodiment.

[0028] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a data processor, implements the correctable packet-level classification model training method based on instance image labels as described in the above embodiments.

[0029] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for training a calibrable bag-level classification model based on instance image labels, characterized in that, The method steps include: Step 1: Obtain panoramic pathological scan images and their corresponding packet-level labels as the training dataset for the packet-level classification model; Step 2: Perform image preprocessing on the acquired panoramic pathology scan images, and output example images and their spatial location information; Step 3: Input the instance image into the self-supervised learning model for feature extraction, generate the instance feature matrix, and construct the instance feature package by combining the spatial location information of the instance image; Step 4: Train a packet-level classification model using the instance feature package and the packet-level label, and verify the basic performance of the packet-level classification model to obtain the trained packet-level classification model; Step 5: Input the instance feature package of panoramic pathological scan images in the training dataset into the trained package-level classification model, and output the instance image attention weights; filter high-contribution instance images whose instance image attention weights meet the preset filtering conditions; obtain the high-contribution instance image labels, and train the instance image classifier using the high-contribution instance image labels and the instance feature matrix of the high-contribution instance images. Step Six: Input the instance feature package obtained by feature extraction from the panoramic pathology scan image to be classified using the self-supervised learning model into the trained package-level classification model to obtain the preliminary prediction result and the instance image attention weights of the panoramic pathology scan image to be classified; based on the instance image attention weights of the panoramic pathology scan image to be classified, select the high-contribution instance images in the panoramic pathology scan image to be classified; input the instance feature matrix corresponding to the high-contribution instance images in the panoramic pathology scan image to be classified into the instance image classifier to obtain the corrected prediction result; perform weighted fusion of the preliminary prediction result and the corrected prediction result to obtain the final classification result.

2. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 1, characterized in that, Step 2 describes the image preprocessing operation: background removal is performed on the panoramic pathological scan image, and after it is equally segmented into N instance images, quality control is performed, and the spatial location information of the instance images after quality control is saved.

3. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 1, characterized in that, In step three, the self-supervised learning model is a visual converter model fine-tuned based on DINOv2 self-supervised learning.

4. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 1, characterized in that, In step three, the instance image is input into the self-supervised learning model for feature extraction, the instance feature matrix is ​​output, and the spatial location information of the instance image is associated; all instance feature matrices of a single panoramic pathological scan image corresponding to the package-level label are regarded as an instance feature package.

5. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 1, characterized in that, In step four, the basic performance verification metrics for the package-level classification model mainly include the area under the ROC curve and accuracy.

6. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 1, characterized in that, In step five, the instance feature packages of panoramic pathological scan images in the training dataset are input into the trained package-level classification model, and the output results include instance image attention weights, instance feature matrices, and package-level global aggregated features; the high-contribution instance images are instance images whose instance image attention weight ranking meets the preset screening conditions.

7. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 6, characterized in that, In step five, the high-contribution instance images are manually labeled to obtain instance image labels, and the instance image classifier is trained by combining the instance image labels with the instance feature matrix of the high-contribution instance images.

8. The training method for a calibrable bag-level classification model based on instance image labels as described in claim 1, characterized in that, In step six, the primary prediction result is the packet-level label probability output by the packet-level classification model; the corrected prediction result is the instance summary label probability obtained by inputting the instance feature matrix corresponding to the high-contribution instance image selected based on attention weights into the instance image classifier.

9. A training device for a calibrable packet-level classification model based on instance image labels, characterized in that, The system includes a memory and a data processor. The memory stores a computer program, which is executed by the data processor to train the correctable packet-level classification model based on instance image labels as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a data processor, implements the correctable packet-level classification model training method based on instance image labels as described in any one of claims 1 to 8.