Cervical cell image classification method based on dynamic topological optimization and Bayesian reasoning
By combining dynamic topology optimization and Bayesian inference, this study addresses the issues of small model capacity, weak feature extraction capability, and imbalanced datasets in cervical cell image classification. It achieves efficient cervical cell image classification, improves classification accuracy and robustness, quantifies uncertainty, and is suitable for automated screening and assisted diagnosis of cervical cell images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANTONG UNIV
- Filing Date
- 2026-02-27
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies for cervical cell image classification suffer from problems such as small model capacity, weak feature extraction ability, high computational complexity, overfitting due to imbalanced datasets, and high-confidence erroneous judgments. Furthermore, Bayesian neural network structures are complex to learn and computationally expensive, making them difficult to combine with dynamic feature selection mechanisms.
A fusion strategy of dynamic topology optimization and Bayesian inference is adopted. By combining global feature extraction network and local feature extraction network, masks and gradient noise perturbations are dynamically generated. Combined with Bayesian normalization layer optimization model, Monte Carlo sampling is used to quantify uncertainty, so as to realize multi-path feature fusion and uncertainty quantification.
It improves the classification performance and robustness of the model, reduces the risk of missed diagnoses and misdiagnoses, enhances the small sample fit, quantifies uncertainty, meets the rigorous requirements of medical diagnosis, and significantly reduces the risk of high-confidence erroneous judgments.
Smart Images

