A target detection optimization and acceleration method based on a diffraction neural network

By performing feature extraction, domain adaptation and lightweight processing on the diffraction neural network model, the problem of decreased generalization ability caused by data distribution differences in cross-domain detection tasks is solved, and efficient and stable target detection is achieved in different scenarios.

CN119516163BActive Publication Date: 2025-10-17SOUTH CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411526094.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-10-17
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In cross-domain detection tasks, due to the large difference in data distribution between the source domain and the target domain, the generalization ability of the model is reduced. The existing target detection method based on diffraction neural network has poor detection accuracy in different application scenarios.

Method used

The source domain data is feature extracted based on a pre-trained diffraction neural network model, and the model parameters are adjusted to match the target domain data distribution using a domain adaptation algorithm. The generalization ability is enhanced through optimization iteration, and the model is finally lightweighted to accelerate target detection.

Benefits of technology

The model's generalization ability and detection speed in cross-domain detection tasks have been improved, ensuring efficient and stable target detection in different scenarios, adapting to changes in complex environments and reducing computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516163B_ABST
    Figure CN119516163B_ABST
Patent Text Reader

Abstract

The application provides a target detection optimization and acceleration method based on a diffraction neural network, comprising: performing feature extraction on source domain data based on a pre-trained diffraction neural network model; adjusting model parameters by using a domain self-adaptation algorithm to match target domain data distribution; performing optimization iteration in the target domain based on the adapted model to enhance the generalization capability; and performing lightweight processing on the optimized diffraction neural network model to accelerate target detection. Through the scheme of the embodiment of the present disclosure, the problem of decreased generalization capability caused by the difference in data distribution between the source domain and the target domain in the cross-domain detection task can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to computer vision and artificial intelligence, in particular to a target detection optimization and acceleration method based on diffraction neural network. BACKGROUND

[0002] In the field of target detection, deep learning technology has made significant progress, especially in handling complex images and large-scale datasets, its excellent performance has attracted much attention. However, with the increase of data size and the complexity of the scene, the traditional deep learning target detection method is limited in processing speed and efficiency. In order to solve this problem, researchers have proposed a target detection optimization and acceleration method based on diffraction neural network.

[0003] This method combines the advantages of light diffraction characteristics and deep learning technology, and can significantly improve the speed and efficiency of target detection while maintaining high accuracy. By using diffraction neural network, this method has strong application potential in handling large-scale datasets and complex scenes. Specifically, the diffraction neural network enhances the detection ability of the target by simulating the diffraction characteristics of light in the propagation process, greatly improving the performance of the target detection system. However, although this target detection method based on diffraction neural network performs well in a single field, it still faces certain challenges in cross-domain detection tasks. These challenges mainly come from the large difference in data distribution between the source domain and the target domain, which leads to the decline of the generalization ability of the model. In different application scenarios, the detection accuracy of the model is often not as good as in the training data, and this performance decline is one of the key obstacles that need to be overcome in current research. SUMMARY

[0004] Therefore, the embodiments of the present disclosure provide a target detection optimization and acceleration method based on diffraction neural network, which at least partially solves the problems existing in the prior art.

[0005] A target detection optimization and acceleration method based on diffraction neural network, comprising:

[0006] performing feature extraction on source domain data based on a pre-trained diffraction neural network model;

[0007] adjusting model parameters using a domain adaptation algorithm to match the data distribution of the target domain;

[0008] performing optimization iteration in the target domain based on the adapted model to enhance the generalization ability;

[0009] performing lightweight processing on the optimized diffraction neural network model to accelerate target detection.

[0010] In one embodiment, the step of feature extraction from source domain data based on a pre-trained diffraction neural network model comprises:

[0011] extracting base features of source domain images based on the first layer network of the pre-trained model;

[0012] further extracting higher level features through filter combination at the second layer;

[0013] identifying and focusing on key feature regions using an attention mechanism;

[0014] integrating low-level and high-level feature information using a feature fusion strategy.

[0015] In one embodiment, the step of adjusting model parameters to match the distribution of target domain data using a domain adaptation algorithm at step comprises:

[0016] collecting sample label information of source and target domains and merging them to form a temporary dataset;

[0017] calculating the covariance of sample features in the merged dataset;

