An image distributed detection method based on multi-center plankton monitoring
Patent Information
- Application Number
- CN202611179080.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]针对现有技术中浮游生物监测系统在联邦学习框架下缺乏分布外检测能力、无法在原始图像不出本地的前提下有效拒识未知样本的缺陷,本发明提供一种基于多中心浮游生物监测的图像分布式检测方法,旨在在不共享原始图像和逐样本特征的条件下,实现联邦训练后分类器的OOD检测能力
[0028]1.本发明通过将ViM(Virtual-logit Matching)方法所需的全局统计量改写为可联邦聚合的充分统计量形式,各客户端仅需上传本地一阶和二阶特征统计量以及经验校准所需的标量统计量,服务端即可精确重构全局特征均值、协方差和经验校准系数,在不共享原始图像与逐样本特征的约束下实现了ViM的联邦化部署,有效保护了各数据中心的数据隐私。
Smart Images

Figure CN123014091A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of marine ecological monitoring and computer vision, specifically relating to an image-distributed detection method based on multi-center plankton monitoring. Background Technology
[0002] Plankton are an essential component of marine ecosystems, playing a vital role in marine food webs, nutrient cycling, and carbon cycling. Changes in the abundance and species composition of plankton communities are important indicators for assessing marine ecological health and for early warning of environmental events such as red tides. Therefore, continuous and accurate monitoring of plankton communities has always been a fundamental requirement for marine ecological research.
[0003] Traditional plankton identification relies primarily on manual microscopic examination, which is low-throughput and time-consuming. In recent years, with the widespread adoption of flow cytometry and in-situ imaging equipment, tens of thousands of images can be generated per sampling. Deep learning methods have been introduced into plankton identification, significantly improving classification accuracy for known categories. However, most of these methods are based on a key assumption: that samples encountered during testing belong to the categories defined during training—the closed-set assumption. In real-world ocean monitoring, this assumption is almost inevitably broken—the system will continuously encounter samples that have never appeared in the training set. These out-of-distribution samples can be broadly categorized into two types: Near-OOD, which are unseen species morphologically very similar to known categories, differing only in fine-grained features, making identification very difficult; and Far-OOD, which are non-target samples that differ significantly from known plankton, such as fish eggs, air bubbles, and organic debris. These samples are numerous in actual sampling. If a system can only identify known categories but cannot issue rejection signals for these out-of-world (OOD) samples, the neural network will often give overly high confidence predictions for unknown samples. The resulting misclassification will directly affect the reliability of downstream analyses such as species abundance estimation. Therefore, real-world marine plankton monitoring places not only demands on the system's classification accuracy for known categories but also its ability to detect OOD in unknown samples.
[0004] Beyond the need for OOD detection, real-world marine plankton monitoring also faces data constraints. Plankton images are typically collected and managed separately by multiple research institutions or monitoring centers located in different sea areas. The raw images and their sampling metadata from each center often involve sensitive information such as geographical location and equipment parameters. Due to data governance and security protocols, it is difficult to directly aggregate them to the central server for unified training. Federated learning provides a solution to this constraint: each center trains on local data, only uploading model updates to the server for aggregation, while the raw data remains locally.
[0005] However, existing federated learning research mainly focuses on training high-accuracy classification models, and still cannot be directly applied to real-world plankton monitoring scenarios. That is, even if an accurate classifier is obtained through federated training, it still lacks the ability to reject unknown samples. Therefore, how to supplement the federated-trained classifier with an OOD detection path, given that the original images cannot be shared across centers, is a pressing technical problem that needs to be solved. Summary of the Invention
[0006] To address the shortcomings of existing plankton monitoring systems in the federated learning framework, such as the lack of out-of-distribution detection capability and the inability to effectively reject unknown samples without the original image being local, this invention provides an image-distributed detection method based on multi-center plankton monitoring. This method aims to achieve OOD detection capability of the federatedly trained classifier without sharing the original image and sample-by-sample features.
[0007] To achieve the above objectives, the present invention employs the following technical means:
[0008] A distributed image detection method based on multi-center plankton monitoring includes the following steps:
[0009] Step S1: Construct a federated learning system consisting of one server and N clients, where each client holds a local training set of labeled plankton images. ,in, Images of plankton, For the corresponding known category labels, For the client The number of local samples is limited, and original images are not shared between clients. FedAvg algorithm is used for federated training to obtain a global classification model, which includes a feature extractor. and classification head ;
[0010] Step S2: Fix the global classification model parameters obtained from step S1; each client uses the frozen feature extractor. Extract features from local training samples of known categories and compute first-order statistics locally. Second-order statistics and sample size The data is then uploaded to the server; the server aggregates the statistics from each client. , , And reconstruct the global feature mean based on the aggregated statistics. and global feature covariance ;
[0011] Step S3: The server reconstructs the global feature covariance matrix based on the data obtained in step S2. Principal component analysis was performed, and the components were selected according to predetermined rules. Construct the principal subspace matrix in each principal direction ,in, For feature dimensions; the server will use the principal subspace matrix. and global feature mean Distribute to each client;
[0012] Step S4: Each client, using the data received in step S3, applies the training samples of known local categories. and Calculate the energy term and residuals ,in, Given the total number of categories, The matrix is an identity matrix; each client calculates the sum of energy locally. Summation of residuals The data is then uploaded to the server; the server aggregates the data and calculates the empirical calibration coefficients. ;
[0013] Step S5: For the plankton image sample to be detected Calculate its OOD score ;like If the value is less than a preset threshold, the sample is determined to be an out-of-distribution sample; otherwise, it is determined to be a sample of a known category.
[0014] Preferably, each round of communication in the FedAvg algorithm in step S1 includes: the server sending the current global model parameters to each client; each client performing several rounds of local training on local data; each client uploading its local model update to the server; and the server aggregating the model updates from each client by weighted average based on the number of samples.
[0015] Preferably, the global feature mean in step S2 and global feature covariance The reconstruction is mathematically identical to the result of directly calculating all samples on the server.
[0016] Preferably, the predetermined rule in step S3 is a fixed empirical value rule, i.e. Take a preset fixed value.
[0017] Preferably, the predetermined rule in step S3 is an adaptive dimension selection rule based on ACT, specifically including:
[0018] The global covariance matrix reconstructed in step S2 Constructing the sample correlation matrix ,in, For the reason A diagonal matrix consisting of diagonal elements;
[0019] remember The characteristic value of the descending sample is Calculate the corrected eigenvalues according to the ACT rule. With threshold ;
[0020] Adaptive principal subspace dimension is determined by Sure;
[0021] server in Principal component analysis was performed on the above, and the previous values were retained. Construct the principal subspace matrix in each principal direction .
[0022] Preferably, the empirical calibration coefficient in step S4 Used to balance energy terms With residuals The difference in dimensions between them.
[0023] Preferably, the preset threshold in step S5 is selected as follows: on a known category validation set, the corresponding quantile is determined as the threshold according to the preset false rejection rate requirement.
[0024] Preferably, the planktonic images include planktonic microscopic images acquired by flow cytometry or in-situ imaging devices.
[0025] Preferably, the off-distribution samples include Near-OOD samples and Far-OOD samples. The Near-OOD samples are unseen species that are morphologically similar to known categories, and the Far-OOD samples are non-target samples that are significantly different from known plankton.
[0026] Preferably, the method is a post-processing method that does not change the objective function and training process of federated classification training in step S1.
[0027] The present invention has the following beneficial effects:
[0028] 1. This invention rewrites the global statistics required by the ViM (Virtual-logit Matching) method into a sufficient statistical form that can be federated and aggregated. Each client only needs to upload local first-order and second-order feature statistics and scalar statistics required for empirical calibration. The server can then accurately reconstruct the global feature mean, covariance, and empirical calibration coefficients. This achieves federated deployment of ViM without sharing the original image and per-sample features, effectively protecting the data privacy of each data center.
[0029] 2. Based on FedViM, this invention further introduces the ACT adaptive dimension selection mechanism, which changes the construction of the principal subspace from setting fixed empirical values to data-driven adaptive dimension selection. This avoids the problem of poor adaptability of fixed empirical values on different backbones and datasets, and improves the generalization ability and robustness of the method.
[0030] 3. This invention belongs to the post-processing OOD detection method. It does not change the objective function and training process of the federated classification training stage. Only two rounds of lightweight statistical communication are needed after the federated training is completed to complete the deployment of the OOD detection module. Compared with methods such as FOSTER that require the introduction of an additional generative network during the training stage, the implementation complexity is significantly reduced and the communication overhead is small. It is more suitable for resource-constrained marine monitoring edge deployment scenarios.
[0031] 4. This invention has an effective detection capability for both Near-OOD and Far-OOD out-of-distribution samples in plankton monitoring scenarios, which can significantly reduce the risk of overconfidence prediction of unknown samples by neural networks, and provide reliable data quality assurance for downstream analysis tasks such as species abundance estimation in marine ecological monitoring. Attached Figure Description
[0032] Figure 1 This is a flowchart of the method of the present invention;
[0033] Figure 2 These are representative image examples of the three types of samples—ID, Near-OOD, and Far-OOD—used in the specific experiments of this invention.
[0034] Figure 3 This is a comparison chart of Near / Far-OOD AUROC on five backbones in the specific experiment of this invention, showing FedViM, ACT-FedViM, FedLN and FOSTER.
[0035] Figure 4 This is a model-by-model comparison of Pooled and Federated models in a specific experiment of this invention;
[0036] Figure 5 This is a comparison of the fixed-k and ACT dimension selection results on five backbones in the specific experiments of this invention;
[0037] Figure 6 This is a comparison chart of Near / Far-OOD AUROC on three representative models—MobileNetV3-L, ResNet101, and DenseNet169—in the specific experiments of this invention. Detailed Implementation
[0038] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Example
[0040] like Figure 1 As shown, this invention provides an image-distributed detection method based on multi-center plankton monitoring, comprising the following steps:
[0041] Step S1: Federated Classification Training
[0042] Construct a federated learning system consisting of one server and N clients. Each client corresponds to a local data center or monitoring unit and holds a local training set of labeled plankton images. ,in, Images of plankton, For the corresponding known category labels, For the client The number of local samples is limited, and the original images are not shared between clients;
[0043] Federated training is performed using the FedAvg algorithm to obtain a global classification model, which includes a feature extractor. and classification head ;
[0044] Each round of communication in the FedAvg algorithm includes: the server sending the current global model parameters to each client; each client performing several rounds of local training on local data; each client uploading its local model update to the server; and the server aggregating the model updates from each client by weighted average based on the number of samples.
[0045] Step S2: Federal Statistics Reconstruction
[0046] The global classification model parameters obtained from step S1 are fixed, and gradient updates are no longer performed.
[0047] Each client uses a frozen feature extractor Extract features from local training samples of known categories and compute first-order statistics locally. Second-order statistics and sample size And upload it to the server;
[0048] The server aggregates statistics from each client:
[0049] , ,
[0050] The server reconstructs the global feature mean based on the aggregated statistics. and global feature covariance :
[0051] , ;
[0052] The global feature mean and global feature covariance The reconstruction is mathematically identical to the result of directly calculating all samples on the server.
[0053] Step S3: Construction of the master subspace
[0054] The server reconstructs the global feature covariance matrix based on step S2. Principal component analysis was performed, and the components were selected according to predetermined rules. Construct the principal subspace matrix in each principal direction ,in, For feature dimensions;
[0055] The server will use the master-subspace matrix and global feature mean Distribute to each client;
[0056] The predetermined rule is a fixed empirical value rule, that is Take a preset fixed value;
[0057] The predefined rules are adaptive dimension selection rules based on ACT, specifically including:
[0058] The global covariance matrix reconstructed in step S2 Constructing the sample correlation matrix ,in, For the reason A diagonal matrix consisting of diagonal elements;
[0059] remember The characteristic value of the descending sample is Calculate the corrected eigenvalues according to the ACT rule. With threshold ;
[0060] Adaptive principal subspace dimension is determined by Sure;
[0061] server in Principal component analysis was performed on the above, and the previous values were retained. Construct the principal subspace matrix in each principal direction ;
[0062] Step S4: Calculation of empirical calibration coefficients
[0063] Each client, using the training samples of known categories on its local machine, utilizes the data received in step S3. and Calculate the energy term and residuals ,in, Given the total number of categories, It is the identity matrix;
[0064] Each client calculates the sum of energy locally. Summation of residuals And upload it to the server;
[0065] After server-side aggregation, the empirical calibration coefficient is calculated: ;
[0066] The empirical calibration coefficient Used to balance energy terms With residuals The difference in dimensions between them;
[0067] Step S5: Out-of-distribution detection scoring
[0068] For the planktonic image samples to be detected Calculate its OOD score ;
[0069] like If the value is less than a preset threshold, the sample is determined to be an out-of-distribution sample; otherwise, it is determined to be a sample of a known category.
[0070] The preset threshold is selected as follows: on a known category validation set, the corresponding quantile is determined as the threshold according to the preset false rejection rate requirement.
[0071] Specific experiments
[0072] 1. Dataset and OOD partitioning
[0073] This invention presents an experimental task for detecting ocean planktonic out-of-target (OOD) phenomena based on the DYB-PlanktonNet dataset. DYB-PlanktonNet is a planktonic image dataset acquired by an in-situ imaging device in Daya Bay, covering various planktonic groups as well as common non-target samples such as fish eggs, fish tails, bubbles, and particles.
[0074] Based on existing classification methods, this invention divides the data into... , , and Four parts. and Covering 54 ID categories, among which, A total of 26,034 images were used for federated training and post-processing statistic estimation. In the experiment, [the data was collected from various sources]. A fixed 10% of the samples are set as the server-side validation set, and the model is selected based on the classification accuracy. A total of 2,939 images were used to evaluate the accuracy of known class classification. and They were used to evaluate the rejection capabilities of Near-OOD and Far-OOD, respectively. There are 26 Near-OOD categories, with a total of 1516 images; There are 12 Far-OOD categories, totaling 17,031 images. Near-OOD consists of plankton categories that are similar in morphology or ecological attributes to the ID category but are not part of the current training target; Far-OOD mainly includes obviously non-target samples such as fish eggs, fish tails, bubbles, and particles, which are closer to the interference scenarios in real ocean monitoring. Figure 2 Representative images of the three types of samples are given.
[0075] 2. Experimental Setup
[0076] To simulate a multi-center ocean monitoring scenario, this invention divides 23,431 ID training samples into 5 clients. The division employs the Dirichlet distribution method, widely used in federated learning research: for each category... ,from Sampling a probability vector , Indicate category The samples were assigned to the client. The proportion. The smaller the value, the greater the difference in category distribution among clients. This invention sets... With a random seed of 42, the sample sizes of each client after partitioning were 6360, 2513, 3942, 6754 and 3862, respectively, showing a significant imbalance between non-IID samples and sample sizes, which approximately corresponds to the differences in sampling scale and category coverage among multiple monitoring centers.
[0077] The classification models were trained using FedAvg with the following configuration: image size 320×320, batch size 32, number of communication rounds 50, and number of local training rounds 4. In the post-processing stage, all methods were evaluated based on the same frozen best_model, without any further parameter updates.
[0078] This invention conducted experiments on five CNN models, covering different architecture types from lightweight mobile networks to deep, large-scale networks. Among them, ResNet-50 and ResNet-101, employing residual connection structures, are the most widely used benchmark models in image recognition; DenseNet-169 uses dense connections to allow each layer to reuse features from all previous layers, resulting in high parameter efficiency; EfficientNet-V2-S achieves a balance between accuracy and computational cost through neural architecture search and compound scaling strategies; MobileNetV3-L is a lightweight model designed for mobile devices, with the fewest parameters. Table 1 provides basic information about each model.
[0079]
[0080] Table 1 (Basic Information of Five Backbones)
[0081] in, Following the empirical rules of the original ViM: models with a feature dimension greater than 1500 are considered... ,the remaining This invention uses Near-OOD AUROC and Far-OOD AUROC to measure the model's ability to distinguish between ID samples and the two classes of OOD samples, respectively. AUROC is a threshold-independent metric; the closer the value is to 1, the stronger the detection ability. For ACT-FedViM, this invention also reports the compression ratio. , is used to measure the compression effect of ACT in the principal subspace dimension.
[0082] 3. Comparison Methods
[0083] The comparative experiments of this invention are divided into two groups to verify the effectiveness of the method and the rationality of federated aggregation, respectively.
[0084] The first group compares the model with general federated OOD baselines to verify the effectiveness of the FedViM approach compared to existing federated OOD methods. The comparison methods include FedLN and FOSTER. FedLN is built on Logit-Norm: each client normalizes logits during local training, allowing the model to learn a more uniform output scale, and OOD scoring is performed using MSP after training. FOSTER, on the other hand, introduces out-class feature generation and regularization mechanisms during federated training, leveraging data heterogeneity among clients to enhance OOD detection capabilities, and also uses MSP for scoring. These two methods represent two federated OOD detection approaches: "output space normalization" and "training-time out-class regularization," respectively.
[0085] The second set of comparisons is with Pooled-ViM and Pooled-ACT-ViM to verify the rationality of federated statistic aggregation. Pooled-ViM, using the same frozen best_model as the federated version, directly aggregates the training data from the five client IDs to centrally calculate all the statistics required by ViM; Pooled-ACT-ViM is the corresponding ACT version. In this comparison, the difference between the federated and pooled versions lies in the method of statistic calculation: the former calculates in chunks before aggregation, while the latter calculates centrally. If the results are consistent, it indicates that federated aggregation does not impair ViM's discriminative behavior.
[0086] 4. Experimental Results and Analysis
[0087] 4.1 Comparative Analysis with the General Federal OOD Baseline
[0088] First, the overall performance of the method of this invention is compared with that of the general federated OOD baselines FedLN and FOSTER. Table 2 presents the average results on five backbones, and also reports the ID accuracy of each model to confirm that the OOD detection results are based on reasonable classification capabilities.
[0089]
[0090] Table 2 (ID classification accuracy of five backbones and average OOD detection results of each method)
[0091] It should be noted that FedViM and ACT-FedViM use the same frozen model trained by FedAvg, and their ID accuracy is the same. FedLN and FOSTER, however, require the introduction of their own additional mechanisms during training, and therefore are trained independently, resulting in slightly different ID accuracies compared to the FedAvg baseline. The average ID accuracy for all three training schemes is between 93% and 96%.
[0092] As shown in Table 2, both FedViM and ACT-FedViM outperform the two general federated baselines overall. Compared to FedLN, FedViM is on average 2.00 percentage points higher in Near-OOD and 7.01 percentage points higher in Far-OOD; ACT-FedViM is 4.25 and 9.22 percentage points higher, respectively. The ViM approach shows a more significant advantage compared to FOSTER. This indicates that for fine-grained tasks such as marine plankton detection, the ViM approach, which utilizes the geometric structure of the feature space, has a stronger OOD detection capability than methods that rely solely on output spatial information.
[0093] like Figure 3As shown, further observation of the model-by-model results can more clearly reveal the sources of difference.
[0094]
[0095] Table 3 (Model-by-model comparison with the general federal OOD baseline)
[0096] Table 3 shows that ACT-FedViM maintains strong competitiveness on all five backbones and significantly outperforms ResNet50, ResNet101, and DenseNet169. FedViM has consistently outperformed FedLN on four backbones, but performs poorly on DenseNet169. This is because the model's... However, its actual effective dimension is too large, resulting in excessive noise remaining in the residual space, which weakens its discriminative ability. ACT-FedViM, through adaptive dimension selection, reduces noise. The score was reduced to 77, fixing the issue. Near-OOD improved from 84.86% to 96.30%, and Far-OOD improved from 85.98% to 97.17%.
[0097] 4.2 Comparison with Pooled-ViM
[0098] To verify that the aggregation of federal statistics does not substantially change the discriminative behavior of ViM, this invention further compares FedViM with Pooled-ViM and ACT-FedViM with Pooled-ACT-ViM, such as... Figure 4 As shown. All methods here are based on the same frozen model and the same batch of training samples with the same IDs; the only difference is how the statistics are obtained. The federated version first calculates the statistics for the samples on the client side and then uploads them to the server for aggregation, while the pooled version aggregates the samples from each client and calculates the statistics centrally, which is the non-federated ViM method.
[0099]
[0100] Table 4 (Consistency verification between aggregated federal statistics and pooled statistics)
[0101] As shown in Table 4, based on the average results, the average difference between FedViM and Pooled-ViM in Near / Far-OOD is only -0.000004 and 0.000000 percentage points, respectively, and the average difference between ACT-FedViM and Pooled-ACT-ViM is only +0.000013 and +0.000004 percentage points, respectively. These differences are completely within the range of numerical error.
[0102] Table 5 further presents the model-by-model results.
[0103]
[0104] Table 5 (Model-by-model results for pooled consistency)
[0105] The results for the federated and pooled versions on all five backbones are almost completely consistent, with the largest absolute difference per model being only 0.000068 percentage points. These results indicate that the aggregation and centralized computation of federated statistics yield consistent results across all backbones, and that federation implementation has no observable impact on the discriminative behavior of ViM.
[0106] 4.3 Analysis of the ACT Module's Effectiveness
[0107] This section analyzes the compression effect of the ACT module on different backbones and its impact on detection performance.
[0108] like Figure 5 As shown, from the overall compression effect of the five backbones, ACT significantly reduces the size of the master subspace.
[0109] FedViM's average The average dimension is 804.8, while the average dimension chosen by ACT is only 103, resulting in an average compression rate of 86.75%. This means that during the deployment phase, the size of the projection matrix that needs to be preserved and the additional computational cost for residual scoring are significantly reduced.
[0110] As shown in Table 6 and Figure 6 As shown, in order to analyze the specific performance of ACT on different backbones, this invention selects three models, MobileNetV3-L, ResNet101 and DenseNet169, for further analysis, which represent three typical behaviors of ACT.
[0111]
[0112] Table 6 (Analysis of representative models in the ACT module)
[0113] On MobileNetV3-L, the principal subspace dimension decreased from 512 to 94, achieving a compression rate of 81.64%; Near-OOD decreased by only 0.39 percentage points, while Far-OOD remained almost unchanged. This demonstrates that for a lightweight backbone, ACT can achieve significant principal subspace compression at a minimal cost to accuracy.
[0114] On ResNet101, the main subspace size was reduced from 1000 to 138, resulting in a compression rate of 86.20%, while Near-OOD and Far-OOD both showed slight improvements. This demonstrates that on a high-dimensional backbone, ACT can significantly reduce the main subspace size while maintaining or even slightly improving detection performance.
[0115] On DenseNet169, the primary subspace decreased from 1000 to 77, achieving a compression rate of 92.30%; Near-OOD improved from 84.86% to 96.30%, and Far-OOD improved from 85.98% to 97.17%. As analyzed above, this significant improvement stems from ACT's fix of the reduced discriminative power of the residual space caused by an excessively large fixed-k value.
[0116] Overall, the results from the five models show that ACT achieves significant subspace compression (average compression rate of 86.75%) on all backbones, maintains or slightly improves detection performance on most models, and delivers a substantial improvement on DenseNet169. This demonstrates that ACT can address the failure of fixed-dimensional methods on specific model architectures while providing statistically driven adaptive dimension selection.
[0117] 5. Conclusion
[0118] This invention addresses the problem of "needing OOD detection capability but being unable to share raw data across centers" in multi-center plankton monitoring scenarios. It proposes the FedViM federated post-processing OOD detection method and its extension, ACT-FedViM. FedViM incorporates the global feature mean, covariance, and empirical calibration coefficients upon which ViM relies. The process is rewritten as a linear aggregation of sufficient local statistics on each client, allowing the server to accurately reconstruct the complete ViM scoring process without accessing any original images or per-sample features. ACT-FedViM builds upon this by introducing the ACT mechanism, changing the selection of the principal subspace dimension from a fixed empirical value to a statistically driven adaptive estimate.
[0119] Experiments on five CNN backbones of the DYB-PlanktonNet dataset show that FedViM and ACT-FedViM outperform the general federated OOD baselines FedLN and FOSTER in both Near-OOD and Far-OOD scenarios. ACT-FedViM achieves average Near-OOD / Far-OOD AUROCs of 96.37% and 96.60%, respectively. Comparison experiments with Pooled-ViM show that the difference between federated aggregation and centralized computation is on the order of numerical error, validating the accuracy of federated statistics reconstruction. The ACT module achieves an average principal subspace compression rate of 86.75% on the five backbones and has fixed issues on Densenet169. The problem of performance degradation caused by excessive size.
[0120] The examples provided in this invention are not intended to limit the implementation. Those skilled in the art will recognize that various variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations, and any obvious variations or modifications derived therefrom remain within the scope of this invention.
Claims
1. A distributed image detection method based on multi-center plankton monitoring, characterized in that, Includes the following steps: Step S1: Construct a federated learning system consisting of one server and N clients, where each client holds a local training set of labeled plankton images. ,in, Images of plankton, For the corresponding known category labels, For the client The number of local samples is limited, and original images are not shared between clients. FedAvg algorithm is used for federated training to obtain a global classification model, which includes a feature extractor. and classification head ; Step S2: Fix the global classification model parameters obtained from step S1; each client uses the frozen feature extractor. Extract features from local training samples of known categories and compute first-order statistics locally. Second-order statistics and sample size The data is then uploaded to the server; the server aggregates the statistics from each client. , , And reconstruct the global feature mean based on the aggregated statistics. and global feature covariance ; Step S3: The server reconstructs the global feature covariance matrix based on the data obtained in step S2. Perform principal component analysis and select the components according to predetermined rules. Construct the principal subspace matrix in each principal direction ,in, For feature dimensions; the server will use the principal subspace matrix. and global feature mean Distribute to each client; Step S4: Each client, using the data received in step S3, applies the training samples of known local categories. and Calculate the energy term and residuals ,in, Given the total number of categories, The matrix is an identity matrix; each client calculates the sum of energy locally. Summation of residuals The data is then uploaded to the server; the server aggregates the data and calculates the empirical calibration coefficients. ; Step S5: For the plankton image sample to be detected Calculate its OOD score ;like If the value is less than a preset threshold, the sample is determined to be an out-of-distribution sample; otherwise, it is determined to be a sample of a known category.
2. The method according to claim 1, characterized in that, Each round of communication in the FedAvg algorithm described in step S1 includes: the server sending the current global model parameters to each client; each client performing several rounds of local training on local data; each client uploading its local model update to the server; and the server aggregating the model updates from each client by weighted average based on the number of samples.
3. The method according to claim 1, characterized in that, The global feature mean mentioned in step S2 and global feature covariance The reconstruction is mathematically identical to the result of directly calculating all samples on the server.
4. The method according to claim 1, characterized in that, The predetermined rule mentioned in step S3 is a fixed empirical value rule, that is... Take a preset fixed value.
5. The method according to claim 1, characterized in that, The predetermined rule mentioned in step S3 is an adaptive dimension selection rule based on ACT, specifically including: The global covariance matrix reconstructed in step S2 Constructing the sample correlation matrix ,in, For the reason A diagonal matrix consisting of diagonal elements; remember The descending sample feature value is Calculate the corrected eigenvalues according to the ACT rule. With threshold ; The adaptive principal subspace dimension is determined by Sure; server in Principal component analysis was performed on the above, and the previous values were retained. Construct the principal subspace matrix in each principal direction .
6. The method according to claim 1, characterized in that, The empirical calibration coefficient mentioned in step S4 Used to balance energy terms With residuals The difference in dimensions between them.
7. The method according to claim 1, characterized in that, The preset threshold in step S5 is selected as follows: on a known category validation set, the corresponding quantile is determined as the threshold according to the preset false rejection rate requirement.
8. The method according to claim 1, characterized in that, The planktonic images include microscopic images of planktonic organisms acquired by flow cytometry or in-situ imaging equipment.
9. The method according to claim 1, characterized in that, The off-distribution samples include Near-OOD samples and Far-OOD samples. The Near-OOD samples are unseen species that are morphologically similar to known categories, while the Far-OOD samples are non-target samples that are significantly different from known plankton.
10. The method according to any one of claims 1 to 9, characterized in that, The method described is a post-processing method and does not change the objective function and training process of federated classification training in step S1.