Target detection optimization and acceleration method based on diffraction neural network
By using pre-trained diffraction neural network model in cross-domain detection tasks for feature extraction and model parameter adjustment, combined with optimization iteration and lightweight processing, the problem of generalization ability decline in cross-domain detection is solved, and efficient target detection in different scenarios is achieved.
Patent Information
- Application Number
- CN202411526094.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-30
AI Technical Summary
In cross-domain detection tasks, due to the large differences in data distribution between source and target domains, the generalization ability of the model is reduced, and the detection accuracy is not as good as that in the training data.
The pre-trained diffraction neural network model is used to extract the source domain data, and the domain adaptive algorithm is used to adjust the model parameters to match the target domain data distribution. The generalization ability of the model is enhanced through optimization iteration, and the model is lightweighted to accelerate target detection.
Through this method, the problem of degradation of generalization capabilities in cross-domain detection tasks can be effectively solved, the detection accuracy and efficiency of the model in different scenarios can be improved, and efficient cross-domain target detection can be achieved.
Smart Images

Figure CN119516163A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to computer vision and artificial intelligence, and specifically to a target detection optimization and acceleration method based on a diffraction neural network. Background Art
[0002] In the field of target detection, deep learning technology has made significant progress, especially in processing complex images and large-scale data sets, and its excellent performance has attracted much attention. However, with the increase in data size and the increase in scene complexity, traditional deep learning target detection methods are subject to certain limitations in processing speed and efficiency. To solve this problem, researchers proposed a target detection optimization and acceleration method based on diffractive neural network.
[0003] This method combines the diffraction properties of light with the advantages of deep learning technology, and can significantly improve the speed and efficiency of target detection while maintaining high accuracy. By utilizing diffraction neural networks, this method shows strong application potential when dealing with large-scale data sets and complex scenes. Specifically, diffraction neural networks enhance the detection ability of targets by simulating the diffraction characteristics of light during propagation, greatly improving the performance of target detection systems. However, although this target detection method based on diffraction neural networks performs well in a single field, it still faces certain challenges in cross-domain detection tasks. These challenges mainly stem from the large difference in data distribution between the source domain and the target domain, which leads to a decrease in the generalization ability of the model. In different application scenarios, the detection accuracy of the model is often not as good as its performance in the training data. This performance degradation is one of the key obstacles that need to be overcome in current research. Summary of the invention
[0004] In view of this, an embodiment of the present disclosure provides a target detection optimization and acceleration method based on a 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 a diffraction neural network, comprising:
[0006] Feature extraction of source domain data based on pre-trained diffractive neural network model;
[0007] Use domain adaptation algorithms to adjust model parameters to match the target domain data distribution;
[0008] Perform optimization iterations in the target domain based on the adapted model to enhance generalization capabilities;
[0009] The optimized diffraction neural network model is lightweight to accelerate target detection.
[0010] In a specific embodiment, the step of extracting features from source domain data based on a pre-trained diffractive neural network model includes:
[0011] The first layer network based on the pre-trained model extracts the basic features of the source domain image;
[0012] In the second layer, higher-level features are further extracted through filter combinations;
[0013] Use attention mechanism to identify and focus on key feature areas;
[0014] Feature fusion strategies are applied to integrate low-level and high-level feature information.
[0015] In a specific implementation, the step of using a domain adaptation algorithm to adjust the model parameters to match the target domain data distribution includes:
[0016] Collect sample label information of the source domain and the target domain, and merge the two to form a temporary dataset;
[0017] Calculate 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 domain and the target domain, and θ is the set domain adaptation threshold), it means that the feature difference between the source domain and the target domain is small enough, and there is no need to adjust the model parameters;
[0019] If this condition is not met, the adaptive model update is performed until σ(source, target) drops below θ, thereby achieving model adaptation to the target domain.
[0020] In a specific embodiment, performing the optimization iteration step in the target domain based on the adapted model specifically includes:
[0021] Perform regularized optimization iterations based on the base model generated by the adaptive algorithm in the initial stage;
[0022] Select the best top K models by ranking the cross-validation scores for each training result;
[0023] The relationship between the prediction accuracy P on the target domain and the source domain accuracy Psrc is calculated based on the selected model: if (P / Psrc)>α (where P represents the prediction performance of the target domain, Psrc represents the prediction performance of the source domain, and α is the expected improvement ratio), it indicates that the optimized model has a high generalization ability;
[0024] Continue to optimize until (P / Psrc) is not lower than the preset ratio standard α.
[0025] In a specific embodiment, lightweight processing of the optimized diffraction neural network model to accelerate target detection includes:
[0026] Compress the original model parameters;
[0027] Cut some unnecessary convolutional layers while ensuring that the detection accuracy is not significantly affected;
[0028] The rationality and effectiveness of the lightweight solution are evaluated based on the new model volume reduction ratio v and the model prediction rate increase multiple r after processing. The conditional judgment formula is v×r>λ (where v represents the ratio of the model parameter volume to the original volume reduction, r represents the target detection time improvement coefficient, and λ is the threshold value of the lightweight efficiency evaluation index);
[0029] When the adopted method meets the lightweight target, the model slimming process is completed. Otherwise, it needs to be fine-tuned and the lightweight evaluation repeated until it meets the standard.
[0030] In a specific implementation, after the lightweighting process is performed using the above methods, subsequent evaluation and adjustment work is required:
[0031] Perform comprehensive regression validation to test whether the modified neural network can maintain good detection results under various conditions;
[0032] The evaluation threshold β is set to ensure the stability of the model performance in different environments 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);
[0033] Analyze the performance difference 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 actual application scenarios;
[0034] Based on 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 a specific embodiment, S1 includes:
[0036] Incremental learning is used to continuously train the diffractive neural network model so that it can adapt to the newly added source domain data without retraining the entire model. The incremental learning process can be expressed as:
[0037]
[0038] in, represents the newly added source domain data, θ (old) represents the existing model parameters, Represent new data features;
[0039] 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:
[0040]
[0041] Among them, F (l) Represents the characteristics of each layer of the diffractive neural network, w l represents the weight factor, F FPN Represents the fused multi-scale feature representation.
[0042] The disclosed embodiment provides a method for optimizing and accelerating target detection based on a diffractive neural network, including: extracting features from source domain data based on a pre-trained diffractive neural network model; adjusting model parameters using a domain adaptive algorithm to match the target domain data distribution; performing optimization iterations in the target domain based on the adapted model to enhance generalization capability; and performing lightweight processing on the optimized diffractive neural network model to accelerate target detection. The solution of the disclosed embodiment can solve the problem of decreased generalization capability caused by the difference in data distribution between the source domain and the target domain in cross-domain detection tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.
[0044] Figure 1 It is a flow chart of a target detection optimization and acceleration method based on a diffraction neural network. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure more clear, the embodiments of the present disclosure are further described in detail in combination with the embodiments and drawings. The schematic implementation methods of the embodiments of the present disclosure and their descriptions are only used to explain the embodiments of the present disclosure and are not intended to limit the embodiments of the present disclosure.
[0046] like Figure 1As shown in the figure, a method for optimizing and accelerating target detection based on a diffractive neural network includes the following key steps: extracting features from source domain data based on a pre-trained diffractive neural network model; adjusting model parameters to match the target domain data distribution using a domain adaptive algorithm; performing optimization iterations in the target domain based on the adapted model to enhance generalization capabilities; and performing lightweight processing on the optimized diffractive neural network model to accelerate target detection. This process solves the performance degradation in cross-domain detection tasks caused by different data distributions in the source and target domains, 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 diffractive neural network (such as an AI framework supported by a photonic chip built using physical optics principles). For example, in a specific case, before performing military vehicle type recognition, a base model pre-trained with a large-scale, richly annotated civilian image library is first used to capture generalized feature information such as object contours or local structural patterns.
[0048] The second step is to introduce 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 generative adversarial networks (GANs) to simulate more representative mixed samples. Specifically, in the above military application scenarios, if the target domain refers to the actual combat environment image taken by the drone, the pre-set neural network layer can be fine-tuned to introduce environmental elements that are not present in the source image but are unique to the target image, such as specific lighting changes, terrain texture details, or color shifts under different climatic conditions.
[0049] Then the third step focuses on further optimizing the initially corrected system using the corrected target domain specific attributes to ensure that when the model is deployed in real-life reconnaissance work in unknown but potentially threatening areas, it can demonstrate more robust and accurate discrimination capabilities - in other words, it enhances the precise positioning and identification of military equipment under various scenarios. In a specific embodiment, this process may combine real-time feedback information to iterate the predefined target object classification labels until it converges to a point that maximizes discrimination while minimizing false positives; after multiple cycles, it can achieve high detection quality and robustness for any input image.
[0050] The last step is to make the complete version that has been fully polished and adjusted go through a series of redundancy removal, compression and even partial architecture streamlining design to reduce the computational complexity and storage cost without significantly losing recognition accuracy, so that the final product can run efficiently on mobile terminal equipment with relatively simple hardware configuration. For example, there is a wide range of needs in front-line sentry tower systems that perform long-term remote monitoring or patrol operations of small teams equipped with portable handheld devices. Especially in the case of limited resources, the entire process is required to respond as quickly as possible and give instant analysis conclusions. The value of this approach is more reflected in places where it is required to respond as quickly as possible and give instant analysis conclusions. Therefore, this not only involves trimming the original weights to a certain proportion, but also may adopt similar weight sharing mechanisms, reduce the number of inner layers and other means to jointly promote the efficient implementation of target detection work, thereby bringing users smoother and more practical application tools.
[0051] Step S1 includes:
[0052] Incremental learning is used to continuously train the diffractive neural network model so that it can adapt to the newly added source domain data without retraining the entire model. The incremental learning process can be expressed as:
[0053]
[0054] in, represents the newly added source domain data, θ (old) represents the existing model parameters, Represent new data features;
[0055] 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:
[0056]
[0057] Among them, F (l) Represents the characteristics of each layer of the diffractive neural network, w l represents the weight factor, F FPN Represents the fused multi-scale feature representation.
[0058] Next, the steps of extracting features from source domain data based on the pre-trained diffractive neural network model of the present invention are described. The process mainly includes extracting the basic features of the source domain image based on the first layer of the pre-trained model; further extracting higher-level features through filter combination in the second layer; using the attention mechanism to identify and focus on key feature areas; and finally applying the feature fusion strategy to integrate low-level and high-level feature information.
[0059] The first layer of the network based on the pre-trained model is mainly responsible for capturing the most basic information from the input source domain image, such as basic graphic structure features such as corners in the image. This layer is usually pre-trained with a large-scale dataset and fine-tuned in the current task to adapt to the specific data distribution and improve 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 in a variety of environments to provide necessary support for subsequent processing.
[0060] Next, the second layer uses filters in various combinations to process the basic features obtained by the first layer, thereby obtaining a more advanced abstract representation capability. This step involves using more complex filtering operators at different scales or shape directions. In one embodiment, for pedestrian detection applications, 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 contours, further helping the model distinguish non-human objects.
[0061] Then, the attention mechanism built into the model is used to select important parts, enhance the detail depiction effect at prominent locations, and ignore irrelevant noise interference factors. This technology allows the neural network to dynamically adjust its ability to focus on certain parts of the image. Specifically, in the practice of target detection, the system can more keenly lock on the figure of a suspicious person without being distracted by the less important background around it, significantly improving the recognition rate and speed.
[0062] Finally, after obtaining these two sets of distinct but indispensable important information from simple to bottom to complex upper layers, customized feature aggregation methods are used to effectively combine them to achieve complementary advantages, and finally establish and improve high-quality feature vectors as the basis for subsequent algorithm use. For example, in a security camera analysis software project developed based on the principle of diffraction, the final step will enable the system to quickly and reliably complete the accurate real-time detection of objects, especially moving life entities such as pets, cats and dogs, and even humans under different lighting conditions, and quickly respond or send notifications to users. As for the feature weighting function F(w), w = (w1, w2, .., wn) T represents a series of importance measurement vector elements for each level of features. This w needs to be iteratively optimized through back propagation and supervised feedback. There is no fixed initial configuration or absolute best solution. Reasonable configuration should be personalized and adjusted according to the specific problem type and the distribution of target sample characteristics in the training set to improve accuracy and efficiency.
[0063] Next, the steps of the present invention in which the model parameters are adjusted to match the target domain data distribution using a domain adaptation algorithm are described. First, the sample label information of the source domain and the target domain is collected, and the two data sets are merged to create a new temporary data set. The key operation in this process is to organize and merge the data labels from different data sources to ensure that each sample has a corresponding classification label for the next step of analysis. For example, in the implementation of a target detection optimization and acceleration method based on a diffraction neural network, data from the actual detection site (target domain) and its labeling information are collected and combined with the previous laboratory training data (source domain) to establish a comprehensive data set.
[0064] Secondly, the covariance of the sample features in the above dataset is calculated to quantify the distinction between different domains. Here, σ represents the intensity and pattern difference between the features of different samples caused by the difference between the source domain and the target domain; θ is a predetermined threshold or standard used to judge the importance threshold of the difference, which can be adjusted within a reasonable range according to the actual situation, but its effectiveness should be guaranteed to promote the migration effect of the final model. Specifically, covariance is a statistical indicator used to measure the linear dependence between two or more variables. If the feature covariance σ value 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 to be applied to the new environment without further fine-tuning; however, if σ is greater than or equal to θ, this indicates that the features of the two are significantly inconsistent under the existing conditions, and thus there is a domain shift, then the next stage is to improve the model to better meet the characteristics of the target data.
[0065] When it is determined that there is a significant gap between the source domain and the target and domain adaptation is required, the adaptive model update is started. This procedure repeatedly modifies the internal structural parameters of the neural network until the revised version can reduce or even eliminate the previously identified differences, that is, the distribution of source and target domain features reaches the expected level of consistency. In one embodiment, if the diffractive neural network has a high accuracy for the target marked in the laboratory environment at the beginning, but the performance is significantly degraded in the field, the above adjustment is performed until a similar accuracy is obtained in the field environment, so that the model can be guaranteed to have strong generalization ability and can effectively detect specific targets in various situations and not limited to the initial learning scene. The adjustment process involves using the domain adaptation algorithm to continuously evaluate and update the connection weights, biases and other model hyperparameters until the measured new σ is less than or equal to the established standard, so as to achieve the effect of finally adapting the machine learning framework to and accurately serving the target application scenario. This formulation process is to ensure that the adjustment is not blind, and each iteration can effectively reduce the prediction error in the subtask and move towards reducing the potential difference between the source domain and the target domain, so as to ensure the effective transformation of the algorithm and the successful implementation of the actual operation.
[0066] Next, the invention describes the specific steps of performing optimization iterations in the target domain based on the adapted model. The steps begin with performing regularized optimization iterations based on the base model generated by the adaptive algorithm in the initial stage. This process is intended to use the adjusted base model to avoid overfitting and improve generalization capabilities by adding constraints to the network parameters. Using this approach in diffractive neural network target detection can improve the accuracy of the model in identifying specific object types (such as vehicles or pedestrians) while reducing the probability of false alarms.
[0067] Subsequently, after each iteration of training, a cross-validation technique is applied to perform a performance evaluation on all the models obtained. The top K candidate models are selected for the next stage of work by scoring and sorting these results. Here, the cross-validation score provides a metric for the performance of each sub-model when evaluated on a subset of data that it has not seen, helping to determine which configuration can be best generalized to a new scenario. For example, in one embodiment, when using a five-fold cross-validation technique, the final model pool is reduced to the three most stable options.
[0068] Next, the prediction performance of the best performing model in the actual usage environment (i.e., real traffic surveillance footage in this example) is compared with the performance of its original training data set (image data captured in a simulated environment). Specifically, the ratio of the two precisions (prediction accuracy) is measured, that is, P divided by P src Whether it exceeds the threshold α. Assuming α is set to 0.9, it means that the system must demonstrate that its target recognition effect in unknown areas can reach almost 90% of the efficiency level of the source environment. Such a setting can ensure that it still has high recognition accuracy and adaptability across scenarios; if the actual detection results, such as the vehicle recognition accuracy of the clips captured by the city night street camera, are more than 90% compared with the accuracy of the same model in the test video, it can be proved that the version is worth deploying online without too much adjustment.
[0069] Continue to optimize the above process until P / P src Until the level reaches no less than the α standard, ensure continuous improvement throughout the process and finally obtain a high-efficiency model with excellent stability and generalization in different fields to complete the accelerated detection work. In this case, assuming that the initial model obtains 95% accuracy in the simulation environment and achieves a stable detection rate of 82%-87% after a series of training adjustments based on actual road conditions, it means that its relative proportion meets the established standards and is therefore suitable for subsequent operation or commercial use as a final product.
[0070] Next, the invention describes the lightweight processing of the optimized diffraction neural network model to accelerate target detection. 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. In 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, we further reduce the model complexity by removing some unnecessary convolutional layers based on the principle that they have no significant adverse effect on detection accuracy. This pruning can effectively reduce the computational burden without significantly sacrificing performance. Specifically, we analyze the importance of different layers to the overall prediction quality to determine which are the secondary components, and then delete them after ensuring that the accuracy remains within an acceptable level.
[0073] After that, the value of the measures taken should be determined based on the relationship between the product of the reduced volume ratio v and the acceleration ratio r and the pre-set threshold parameter λ. The formula is v×r>λ, where v represents the degree of reduction in the total number of parameters relative to the unmodified state (values between 0 and 1); r represents how many times the speed of the processed version is improved compared to the initial form. The larger the ratio, the better the speed optimization; and λ is the qualification standard for light simplification, which is generally set in the range of [0.2, 0.9]. Choosing a higher value can ensure a higher optimization effect.
[0074] Finally, when the measures taken meet the preset conditions (i.e. v×r>λ), it means that the expected dual goals of simplification and speed improvement have been achieved; if the target has not been reached, appropriate adjustments need to be made, such as slight modification of weights or adjustment of the number of layers, until the re-evaluation results are satisfactory. In one example, through repeated tests, the appropriate ratio v=0.7 (volume reduction of 70%), r reached 3 (execution speed three times faster), and it was confirmed that (λ=1.6) was appropriate, and finally it was confirmed that the lightweight model achieved the ideal optimization effect.
[0075] Next, the present invention describes that after the lightweight process is performed using the above methods, subsequent evaluation and adjustment work is required: performing comprehensive regression verification to detect whether the modified neural network can maintain good detection effects under various conditions; setting an evaluation threshold β to ensure the stability of model performance in different environments and data distribution scenarios, and the judgment condition is 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 groups of comparative test data, analyzing the performance difference between the final version of the lightweight diffraction neural network and the original version to ensure effective support for actual application scenarios; based on 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.
[0076] Comprehensive regression validation is performed to evaluate and ensure that the lightweight diffractive neural network can maintain stable performance under different input environments. This test covers a wide range of application cases to check the performance of the network in diverse and challenging environments. For example, when developing a road object detection system for unmanned vehicles, it is necessary to test the effect of the lightweight network by simulating different light changes and scenes under various weather conditions to ensure that the system can not only work correctly in an ideal environment, but also maintain reliability in the face of complex conditions.
[0077] In this verification process, an evaluation threshold β (usually a predetermined small value, such as 0.05) is set as a tolerance control for performance degradation. The purpose is to ensure that even if lightweighting brings some performance sacrifice, it will not fall below the acceptable working standard by setting the d value (representing the average difference between the network predicted output and the actual output under specific conditions). Specifically, when it is hoped to retain the face recognition function in the improvement of the urban monitoring system, the average deviation d obtained from the test in a large number of face data sets exceeds the predetermined 0.05, indicating that the model is not stable enough or the accuracy needs to be improved. In this case, the threshold β needs to be adjusted and retested until the condition of d≤0.05 is met before it can be regarded as a qualified model. This is because it is necessary to ensure that faces can still be effectively identified even when facing different lighting angles or occlusion conditions.
[0078] Next, a series of detailed comparative tests are conducted to collect and analyze actual operational data from different sources and settings to make a final judgment. This step is a critical stage to determine whether the modified version has achieved the originally expected efficiency goals and maintained the required level of accuracy. Assuming that a security company has integrated the technology into mobile patrol equipment, it is necessary to conduct comparative tests in the real world before deploying it. For example, at the airport security checkpoint, the rate and accuracy of identifying suspicious baggage are compared with the original system to confirm that the lightweight network not only greatly improves the speed but also maintains a considerable level of security, which proves 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 meets basic standards, the system performance should be continuously monitored and further improvements should be made when necessary, and this process should be repeated until an optimal solution that can function stably in a wider range of fields is obtained. For example, in the next few years, if it is found that certain types of targets are difficult to track accurately or the existing models become inadequate as the camera image quality improves, it means that it is necessary to return to the design optimization stage mentioned above to explore more suitable methods or technology upgrades. This shows that even seemingly finished products need to adapt to the ever-improving environment of the times. Only by continuous updating and adaptation can a powerful detection platform that can stand the test of time be finally created.
[0080] The present invention provides a method for optimizing and accelerating target detection based on a diffractive neural network, which includes a series of innovative designs and optimizations for the key difficulties of the prior art in cross-domain detection tasks. In order to solve the problem of insufficient generalization ability caused by the large difference in data distribution between the source domain and the target domain, the method adopts the following series of measures.
[0081] First, a pre-trained diffractive 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 basic model. However, in real scenarios, different source domains are usually significantly different from the target domains involved in the final application environment, which puts a test on the effective applicability of the model.
[0082] In order to effectively overcome this difficulty, this method then takes the second step of using a domain adaptation algorithm to fine-tune the previously obtained feature extractor. Specifically, by minimizing the gap between the two sets of distributions (such as the source domain and the new environment) without changing the overall architecture, 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] The next step is to proceed to the key stage: based on the adapted new model, carry out optimization cycle updates in the actual target application scenario. By continuously experimenting and learning the details of new samples, the deviations are gradually corrected to make the network structure more robust and improve the generalization ability to adapt to the challenges in a wider range of scenarios. This allows the entire process to not only quickly adapt to external changes in rapid transitions, but also have good potential for sustainable development.
[0084] Finally, the overall structure is designed to be lightweight while ensuring that precise performance indicators meet the requirements. This step is a strategic decision made for the purpose of increasing computing speed and reducing computing consumption, so that the improved detection tool can quickly respond to user requests and reduce cost pressure at the hardware level. The entire solution aims to build a powerful system that can cross heterogeneous environments and still have excellent detection capabilities and processing speeds. In summary, the invention has formed an effective technical solution by carefully controlling each important link, successfully addressing the performance degradation defects that are prone to traditional models in cross-domain environments, and promoting the technical level of related application fields to new heights.
[0085] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on 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, extracting features from source domain data based on a 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. Lightweight processing is performed on the optimized diffraction neural network model to accelerate target detection.
2. The target detection optimization and acceleration method based on diffraction neural network according to claim 1 is characterized in that: The feature extraction of source domain data based on the pre-trained diffractive neural network model includes: The first layer 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 combinations; 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 method of using a domain adaptive algorithm to adjust the model parameters 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 σ(source, target) satisfies the condition σ(source, target) < θ (where σ represents the degree of feature difference 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 σ(source, target) drops below θ, thereby achieving model adaptation to the target domain.
4. 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; According to the selected model, the relationship between the prediction accuracy P on the target domain and the source domain accuracy Psrc is calculated: if (P / P src )>α, (where P represents the target domain prediction performance, Psrc represents the source domain prediction performance, and α is the expected improvement ratio); Continue to optimize until (P / P src ) is not less than the preset ratio standard α.
5. The target detection optimization and acceleration method based on diffraction neural network according to claim 4 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 convolutional layers while ensuring that the detection accuracy is not significantly affected; The rationality and effectiveness of the lightweight solution are evaluated based on the new model volume reduction ratio v and the model prediction rate increase multiple r after processing. The conditional judgment formula is v×r>λ (where v represents the ratio of the model parameter volume to the original volume reduction, r represents the target detection time improvement coefficient, and λ is the threshold value of the lightweight efficiency evaluation index); When the adopted method meets the lightweight target, the model slimming process is completed. Otherwise, it needs to be fine-tuned and the lightweight evaluation is repeated until it meets the standard.
6. The target detection optimization and acceleration method based on diffraction neural network according to claim 5 is characterized in that: After the lightweighting process is carried out 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 results under various conditions; The evaluation threshold β is set to ensure the stability of the model performance in different environments 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); Analyze the performance difference 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 actual application scenarios; Based on 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.
7. The target detection optimization and acceleration method based on diffraction neural network according to claim 1 is characterized in that: The S1 includes: Incremental learning is used to continuously train the diffractive neural network model so that it can adapt to the newly added source domain data without retraining the entire model. The incremental learning process can be expressed as: in, represents the newly added source domain data, θ (old) 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: Among them, F (l) Represents the characteristics of each layer of the diffractive neural network, w l represents the weight factor, F FPN Represents the fused multi-scale feature representation.
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