[0018] If the covariance σ(source, target) satisfies the condition σ(source, target) < θ (where σ represents the degree of feature difference between the source and target domains, and θ is a set domain adaptation threshold), it means that the feature difference between the source and target domains is small enough, and the model parameters do not need to be adjusted;

[0019] If the condition is not met, perform adaptive model updating until σ(source, target) falls below θ, thereby achieving model adaptation to the target domain.

[0020] In one embodiment, the step of performing optimization iteration on the target domain based on the adapted model comprises:

[0021] performing regularization optimization iteration based on the base model generated by the adaptive algorithm at the initial stage;

[0022] Select the top K models by sorting the cross-validation scores of each training result;

[0023] Calculate the relationship between the prediction accuracy P on the target domain and the source domain accuracy Psrc according to the selected model: if (P / Psrc) > α (where P represents the prediction performance on the target domain, Psrc represents the prediction performance on the source domain, and α is the expected improvement ratio), it means that the optimized model has high generalization ability;

[0024] Continue to optimize until (P / Psrc) is not less than the preset proportion standard α.

[0025] In one specific embodiment, the optimized diffraction neural network model is subjected to lightweight processing to accelerate target detection, including:

[0026] compressing the original model parameters;

[0027] cutting part of the unnecessary convolution layer under the premise of ensuring that the detection accuracy is not significantly affected;

[0028] According to the volume reduction ratio v of the new model and the prediction rate increase multiple r of the processed model, the rationality and effectiveness of the lightweight scheme are evaluated, and the condition judgment formula is v x r > λ (here v represents the proportion of reduction of model parameter quantity relative to the original volume, r represents the target detection time improvement coefficient, and λ is the threshold of lightweight efficiency evaluation index);

[0029] When the method meets the lightweight target, the model slimming process is completed, otherwise the model needs to be fine-tuned and the lightweight evaluation is repeated until the standard is met.

[0030] In one specific embodiment, after the lightweight process is performed using the above methods, subsequent evaluation and adjustment work is also required:

[0031] Perform comprehensive regression verification to detect whether the modified neural network can maintain good detection effect under various conditions;

[0032] Set the evaluation threshold β to ensure the stability of the model performance in different environments and data distribution scenarios, and the judgment condition is that the average detection error d ≤ β (d is the average deviation, and β is one of the upper and lower limits of the allowable error range);

[0033] Based on multiple sets of comparison test data, the performance difference between the final version of the lightweight diffraction neural network and the original version is analyzed to ensure effective support in actual application scenarios;

[0034] Combined with actual needs, all the above steps may be iterated again for further optimization and adjustment until the most stringent cross-domain generalization performance requirements are met.

[0035] In one specific embodiment, S1 includes:

[0036] Incremental learning is used to continuously train the diffraction neural network model, so that it can adapt to newly added source domain data without retraining the entire model, and the incremental learning process can be represented as:

[0037]

[0038] wherein, represents the newly added source domain data, θ (old) represents the existing model parameters, represents the new data features;

[0039] The feature pyramid network is used to enhance the multi-scale feature extraction effect of the source domain data, and the feature fusion process of the feature pyramid network is represented as:

[0040]

[0041] wherein F (l) represents the features of each layer of the diffraction neural network, w l represents a weight factor, F FPN represents the fused multi-scale feature representation.

[0042] The embodiment of the present disclosure provides a target detection optimization and acceleration method based on a diffraction neural network, which comprises: performing feature extraction on source domain data based on a pre-trained diffraction neural network model; adjusting model parameters by using a domain self-adaptation algorithm to match target domain data distribution; performing optimization iteration in the target domain based on the adapted model to enhance the generalization ability; and performing lightweight processing on the optimized diffraction neural network model to accelerate target detection. Through the scheme of the embodiment of the present disclosure, the problem of decline in generalization ability caused by differences in data distribution between the source domain and the target domain in the cross-domain detection task can be solved. BRIEF DESCRIPTION OF DRAWINGS

[0043] In the drawings, like reference numerals refer to same or similar components throughout the several views. These drawings are not necessarily to scale. It should be understood that these drawings only depict some embodiments in accordance with the present disclosure and should not be considered as limiting the scope of the present disclosure.