Figure CN122023936A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of medical image analysis and deep learning applications, specifically to a cervical cell image classification method based on dynamic topology optimization and Bayesian inference. Background Technology
[0002] Cervical cancer is a highly prevalent malignant tumor among women worldwide, and early screening is a crucial means of detection. Cervical cell screening is a key technology for early diagnosis. Traditional screening relies on Pap smears, which depend primarily on manual analysis. This method is not only time-consuming but also limited by the doctor's experience and specialized collection techniques. Cells tend to clump together, hindering observation and resulting in a low diagnostic rate. Therefore, how to balance screening efficiency and diagnostic accuracy through technological innovation has become a research focus. Based on this, the application of computer vision and deep learning technologies in cell image classification has gradually become a research hotspot.
[0003] With the development of deep learning technology, LeNet and ViT have been gradually applied to cervical cell classification. However, existing technologies have three major drawbacks: First, although the traditional LeNet model is simple, it has small capacity and weak feature extraction capabilities, resulting in poor performance for high-precision tasks. Moreover, it is prone to overfitting when processing images with complex textures and backgrounds. Second, although the ViT model has strong global capabilities, it has high computational complexity, insufficient ability to capture local image features and details, and is susceptible to data noise. Third, the cervical cell dataset suffers from class imbalance and insufficient data volume, leading to model overfitting and the generation of high-confidence erroneous judgments, which fails to meet the robustness requirements of medical applications.
[0004] In addition, while existing Bayesian neural networks can handle uncertain information, their network structure learning process is complex, computationally expensive, and they face the curse of dimensionality, making it difficult to combine them with dynamic feature selection mechanisms. Summary of the Invention
[0005] Purpose of the invention: The purpose of this invention is to provide a cervical cell image classification method based on dynamic topology optimization and Bayesian inference. By adopting a fusion strategy of dynamic topology network and normalization layer optimization, the generalization ability of the model on cell images is improved. This solves the problems of existing Bayesian neural networks, which can handle uncertain information, but have complex network structure learning processes, high computational costs, and are subject to the curse of dimensionality, making it difficult to combine with dynamic feature selection mechanisms.
[0006] Technical solution: The cervical cell image classification method based on dynamic topology optimization and Bayesian inference described in this invention includes the following steps:
[0007] (1) Construct and pre-train the basic feature extraction model: Use the global feature extraction network to extract global features from cervical cell images, and convert the extracted global features into two-dimensional feature maps suitable for local feature extraction networks through the feature adaptation layer. Input the improved local feature extraction network for pre-training to obtain the baseline model;
[0008] (2) Dynamic topology network training: Based on the obtained baseline model, the activation intensity of neurons in the fully connected layer is statistically analyzed using validation set data. Input and output masks are dynamically generated based on the activation intensity. The forward propagation path of the adaptive topology network is constructed using the masks, and noise perturbation is applied to the gradient of key neurons during the training process.
[0009] (3) Adaptive Bayesian optimization: The standard normalization layer in the adaptive topology network is replaced with a Bayesian normalization layer. The Bayesian normalization layer introduces a learnable noise intensity parameter during the forward propagation process to fine-tune the network and obtain a probabilistic neural network model.
[0010] (4) Uncertainty quantification and reasoning: For the cervical cell images to be classified, the obtained probabilistic neural network model is used to perform multiple forward propagation sampling, the mean of multiple prediction results is calculated as the classification result, and the variance is calculated as the uncertainty measure.
[0011] Furthermore, in step (1), the global feature extraction network is the ViT model, the local feature extraction network is an improved LeNet-DNN network, and the feature adaptation layer is a fully connected layer used to linearly transform and reshape the global feature vector output by the ViT model into a two-dimensional feature map that adapts to the input of the LeNet-DNN network.
[0012] Furthermore, in step (2), the specific method for dynamically generating the input mask and the output mask is as follows: based on the average activation intensity of the fully connected layer neurons during the forward propagation process on the validation set, the high activation neuron indices are selected respectively, and the corresponding binary masks are generated. The masks are used to indicate the path selection for feature fusion in the adaptive topology network.
[0013] Furthermore, in step (2), the adaptive topology network includes the original input path, intermediate transformation path and output fusion path. The directional fusion of multi-path features is achieved through mask indexing, and the fused features are enhanced with nonlinear activation function to enhance their expressive power.
[0014] Furthermore, in step (2), the gradient noise perturbation only applies to the weight gradients of the key neurons selected by the activation intensity; the noise is random noise, used to improve the generalization ability and robustness of the model.
[0015] Furthermore, in step (3), the Bayesian normalization layer introduces a learnable noise scaling factor in the forward propagation, and realizes noise injection and gradient propagation through reparameterization techniques. The fine-tuning process adopts a progressive strategy, freezing or unfreezing network parameters in stages to gradually adapt to the model changes brought about by noise injection.
[0016] Furthermore, in step (4), multiple forward propagation sampling is Monte Carlo sampling. The probability distribution of the prediction results is obtained through multiple independent forward propagations. The mean is used as the final classification result, and the variance is used as the uncertainty index to identify high uncertainty samples and prompt manual review.
[0017] Furthermore, the method also includes enabling image uploading and model selection through a graphical interface, and displaying the confidence distribution and feature heatmap of the classification results to assist in clinical diagnosis.
[0018] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described herein.
[0019] An electronic device according to the present invention includes a memory and a processor, wherein the memory stores a computer program, and when the program is executed by the processor, it implements any of the methods described herein.
[0020] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. Simultaneous improvement in classification performance and robustness: The topology + ABNN model achieves a test accuracy of 66.3% (on par with the standard model) in a seven-class classification task, reduces ECE (expected calibration error) to 21.81%, and reduces FPR95 (false positive rate at 95% recall) to 21.39%, significantly outperforming traditional models; in a binary classification task, the F1 score reaches 84.07%, and the sensitivity is improved to 82.61%, effectively reducing the risk of missed diagnoses and misdiagnoses, and showing stable performance in scenarios with cell deformation and noise interference; 2. Outstanding small sample adaptation capability: Dynamic masking filters key feature paths, and gradient noise perturbation suppresses overfitting. Combined with training set data augmentation (generating 55,998 samples), it effectively solves the problem of insufficient generalization ability caused by the small size of the original dataset and class imbalance; uncertainty quantification ensures clinical safety: prediction uncertainty is quantified through 5 Monte Carlo samplings, and samples with variance higher than the overall level of the dataset are marked as "high uncertainty samples", prompting manual review, avoiding the risk of high confidence erroneous judgment, and meeting the rigorous requirements of medical diagnosis; 3. efficient and collaborative feature fusion: ViT global features and LeNet local features interact deeply through multi-path fusion, which not only preserves key diagnostic features such as cell nuclear morphology and nucleocytoplasmic ratio, but also captures global semantic information of the image, solving the problem of cross-modal feature adaptation. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the overall process of the present invention;
[0022] Figure 2 This is a schematic diagram of the dynamic topology module of the present invention;
[0023] Figure 3 This is a schematic diagram of the dynamic mask update of the present invention;
[0024] Figure 4 This is a flowchart of the Bayesian normalization layer of the present invention. Detailed Implementation
[0025] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0026] This invention provides a cervical cell image classification method based on dynamic topology optimization and Bayesian inference. Table 1 shows the core calculation formula of this invention.
[0027] Table 1 Core Features and Their Calculation Formulas
[0028]
[0029] Includes the following steps:
[0030] Step 1: Construction of the basic feature extraction model
[0031] This step corresponds to Figure 1 The first phase of this process aims to establish a high-performance deterministic baseline model. This includes the following steps:
[0032] (11) Data preparation and classification: The cervical cell pathology image dataset labeled by Byriel contains 924 original images, covering 7 types of cervical cells (151 images of carcinoma in situ, 183 images of mild atypia, 147 images of moderate atypia, 99 images of normal columnar cells, 71 images of normal intermediate cells, 75 images of normal superficial cells, and 198 images of severe atypia). All images have a resolution of 256×256 pixels, and the data format is standardized and the labeling is accurate.
[0033] (a) Data partitioning: Stratified sampling was used to split the training set (559 images), validation set (184 images), and test set (184 images) in a 6:2:2 ratio. A fixed random seed of 42 was used to ensure the reproducibility of the experiment. The three datasets were physically isolated and stored in separate directories: . / feature / train, . / feature / val, and . / feature / test to avoid data leakage.
[0034] (b) Data augmentation: Seven multi-dimensional augmentation operations were performed only on the training set, including ±30° random rotation, ±20% translation, 0.7-1.3x brightness / contrast adjustment, horizontal / vertical flip, 0.8-1.2x scaling, and 5% Gaussian noise. 100 augmented samples were generated for each original image, and the final training set sample size was expanded to 55,998.
[0035] (c) Quality control: Before enhancement, the images are uniformly converted to RGB mode, and all-black images with a pixel mean of <1.0 are filtered out to avoid the interference of invalid samples on the training effect.
[0036] (12) ViT Global Feature Extraction: The ViT model pre-trained on the ImageNet dataset is loaded to segment the 256×256 pixel image into 16×16 image patches. These patches are then linearly embedded into 768-dimensional feature vectors with added positional encoding to preserve spatial location information. The embedded patch sequence is input into the Transformer encoder, which extracts global semantic features through alternating multi-head self-attention (MHSA) and feed-forward neural network (FFNN) mechanisms, and finally outputs a 768-dimensional global feature vector.
[0037] (13) Feature Adaptation and LeNet Classification: The 768-dimensional ViT feature vector is linearly transformed into 768 neurons through a custom fully connected layer, and then transformed into a 2D feature map with 1 channel, 24 pixels high, and 32 pixels wide through a reshaping operation. This operation is the key adaptation connecting ViT and subsequent convolutional networks. The feature map is then fed into an improved LeNet-5 network, which uses smaller 3x3 convolutional kernels and goes through convolution, Bayesian batch normalization, activation function, and pooling operations in sequence. Finally, it outputs the classification probabilities of 7 classes through a fully connected layer.
[0038] (14) Baseline model pre-training: The ViT model parameters are fixed, and only the improved LeNet-5 network is trained. The Adam optimizer is used with an initial learning rate of 1e-4. The training is carried out for 25 rounds, and the learning rate is reduced to 0.5 of the original value every 5 rounds. Gradient clipping (threshold ≤ 1.0) is used to prevent gradient explosion. Finally, the model with the best verification accuracy is saved as the baseline model.
[0039] Step 2: Dynamic Topology Network Training
[0040] This step corresponds to Figure 1 as well as Figure 3 The core innovation of this invention in terms of model structure is the construction of an adaptive topology network based on a baseline model, and the optimization of the network structure through dynamic masking and gradient perturbation. The implementation is as follows:
[0041] (21) Dynamic mask generation mechanism: The principle of this step is as follows Figure 3 As shown.
[0042] (a) The baseline model is forward propagated on the validation set. The neuron activation tensors of the 128-dimensional raw_input layer and the 128-dimensional raw_output layer of the fc2_input layer are synchronously recorded using the compute_validation_activations function. The mean of the absolute values of the activations of the two types of neurons along the batch dimension is calculated. The calculation formula is as follows: (Where B is the batch size,) Let be the activation value of the i-th sample in the j-th neuron. The importance of each neuron is scored, and finally two sets of 128-dimensional activation mean vectors mean_input_acts and mean_output_acts are generated.
[0043] (b) Perform Top-K filtering based on the activation mean vector: The input mask (M_input) filters the top 20% of highly activated neurons (128×20%≈26) based on mean_input_acts, and the output mask (M_output) filters the top 10% of highly activated neurons (128×10%≈13) based on mean_output_acts. The index of highly activated neurons is obtained through the torch.topk function and a binary mask is generated (activated neurons are marked as 1, and inactive neurons are marked as 0). The mask is registered as a model buffer (register_buffer) to ensure device synchronization.
[0044] (c) Mask interaction design: Set a 30% mask overlap area (about 8 neurons) to achieve deep interaction between the original features of the input subnet and the transformed features of the intermediate subnet.
[0045] (d) Dynamic update mechanism: after each round of verification, mean_acts is recalculated and the mask is updated to ensure that the network structure adapts to the current feature distribution.
[0046] (22) Multi-path feature fusion
[0047] Design three parallel feature paths and achieve targeted feature integration through mask indexing:
[0048] (a) Original input path: 24×32-dimensional feature map output by the feature adaptation layer → fc2_input layer (256→128) → 128-dimensional raw_input vector. Its core function is to preserve the global core features extracted by ViT and avoid the loss of key information caused by higher-order transformations.
[0049] (b) Intermediate transformation path: raw_input → middle_net (bottleneck structure: fc_mid1 (128 → 64) + ReLU activation + fc_mid2 (64 → 128)) → 128-dimensional middle_out vector. Through dimensional compression and nonlinear activation, high-order abstract features of cervical cells (such as nucleocytoplasmic ratio and complex patterns of cytoplasmic texture) are extracted.
[0050] (c) Output fusion path: The 256-dimensional feature vector finally output by the convolutional feature extraction module → fc2_output layer (256→128) → 128-dimensional raw_output vector. The original features are fine-tuned through linear transformation to enhance the expressive adaptability of the features.
[0051] (d) Feature integration logic: Initialize a 128-dimensional all-zero tensor final_output, and complete feature-oriented integration based on mask index:
[0052] Input mask area assignment: Inject the original global features into the core path;
[0053] Output mask region accumulation: This allows for the superposition of linear transformation features and higher-order nonlinear features; after fusion, the nonlinear expressive power of the features is enhanced through the ReLU activation function.
[0054] (23) Gradient noise perturbation of key neurons
[0055] To avoid overfitting the model to a local optimum, gradient perturbation is applied to the high-contribution neurons identified by the mask:
[0056] (a) Screening key neurons: Based on mean_acts, the top 10% of highly activated neurons (13) were selected. These neurons correspond to the core diagnostic features of cervical cells (such as cell nucleus size, chromatin distribution, etc.) and are the key path for model classification decisions.
[0057] (b) Gaussian noise perturbation: During backpropagation, Gaussian noise with a standard deviation of 0.01 is applied to the weight gradient of the fully connected layer corresponding to the key neuron. Mathematically, this is expressed as: , , where η is the learning rate and ϵ is the indicator function (ϵ=1 when j belongs to the critical path, otherwise ϵ=0). The noise distribution is standard Gaussian. By using stochastic gradient perturbation to break local optima, the network is forced to explore more effective feature combinations, thus improving the model's generalization ability in deformable cells and noisy environments.
[0058] (24) Topology network training strategy
[0059] A training scheme adapted to dynamic structures is adopted to ensure stable convergence of the network during dynamic path adjustments:
[0060] (a) Optimizer selection: The Adam optimizer is adopted, and the initial learning rate is set to 1e-5 to match the parameter update requirements in the small sample scenario.
[0061] (b) Training parameters: The number of training rounds is fixed at 10 rounds. A cosine annealing learning rate scheduling strategy is introduced to achieve periodic adaptive adjustment of the learning rate and balance the convergence speed and optimization accuracy.
[0062] (c) Regularization measures: Combining Dropout regularization with gradient clipping (threshold ≤ 1.0) suppresses overfitting and avoids gradient explosion, ensuring training stability during dynamic topology adjustment.
[0063] Step 3: Adaptive Bayesian Optimization
[0064] This step corresponds to Figure 1 as well as Figure 4 The dynamic topology network is transformed into a probabilistic model, and the uncertainty is quantified through Bayesian inference, as follows:
[0065] (31) Bayesian normalization layer replacement: Replace all standard batch normalization layers in the adaptive topology network trained in step two with custom Bayesian batch normalization layers, such as... Figure 4 As shown. The core formula for this layer is... ,in , This is the learnable noise scaling factor, initially set to 0.01. and These represent the mean and variance of the current batch, respectively. Gradient propagation is ensured through reparameterization techniques during the later stages of training. It is stable at 0.008±0.001.
[0066] (32) Gradual fine-tuning strategy:
[0067] (a) First stage: Freeze the core parameters of the convolutional and fully connected layers of the dynamic topology network, and train only the Bayesian normalized layers. The parameters and bias terms are adjusted to adapt to model changes caused by noise injection, and the model is trained for 5 rounds.
[0068] (b) Second stage: Gradually unfreeze the parameters of the fully connected layer, fine-tune them with a learning rate of 1e-6, introduce a class perturbation strategy to add small class-related noise to the input features; continue to use cosine annealing learning rate scheduling, with the learning rate fluctuating periodically in the range of [1e-7, 1e-6] to balance convergence speed and generalization ability.
[0069] Step 4: Uncertainty Quantification and Reasoning
[0070] This step achieves simultaneous output of classification results and uncertainty through Monte Carlo sampling, as follows:
[0071] (41) Monte Carlo sampling inference: For a single image of cervical cells to be classified, perform M=5 independent forward propagations. In each propagation, the noise term of the Bayesian normalization layer is... Random sampling generates 5 independent sets of 7-class prediction outputs. After being converted into a class probability distribution using the Softmax function, the mean (final classification result) and variance (uncertainty measure) of the probability of each class are calculated, mathematically expressed as follows: Where θ is a fixed parameter of the model. This represents the noise term in the m-th sample.
[0072] (42) Application of uncertainty measurement: Variance is used as the core reference for clinical review. Samples with variance significantly higher than the overall variance of the dataset are marked as "high uncertainty samples" to prompt pathologists to conduct manual review. Samples with variance in a reasonable range are used as an automated screening reference in combination with the model classification results to avoid the risk of high confidence erroneous judgment.
[0073] (43) Visualized reasoning results: Display the probability mean distribution of each category and the confidence of the target category, generate an attention heatmap by combining GradCam technology, overlay uncertainty variance information, clearly present the core diagnostic area and uncertainty area that the model focuses on, and help pathologists understand the model decision logic.
[0074] To verify the effectiveness of the method of this invention, comparative experiments were conducted on the Byriel cervical cell dataset to compare the performance of the standard model, the standard model with ABNN mechanism (Standard+ABNN), the topological architecture (Topo), and the topological architecture with ABNN mechanism (Topo+ABNN). The experimental results are as follows: Table 2 shows the performance comparison of different models on the seven-class classification test set, and Table 3 shows the robustness index comparison of different models on the binary classification task.
[0075] Table 2 Performance comparison of different models on the seven-class classification test set
[0076]
[0077] As shown in Table 2, in the seven-class classification task, the standard model has the best performance in terms of accuracy and ranking. The topology architecture, after introducing ABNN, performs well in terms of false positive control and prediction probability calibration, and its accuracy is the same as that of the standard model.
[0078] Table 3 Comparison of robustness metrics of different models on binary classification tasks
[0079]
[0080] Table 3 shows that in binary classification (negative / positive) tasks, the model with the ABNN mechanism introduced into the topological architecture performs best overall, with superior negative class discrimination and false positive control. In practical applications, the model with the ABNN mechanism introduced into the topological architecture should be chosen if high recall is required, while the model with the topological architecture should be chosen if high accuracy is required.
[0081] The above data fully demonstrates that, through the synergistic effect of dynamic topology and Bayesian uncertainty quantification, this invention significantly reduces the risk of high-confidence erroneous judgments while improving the model's generalization ability, providing a more reliable and safer solution for clinical auxiliary diagnosis.
Claims
1. A cervical cell image classification method based on dynamic topology optimization and Bayesian inference, characterized in that, Includes the following steps: (1) Construct and pre-train the basic feature extraction model: Use the global feature extraction network to extract global features from cervical cell images, and convert the extracted global features into two-dimensional feature maps suitable for local feature extraction networks through the feature adaptation layer. Input the improved local feature extraction network for pre-training to obtain the baseline model; (2) Dynamic topology network training: Based on the obtained baseline model, the activation intensity of neurons in the fully connected layer is statistically analyzed using validation set data. Input and output masks are dynamically generated based on the activation intensity. The forward propagation path of the adaptive topology network is constructed using the masks, and noise perturbation is applied to the gradient of key neurons during the training process. (3) Adaptive Bayesian optimization: The standard normalization layer in the adaptive topology network is replaced with a Bayesian normalization layer. The Bayesian normalization layer introduces a learnable noise intensity parameter during the forward propagation process to fine-tune the network and obtain a probabilistic neural network model. (4) Uncertainty quantification and reasoning: For the cervical cell images to be classified, the obtained probabilistic neural network model is used to perform multiple forward propagation sampling, the mean of multiple prediction results is calculated as the classification result, and the variance is calculated as the uncertainty measure.
2. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, In step (1), the global feature extraction network is the ViT model, the local feature extraction network is the improved LeNet-DNN network, and the feature adaptation layer is a fully connected layer used to linearly transform and reshape the global feature vector output by the ViT model into a two-dimensional feature map that adapts to the input of the LeNet-DNN network.
3. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, In step (2), the specific method for dynamically generating the input mask and the output mask is as follows: based on the average activation intensity of the fully connected layer neurons during the forward propagation process on the validation set, the high activation neuron indices are selected respectively, and the corresponding binary masks are generated. The masks are used to indicate the path selection for feature fusion in the adaptive topology network.
4. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, In step (2), the adaptive topology network includes the original input path, intermediate transformation path and output fusion path. The directional fusion of multi-path features is achieved through mask indexing, and the fused features are enhanced with nonlinear activation function to enhance their expressive power.
5. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, In step (2), the gradient noise perturbation only acts on the weight gradient corresponding to the key neurons selected by the activation intensity; where the noise is random noise.
6. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, In step (3), the Bayesian normalization layer introduces a learnable noise scaling factor in the forward propagation, and realizes noise injection and gradient propagation through reparameterization techniques. The fine-tuning process adopts a progressive strategy, freezing or unfreezing network parameters in stages to gradually adapt to the model changes brought about by noise injection.
7. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, In step (4), multiple forward propagation sampling is Monte Carlo sampling. The probability distribution of the prediction results is obtained through multiple independent forward propagations. The mean is used as the final classification result, and the variance is used as the uncertainty index to identify high uncertainty samples and prompt manual review.
8. The cervical cell image classification method based on dynamic topology optimization and Bayesian inference according to claim 1, characterized in that, The method also includes enabling image uploading and model selection through a graphical interface, and displaying the confidence distribution and feature heatmap of the classification results to assist in clinical diagnosis.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.
10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, implements the method as described in any one of claims 1-8.