[0044] Figure 1 is a flowchart of a target detection optimization and acceleration method based on a diffraction neural network. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, further detailed description of the embodiments of the present disclosure will be given below in combination with the embodiments and drawings, and the schematic embodiments and their descriptions are only used to explain the embodiments of the present disclosure, and should not be considered as limiting the embodiments of the present disclosure.

[0046] As Figure 1As shown, a target detection optimization and acceleration method based on a diffraction neural network includes the following key steps: feature extraction of source domain data based on a pre-trained diffraction neural network model; adjustment of model parameters using a domain adaptation algorithm to match the target domain data distribution; optimization iteration in the target domain based on the adapted model to enhance the generalization ability; and lightweight processing of the optimized diffraction neural network model to accelerate target detection. This process solves the performance decline in cross-domain detection tasks caused by different data distributions of the source domain and the target domain, and improves the universality and application efficiency of the model.

[0047] The first step of the method involves extracting preliminary features through a pre-trained base model, preferably a diffraction neural network (such as an AI framework supported by a photonic chip constructed based on physical optics principles). For example, in a specific case, before identifying military vehicle types, a pre-trained base model using a large-scale labeled rich civilian image library is used to capture general feature information such as object contours or local structure patterns.

[0048] The second step introduces inter-domain adaptability technology to alleviate the model mismatch problem caused by environmental changes. This is usually achieved by adding a new loss function or using a generative adversarial network (GAN) to simulate more representative mixed samples. Specifically, in the above military application scenario, if the target domain refers to actual combat environment images taken by a drone, the pre-set neural network layers can be fine-tuned to introduce environmental elements that are not present in source images but are unique to target images, such as specific lighting changes, terrain texture details, or color shifts under different weather conditions.

[0049] The third step then focuses on further developing deep optimization activities on the preliminary corrected system using corrected target domain-specific attributes to ensure that the model exhibits more stable and accurate discrimination ability when deployed in real-life reconnaissance of unknown but potentially threatening areas - in other words, enhancing the precise positioning and identification of military equipment under various scene conditions. In a specific embodiment, this process may combine real-time feedback information to iteratively update pre-defined target object classification labels until a point is reached that maximizes the discrimination degree while minimizing false positives; after multiple cycles, the method can achieve high detection quality and robustness for any input image.

[0050] The last step is to further reduce the operation complexity and storage cost without significantly losing the recognition accuracy by removing redundancy, compressing and even simplifying the architecture of the complete version of the above-mentioned model. For example, the system is widely used in the front-line sentry system for long-term remote monitoring or in the small patrol team equipped with portable handheld devices. In particular, in the case of limited resources, the whole process needs to respond quickly and give immediate analysis conclusions, which shows the value of this method. Therefore, this method not only involves pruning the original weight value by a certain percentage, but also may use similar weight sharing mechanism and reduce the number of internal layers to promote the efficient implementation of target detection, and thus provide users with a more smooth and practical tool.

[0051] Step S1 includes:

[0052] Incremental learning is used to continuously train the diffraction neural network model, so that it can adapt to newly added source domain data without retraining the entire model. The incremental learning process can be represented as:

[0053]

[0054] wherein, represents the newly added source domain data, θ (old) represents the existing model parameters, represents the new data features;

[0055] A feature pyramid network is used to enhance the multi-scale feature extraction effect of the source domain data. The feature fusion process of the feature pyramid network is represented as:

[0056]

[0057] wherein, F (l) represents the feature of each layer of the diffraction neural network, w l represents the weight factor, F FPN represents the fused multi-scale feature representation.

[0058] Next, the step of extracting features from source domain data based on the pre-trained diffraction neural network model of the present application is described. This process mainly includes extracting basic features of the source domain image based on the first layer network of the pre-trained model; further extracting higher-level features by combining filters in the second layer; using attention mechanism to identify and focus on key feature areas; and finally applying feature fusion strategy to integrate low-level and high-level feature information.

[0059] The first layer network based on pre-trained model is mainly responsible for capturing the most basic information from the input source domain image, such as the corner of the image and other basic graphical structure features. This layer is usually pre-trained on a large dataset and fine-tuned in the current task to adapt to the specific data distribution, improving the model's ability to adapt to a specific source domain. For example, in the target detection scenario, this stage can extract preliminary texture and color information from surveillance video images containing various environments to provide necessary support for subsequent processing.

[0060] Next, the second layer network uses a variety of combined filters to process the basic features obtained by the first layer network, thereby obtaining more advanced abstract representation capabilities. This step involves using more complex filter operators in different scales or shape directions. In one embodiment, for the pedestrian detection application scenario, the second layer will start from the body edge features obtained by the first layer to identify higher-dimensional patterns such as possible pedestrian arms or torso outlines, further helping the model to distinguish non-human objects.

[0061] Then, the model's built-in attention mechanism component is used to select important parts, enhance the detail description effect at the significant position, and ignore irrelevant noise interference factors. This technology allows the neural network to dynamically adjust the focus on some parts of the image. Specifically, in the practice of target detection, the system can more sharply lock the suspicious figure, without being distracted by the surrounding less important background, significantly improving the recognition rate and speed.

[0062] Finally, after obtaining two sets of distinct but indispensable important information from simple to bottom and complex to top, the customized feature aggregation method is used to effectively combine them to achieve a complementary state, realizing the establishment and improvement of the final high-quality feature vector as the basis for subsequent algorithm use. For example, in a security camera analysis software project developed based on the diffraction principle, the final step enables the system to quickly and reliably complete the accurate real-time detection of objects, especially moving life forms such as pet cats and dogs, and even humans, under different lighting conditions, and quickly respond or send notifications to the user's hand. As for the feature weighting function F(w), where w = (w1, w2,.., wn) T represents a series of importance measure vector elements for each level of features. This w needs to be iteratively optimized through backpropagation and supervised feedback, and there is no fixed initial configuration or absolute best solution. Reasonable configuration should be personalized designed and adjusted according to the specific problem type and target sample characteristic distribution in the training set to improve accuracy and efficiency performance.

[0063] Next, the step of adjusting model parameters to match the target domain data distribution using domain adaptation algorithm in the step of the application is described. First, collect the sample label information of the source domain and the target domain, and combine the two data sets to create a new temporary data set. The key operation in this process is to organize and merge the data labels of different data sources to ensure that each sample has a corresponding classification label for the next step of analysis. For example, in the implementation process of a target detection optimization and acceleration method based on a diffraction neural network, data from the actual detection site (target domain) and its labeled information are combined with the previous laboratory training data (source domain) to establish a comprehensive data set.

[0064] Second, the covariance of the sample features in the above data set is calculated to quantify the difference between different domains. Here, σ represents the intensity and pattern difference of the variation between different sample features caused by the difference between the source domain and the target domain; θ is a predetermined threshold or standard for judging the importance threshold of the difference, which can be adjusted within a reasonable range according to the actual situation, but its effectiveness should be ensured to promote the migration effect of the final model. Specifically, covariance is a statistical index used to measure the linear dependence between two or more variables. If the feature covariance σ between the source domain and the target domain is less than the preset domain adaptation threshold θ, it is considered that the existing model parameters are good enough and do not need to be further adjusted to be applicable to the new environment; however, if σ is greater than or equal to θ, it indicates that there is significant inconsistency between the features of the two, and there is a domain shift, so the next stage of improving the model to better meet the target data characteristics is entered.

[0065] When it is determined that there is a significant gap between the source domain and the target and domain adaptation is needed, the adaptive model update is started. This procedure repeatedly modifies the internal structure parameters of the neural network until the revised version can reduce or even eliminate the previously identified differences, i.e., the source domain and target domain feature distribution reaches the expected level of consistency. In one embodiment, if the initial diffraction neural network has high accuracy for targets labeled in a laboratory environment but significantly degraded performance in a field environment, the adjustment is made until similar accuracy is achieved in the field environment, which ensures that the model has strong generalization ability and can effectively detect specific targets in various situations, not just in the initial learning context. The adjustment process involves continuously evaluating and updating connection weights, biases, and other model hyperparameters using a domain adaptation algorithm until the measured new σ is less than or equal to the established standard, thereby achieving the final effect of adapting the machine learning framework to accurately serve the target application scenario. Such a formalized process is to ensure that the adjustment is not blind, and each iteration effectively reduces the prediction error in the subtask and develops towards reducing the potential difference between the source domain and the target domain, thereby ensuring the effective transformation of the algorithm and the successful landing of the actual operation.

[0066] Next, the application of the adapted model to perform optimization iteration steps in the target domain is described. The steps begin with performing regularization optimization iterations based on the base model generated by the adaptation algorithm in the initial stage. This process aims to use the adjusted base model to avoid overfitting by adding constraints to the network parameters and improve the generalization ability. In the diffraction neural network target detection, this approach can improve the accuracy of identifying specific object types (such as vehicles or pedestrians) and reduce the probability of false positives.

[0067] Subsequently, after each iteration of training, cross-validation techniques are applied to evaluate the performance of all resulting models. By scoring and ranking these results, the top K candidate models are selected for the next stage of work. Here, the cross-validation score provides a measure of the performance of each sub-model when evaluated on a subset of data it has not seen, helping to determine which configuration best generalizes to new scenarios. For example, in one embodiment, when using a five-fold cross-validation technique, the final model pool is reduced to the top three options with the most stable performance.

[0068] Next, the prediction performance of the selected best-performing model in the actual use environment (i.e., real traffic monitoring camera data in this example) is compared with its performance on the original training dataset (captured image data in the simulation environment). Specifically, by measuring the precision (prediction accuracy) ratio of both, i.e., P divided by P src exceeds the threshold value α. Assuming α is set to 0.9 means that the system must demonstrate that its target recognition effect in unknown areas can almost reach 90% of the performance level in the source environment, so setting it can ensure that there is still high recognition accuracy and adaptability across scenarios; if the actual detection result, such as the vehicle recognition accuracy of a city night street camera capture segment, reaches 90% or more compared to the accuracy ratio of the same model on the test video, it can be proved that this version has the value of online deployment without excessive adjustment.

[0069] The above process is iterated continuously until P / P src reaches a level not lower than α standard to ensure continuous improvement throughout the process and ultimately obtain a highly efficient model with excellent stability and generalization across different domains to complete the accelerated detection work. In this case, assuming that the initial model achieves 95% accuracy in the simulation environment and achieves a stable detection rate of 82%-87% after a series of adjustments and training for actual road conditions means that its relative proportion meets the established standard and is suitable for subsequent operation or commercial use as a final product.

[0070] Next, the application of the optimized diffraction neural network model for lightweight processing to accelerate target detection is described. The specific process is as follows:

[0071] One of the steps is to compress the existing model parameters. This involves reducing the redundant weights in the model to reduce the model size. During this process, techniques such as quantization or sparsification are used to reduce the parameter storage and computational complexity. For example, in one embodiment, for a specific diffractive neural network, a 3-bit quantization technique is used to reduce the storage required for each weight representation, making the entire network model more efficient.

[0072] Secondly, further reduce the model complexity by removing some unnecessary convolution layers according to the principle of having no significant adverse effect on detection accuracy. This pruning can effectively reduce the computational burden without significantly sacrificing performance. Specifically, by analyzing the importance ranking of different layers on the overall prediction quality, it is determined which are the secondary components, and after ensuring that the accuracy is maintained within an acceptable level, they are deleted.

[0073] Then, the value of the measures taken is determined according to the relationship between the product calculated by the reduced volume ratio v and the acceleration ratio r and the pre-set threshold parameter λ. The formula is v x r > λ, where v represents the degree of reduction relative to the total number of parameters under the unmodified condition (value between 0 and 1); r represents how many times faster the processed version is compared to the original form, and the larger the ratio, the more ideal the speed optimization; and λ is the light simplification judgment standard, generally set in the interval [0.2, 0.9]. Choosing a higher value can guarantee higher optimization effect.

[0074] Finally, when the measures taken meet the pre-set conditions (i.e. v x r > λ is true), it means that the expected simplification and speed improvement purposes are achieved; if not, appropriate adjustments such as slight weight correction or layer adjustment need to be made until the evaluation results are satisfactory. In one example, through repeated testing, the appropriate proportion v = 0.7 (volume reduction percentage of seventy percent) is found, r reaches 3 (execution speed is three times faster), and λ = 1.6 is confirmed to be appropriate, then the final lightweight model achieves the ideal optimization effect.

[0075] Next, the subsequent evaluation and adjustment work after the lightweight process is performed using the above methods is described: a comprehensive regression verification is performed to detect whether the modified neural network can maintain good detection effect under various conditions; an evaluation threshold β is set to ensure the stability of the model performance under different environmental and data distribution scenarios, the judgment condition is that the average detection error d ≤ β (d is the average deviation, β is one of the upper and lower limits of the allowable error range); based on multiple sets of comparison test data, the performance difference between the final version of the lightweight diffractive neural network and the original version is analyzed to ensure effective support in actual application scenarios; all the above steps may be iterated again to further optimize and adjust according to actual needs until the most stringent cross-domain generalization performance requirements are met.

[0076] A comprehensive regression validation is performed to assess and ensure that the lightened diffraction neural network maintains stable performance under different input environments. This test covers a wide range of application cases to check the network's performance in diverse and challenging environments. For example, when developing a road object detection system for unmanned vehicles, it is necessary to test the lightened network under various light changes and weather conditions to ensure that the system not only works correctly in ideal environments but also remains reliable under complex conditions.

[0077] During this validation process, an evaluation threshold β (usually a small predetermined value such as 0.05) is set as a tolerance control for performance degradation. The purpose is to ensure that even if lightening brings some performance sacrifice, it does not fall below the acceptable working standard by setting the d value (representing the average difference between the network's predicted output and the true output under certain conditions). Specifically, when improving the city monitoring system and wanting to retain face recognition functionality, if the average deviation d obtained from testing in a large face data set exceeds the predetermined 0.05, it indicates that the model is not stable or accurate enough, and the threshold β needs to be adjusted for retesting until the condition d≤0.05 is met to be considered a qualified model, because it is necessary to ensure that even in the face of different light angles or occlusion, the face can still be effectively recognized.

[0078] Next, a series of detailed comparative tests are conducted to collect and analyze actual running data from different sources and settings to make the final decision. This step is crucial to determine whether the modified version meets the initial efficiency goals and maintains the desired accuracy level. Assuming that a security company integrates this technology into mobile patrol equipment, it needs to be tested in the real world before deployment. For example, comparing the speed and accuracy of identifying suspicious luggage at the airport security checkpoint with the original version of the system, it is confirmed that the lightened network not only significantly improves speed but also maintains a high level of security, proving that it meets the needs of commercial applications.

[0079] Given that user feedback or other emerging requirements may change over time, even if the initial version has met the basic standards, it is still necessary to continuously monitor system performance and make further improvements if necessary, and this process is repeated until an optimal solution is obtained that can function stably in a wider range of fields. For example, if in the next few years it is found that some types of targets are difficult to accurately track or that the existing model becomes inadequate as camera quality improves, it means that it is necessary to return to the design optimization stage mentioned earlier to explore more suitable methods or technology upgrades. This shows that even seemingly completed products need to adapt to the changing environment of the times, and only by continuously updating and adapting can a strong detection platform that withstands the test of time be ultimately created.

[0080] The target detection optimization and acceleration method based on a diffraction neural network includes a series of innovative designs and optimizations for the key difficulties of the prior art in cross-domain detection tasks.

[0081] First, a pre-trained diffraction neural network model is applied to extract high-level features from data from a specific source domain. This process helps to preserve the core characteristics of the original information while avoiding the time cost of repeatedly training the base model. However, in actual scenarios, different source domains and the target domain involved in the final application environment often have significant differences, which tests the effective applicability of the model.

[0082] To effectively overcome this difficulty, the method then takes the second step of using a domain adaptation algorithm to optimize the previously obtained feature extractor. Specifically, without changing the overall architecture, the difference between the two distributions (such as the source domain and the new environment) is minimized to ensure that the entire network can still work stably in unseen situations. This operation can greatly enhance the flexibility and accuracy of the model when facing unknown environments.

[0083] Next is the key stage: based on the adapted new model, an optimization cycle is carried out in the actual target application scenario. By continuously experimenting and learning the details of new samples, the network structure is gradually corrected to become more robust and improve the generalization to adapt to more challenging scenarios. This makes the entire process not only quickly adapt to external changes in rapid changes but also has good potential for continuous development.

[0084] Finally, on the basis of ensuring that the accuracy performance indicators meet the requirements, the overall structure is designed to be lightweight. This step is a strategic decision made to improve the operation speed and reduce the computational cost, allowing the improved detection tool to quickly respond to user requests and reduce the cost pressure at the hardware level. The entire scheme aims to build a powerful system that can cross different environments while maintaining excellent detection functions and processing speed. As can be seen, the invention forms an effective technical solution by carefully controlling each important link, successfully addressing the performance degradation defects of traditional models in cross-domain environments, and pushing the technical level of related application fields to a new height.

[0085] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A target detection optimization and acceleration method based on diffraction neural network, characterized in that: include: S1, extract features from source domain data based on the pre-trained diffractive neural network model; S2, using domain adaptation algorithms to adjust model parameters to match the target domain data distribution; S3, perform optimization iterations in the target domain based on the adapted model to enhance generalization ability; S4, performing lightweight processing on the optimized diffraction neural network model to accelerate target detection; The method of adjusting the model parameters by using a domain adaptation algorithm to match the target domain data distribution includes: Collect sample label information of the source domain and the target domain, and merge the two to form a temporary dataset; Calculate the covariance of sample features in the merged dataset; If the covariance σ between the source domain and the target domain satisfies the condition σ < θ, where σ represents the covariance between the source domain and the target domain, and θ is the set domain adaptation threshold, then there is no need to adjust the model parameters; If this condition is not met, the adaptive model update is performed until σ drops below θ, thereby achieving model adaptation to the target domain; Said S1 comprises: Incremental learning is used to continuously train the diffractive neural network model so that it can adapt to newly added source domain data without retraining the entire model. The incremental learning process can be expressed as: ; in, Indicates the newly added source domain data. represents the existing model parameters, Represent new data features; The feature pyramid network is used to enhance the multi-scale feature extraction effect of the source domain data. The feature fusion process of the feature pyramid network is expressed as: ; in, represents the characteristics of each layer of the diffractive neural network, represents the weight factor, Represents the fused multi-scale feature representation.

2. The target detection optimization and acceleration method based on diffraction neural network according to claim 1, characterized in that: The feature extraction of source domain data based on the pre-trained diffractive neural network model includes: The first layer of the network based on the pre-trained model extracts the basic features of the source domain image; In the second layer, higher-level features are further extracted through filter combination; Use attention mechanism to identify and focus on key feature areas; Feature fusion strategies are applied to integrate low-level and high-level feature information.

3. The target detection optimization and acceleration method based on diffraction neural network according to claim 1 is characterized in that: The performing optimization iterations in the target domain based on the adapted model includes: Perform regularized optimization iterations based on the base model generated by the adaptive algorithm in the initial stage; Select the best top K models by ranking the cross-validation scores for each training result; Calculate the prediction accuracy P on the target domain and the source domain accuracy P based on the selected model src Relationship: The condition is if P / P src >α; Continue to optimize until P / P src Not less than the preset ratio standard α, where P represents the target domain prediction performance, P src represents the source domain prediction performance, and α is the expected improvement ratio.

4. The target detection optimization and acceleration method based on diffraction neural network according to claim 3 is characterized in that: Lightweight processing of the optimized diffraction neural network model to accelerate target detection includes: Compress the original model parameters; Cut some unnecessary convolution layers while ensuring that the detection accuracy is not significantly affected; The rationality and effectiveness of the lightweighting scheme are evaluated based on the volume reduction ratio v of the new model and the predicted rate increase multiple r of the processed model. The conditional judgment formula is v×r>λ, where λ is the threshold value of the lightweighting efficiency evaluation index. When the adopted method meets the lightweighting target, the model slimming process is completed. Otherwise, it needs to be fine-tuned and the lightweighting evaluation is repeated until it meets the standard.

5. The target detection optimization and acceleration method based on diffraction neural network according to claim 4 is characterized in that: After implementing the lightweighting process using the above methods, subsequent evaluation and adjustment work is required: Perform comprehensive regression validation to test whether the modified neural network can maintain good detection performance under various conditions; Setting the evaluation threshold β ensures the stability of the model performance in different environments and data distribution scenarios. The judgment condition is that the average detection error d ≤ β, where d is the average deviation and β is one of the upper and lower limits of the allowable error range; Analyze the performance differences between the final version of the lightweight diffractive neural network and the original version based on multiple sets of comparative test data to ensure effective support for practical application scenarios; Based on actual needs, all the above steps are iterated again to further optimize and adjust until the most stringent cross-domain generalization performance requirements are met.

Citation Information

Patent Citations

  • Supersonic combustion chamber multi-physics field intelligent prediction method and visualization system

    CN118504434A

  • Fault diagnosis method for intra-class self-adaptive bearing under variable working conditions

    WO2021243838A1