Reverse motion magnetic suspension camera stability adjusting method and system
Vibration signals are collected in real time through a six-axis gyroscope, and lightweight MLP student model is built. Combined with the timing feature extraction ability of the teacher model, feature fusion and three-stage distillation training are carried out, which solves the problem of insufficient stability during vibration of traditional magnetic levitation cameras, realizes high-precision suspension stability control, and improves the camera's shooting stability and image quality.
Patent Information
- Application Number
- CN202510565548.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-12
AI Technical Summary
When the camera base is vibrated, the magnetic levitation object is easily moved with it, affecting the stability and accuracy of the system, resulting in poor camera stability control accuracy.
Vibration signals are collected in real time through a six-axis gyroscope, a lightweight MLP student model is constructed, combined with the timing feature extraction ability of the teacher model, feature fusion and three-stage distillation training are carried out, and low-latency, high-precision suspension stability control is achieved using PWM-PID magnetic regulation.
It realizes high-precision and stable control of the camera in complex vibration environments, reduces picture blur caused by hand shaking or external vibration, and improves shooting quality.
Smart Images

Figure CN120475259A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera stabilization adjustment control, and in particular to a method, system, computer device and computer-readable storage medium for stabilizing and adjusting a reverse motion magnetic levitation camera. Background Art
[0002] The magnetic levitation state can prevent the camera components from being affected by the vibration and friction caused by traditional mechanical connection methods during movement, thereby ensuring the stability of shooting and reducing image blur caused by hand shake or external vibration. It can significantly improve image quality, especially when shooting dynamic scenes or long exposure shots.
[0003] Specifically, by precisely controlling the magnetic field force, very precise and flexible reverse movement of camera components can be achieved, enabling smooth zoom and focus adjustment when shooting video, or reducing wear between components due to the lack of mechanical contact, which not only extends the service life of the camera but also generates less noise during operation.
[0004] In related technologies, when the camera base is vibrated, the external force generated by the vibration directly acts on the entire system, causing the magnetic levitation object to move with it, thus affecting the stability and accuracy of the system. Traditional magnetic levitation control technology generally has difficulty in accurately controlling the position of the magnetic levitation object, which seriously affects the stability of the camera. Summary of the Invention
[0005] Embodiments of the present application provide a method, system, computer device, and computer-readable storage medium for stabilizing and adjusting a reverse-motion magnetic levitation camera, to at least solve the problems in the related art.
[0006] In a first aspect, an embodiment of the present application provides a method for stabilizing a reverse-motion magnetic levitation camera, which is characterized in that it is used for position stabilization control of a magnetic levitation camera assembly, and the method includes:
[0007] When the acquisition device detects displacement of the camera base, the six-axis gyroscope sensor is used to acquire the motion state of the camera base, converts the vibration signal into a vibration signal, and sends the vibration signal to a data processing device connected to the data processing device;
[0008] The data processing device performs computational processing based on the vibration signal using a lightweight preset vibration compensation model to output position compensation information, wherein the position compensation signal is used to correct positional offset of the camera assembly caused by vibration of the camera base;
[0009] The position compensation information is sent to the camera base through the data processing device to instruct the camera base to adjust the magnetic force of the electromagnet according to the position compensation information to correct the position offset of the camera assembly caused by the vibration of the camera base.
[0010] In some embodiments, the data processing device receives the vibration signal via a transceiver module and forwards the position compensation information to the camera base;
[0011] The data processing device performs calculations and processing using a lightweight preset vibration compensation model through a single-chip microcomputer to obtain the position compensation signal, wherein the preset vibration compensation model is trained based on a distillation mechanism and deployed on the single-chip microcomputer through pruning and compression.
[0012] In some embodiments, the method further comprises:
[0013] Collecting an initial training set containing a time series of vibration signals and corresponding position compensation information, performing lightweight time domain feature extraction on the vibration signals in the initial training set, and generating an optimized training set with time-frequency features;
[0014] Constructing a teacher model including a bidirectional LSTM layer and an attention mechanism, and training a complex teacher model for predicting the position compensation information based on the vibration signal based on the optimized training set, wherein the time-frequency features are input into the LSTM layer in time steps to extract temporal dependencies, and a weighted feature vector is obtained by calculating the attention weight;
[0015] Construct an MLP student model with a feature projection layer, where the dimension of the feature projection layer is consistent with the hidden state dimension of the teacher model and is used to receive the weighted feature vector transmitted by the teacher model;
[0016] The trained teacher model is transferred to a lightweight student model, and the lightweight student model is distilled and trained based on the optimized training set to obtain a vibration compensation model.
[0017] In some embodiments, during the distillation training process, the lightweight student model is subjected to distillation training based on the true labels of the training set and the soft labels of the teacher model, including:
[0018] S1, freeze the parameters of the teacher model and calculate the mean square error loss between the compensation signal prediction result of the student model and the true compensation vector;
[0019] S2, introduce the probability distribution soft label output by the teacher model, and align the decision boundaries of the teacher model and the student model through the KL divergence loss term;
[0020] S3, using feature matching loss to minimize the cosine similarity between the projection layer output of the student model and the LSTM hidden state of the teacher model;
[0021] The above steps S1-S3 are executed cyclically, and the parameters of the student model are iteratively updated until convergence, thereby obtaining the vibration compensation model.
[0022] In some embodiments, the student model receives the attention-weighted feature vector output by the teacher model through a first branch, and obtains the manual feature vector of the original vibration signal after time-frequency transformation through a second branch;
[0023] Concatenate the attention-weighted feature vector and the manual feature vector to obtain a fused feature;
[0024] The fusion features are mapped to the MLP standard space through a learnable linear projection layer, and a nonlinear transformation is performed through a multi-layer fully connected network to generate a compensation vector prediction value, thereby obtaining the compensation signal prediction result of the student model.
[0025] In some embodiments, after obtaining the vibration compensation model, the method further includes:
[0026] Iteratively pruning the vibration compensation model and processing the preset vibration compensation model through L2 regularization to prevent overfitting;
[0027] The parameters of the vibration compensation model are compressed into integers, and based on the incremental learning and dynamic calibration mechanism, the parameter update strategy of the preset vibration compensation model is configured to obtain the preset vibration compensation model that can be actually deployed on the single chip microcomputer.
[0028] In some embodiments, the method further comprises:
[0029] The camera base is fixed to the bottom surface and is used to lift the camera assembly through the magnetic force generated by multiple electromagnets to achieve suspension of the camera assembly;
[0030] The compensation information is converted into a current regulation signal for the electromagnet coil by a solid-state relay module using a PWM modulation circuit, and the magnetic force gradient is continuously regulated by a PID controller to adjust the magnetic force of the electromagnet.
[0031] In a second aspect, the present application provides an embodiment of a reverse motion magnetic levitation camera stabilization adjustment system for position stabilization control of a magnetic levitation camera, the system comprising an acquisition device, a data processing device, and a camera assembly, wherein:
[0032] The acquisition device is used to, when detecting displacement of the camera base, use a six-axis gyroscope sensor to acquire the motion state of the camera base, convert the vibration signal into a vibration signal, and send the vibration signal to a data processing device in communication with the data processing device;
[0033] The data processing device is configured to perform calculation processing based on the vibration signal using a lightweight preset vibration compensation model to output position compensation information, wherein the position compensation signal is used to correct a positional offset of the camera assembly caused by vibration of the camera base;
[0034] Furthermore, the position compensation information is sent to the camera base to instruct the camera base to adjust the magnetic force of the electromagnet according to the position compensation information to correct the position offset of the camera assembly caused by the vibration of the camera base.
[0035] In a third aspect, an embodiment of the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect above.
[0037] Compared with the related art, the reverse motion magnetic levitation camera stabilization adjustment method provided in the embodiment of the present application collects vibration signals in real time through a six-axis gyroscope, adopts knowledge distillation technology to construct a lightweight MLP student model that can be deployed on a single-chip microcomputer, and further combines the time series feature extraction capability of the teacher model. The model accuracy is optimized through feature fusion and three-stage distillation training (MSE→KL→feature alignment); and after iterative pruning and parameter quantization compression, the position compensation signal is predicted through the model, and PWM-PID magnetic force control is used to achieve low-latency, high-precision suspension stability control, which solves the problem in the related art that the stability control accuracy of the suspension camera is poor and affects the camera performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0039] Figure 1 is a flow chart of a method for calibrating a reverse motion magnetic levitation camera according to an embodiment of the present application;
[0040] Figure 2 This is a structural block diagram of a reverse motion magnetic levitation camera stabilization system according to the present application;
[0041] Figure 3 is a schematic diagram of a camera base according to an embodiment of the present application;
[0042] Figure 4 Schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is described and illustrated below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely used to explain this application and are not intended to limit this application. Based on the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without making any creative efforts are within the scope of protection of this application.
[0044] Obviously, the drawings described below are merely examples or embodiments of the present application. Those skilled in the art can, without inventive effort, apply the present application to other similar scenarios based on these drawings. Furthermore, it is also understood that, although the effort involved in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, changes in design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as an insufficiency of the content disclosed in this application.
[0045] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it refer to independent or alternative embodiments that are mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments unless there is a conflict.
[0046] Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by a person of ordinary skill in the technical field to which this application belongs. The words "one", "a", "the" and the like used in this application do not indicate a limit on quantity and may indicate the singular or plural. The terms "include", "comprise", "have" and any variations thereof used in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units that are inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The word "multiple" used in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0047] Magnetic levitation protects camera components from the vibration and friction of traditional mechanical connections during motion, ensuring stable shooting and reducing blur caused by hand shake or external vibrations. This significantly improves image quality, especially when capturing dynamic scenes or long exposures. With traditional magnetic levitation technology, vibrations to the camera base can cause the levitated object to move, seriously affecting its stability.
[0048] This solution uses the MPU6050 six-axis sensor module to sense tiny vibrations of the camera base in real time. The microcontroller then performs precise calculations based on a lightweight preset compensation model to analyze the impact of vibrations on the position of the magnetic levitation camera component. Finally, a solid-state relay module controls the voltage of the four electromagnets in the camera base to achieve real-time adjustment of the direction and distance of the camera component, allowing the magnetic levitation camera to remain stable even in complex vibration environments, effectively solving the stability problem caused by vibration.
[0049] This application provides a method for stabilizing and adjusting a reverse motion magnetic levitation camera, which is used for stabilizing the position of the magnetic levitation camera. Figure 1 FIG. 1 is a flow chart of a method for calibrating a reverse motion magnetic levitation camera according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps:
[0050] S101, when the acquisition device detects displacement of the camera base, the acquisition device uses a six-axis gyroscope sensor to acquire the motion state of the camera base, converts the vibration signal into a vibration signal, and sends the vibration signal to a data processing device connected to the data processing device;
[0051] Among them, the acquisition device integrates a six-axis gyroscope sensor. When the camera base is displaced due to external factors such as vibration, collision or movement, the six-axis gyroscope sensor in the acquisition device comprehensively acquires the motion state of the camera base from multiple dimensions, including accurately measuring the linear acceleration of the camera base in the front and back, left and right, up and down directions, and sensing its rotational angular velocity around each axis.
[0052] These rich motion state data are quickly integrated and efficiently converted into vibration signals. Furthermore, the vibration signal is presented in the form of an electrical signal. In order to allow the subsequent processing system to conduct in-depth analysis and utilization, the acquisition device will send this vibration signal to the data processing device connected to it. Optionally, the communication method can be a wired connection, such as using a high-speed data transmission line to ensure the stability and reliability of signal transmission and avoid data loss or interference; it can also be a wireless connection, such as using wireless communication technologies such as Bluetooth and Wi-Fi to achieve more flexible equipment layout and convenient data transmission.
[0053] S102, performing computational processing on the vibration signal using a lightweight preset vibration compensation model by a data processing device, and outputting position compensation information, wherein the position compensation signal is used to correct positional offset of the camera assembly caused by vibration of the camera base;
[0054] The data processing device receives the vibration signal through the transceiver module and forwards the position compensation information to the camera base;
[0055] The data processing device uses a single-chip microcomputer to perform calculations using a lightweight preset vibration compensation model to obtain a position compensation signal. The preset vibration compensation model is trained based on a distillation mechanism and deployed on the single-chip microcomputer through pruning and compression.
[0056] Furthermore, building and training a preset vibration compensation model includes the following steps:
[0057] S1, collecting an initial training set containing a time series of vibration signals and corresponding position compensation information, performing lightweight time domain feature extraction on the vibration signals in the initial training set, and generating an optimized training set with time-frequency features;
[0058] First, we need to collect a time series of vibration signals and their corresponding position compensation information. This data forms the initial training set. The vibration signals reflect the vibration conditions of the equipment during operation, while the position compensation information provides an accurate reference standard for subsequent model training.
[0059] To further improve data quality, lightweight time-domain feature extraction is performed on the vibration signals in the initial training set. This operation converts the original vibration signals into an optimized training set with time-frequency features. Compared to the original signal, time-frequency features more effectively reflect the signal's characteristics at different times and frequencies, providing more valuable information for subsequent model training.
[0060] S2, builds a teacher model consisting of a bidirectional LSTM layer and an attention mechanism. Based on the optimized training set, a complex teacher model is trained to predict position compensation information based on vibration signals. The time-frequency features are input into the LSTM layer in time steps to extract temporal dependencies, and a weighted feature vector is obtained by calculating the attention weight.
[0061] S3, construct an MLP student model with a feature projection layer, where the dimension of the feature projection layer is consistent with the hidden state dimension of the teacher model and is used to receive the weighted feature vector transmitted by the teacher model;
[0062] In S4, the trained teacher model is transferred to the lightweight student model, and the lightweight student model is distilled and trained based on the optimized training set to obtain a vibration compensation model.
[0063] The complex teacher model consists of a bidirectional LSTM layer and an attention mechanism. The bidirectional LSTM processes sequence data in both forward and reverse directions, better capturing the temporal dependencies within time-frequency features. The attention mechanism calculates the attention weight for each time-step feature, generating a weighted feature vector to highlight important features. Furthermore, the teacher model is trained using an optimized training set. The time-frequency features are fed into the LSTM layer by time step, allowing it to learn the mapping between vibration signals and position compensation information, thereby accurately predicting position compensation information based on the vibration signals.
[0064] Next, a lightweight MLP student model is constructed, which includes a feature projection layer. The feature projection layer has the same dimension as the hidden state of the teacher model. Its function is to receive the weighted feature vectors passed by the teacher model, so that the student model can learn the key features extracted by the teacher model.
[0065] Finally, the knowledge from the trained teacher model is transferred to a lightweight student model. Using the optimized training set, the student model undergoes distillation training, allowing it to learn the output distribution of the teacher model. During distillation training, the teacher model's output serves as soft labels, guiding the student model's training along with the true labels. After distillation training, the final vibration compensation model is obtained. This model combines the powerful learning capabilities of the teacher model with the lightweight advantages of the student model, enabling accurate prediction of position compensation information while meeting deployment requirements in resource-constrained environments.
[0066] More specifically, during the distillation training process, the lightweight student model is distilled and trained based on the true labels of the training set and the soft labels of the teacher model, including:
[0067] S1, freeze the parameters of the teacher model and calculate the mean square error loss between the compensation signal prediction result of the student model and the true compensation vector;
[0068] As you can understand, the teacher model's parameters must first be frozen to ensure they remain unchanged during distillation training, ensuring that its knowledge is stably transferred to the student model. Next, the mean squared error (MSE) between the student model's predicted compensation signal and the true compensation vector is calculated. This MSE measures the average squared error between the predicted and true values. By minimizing this loss, the student model's predictions are kept as close as possible to the true compensation vector, giving the student model basic predictive capabilities.
[0069] S2, introduces the probability distribution soft label output by the teacher model, and aligns the decision boundaries of the teacher model and the student model through the KL divergence loss term;
[0070] Soft labels contain the teacher model's confidence in different compensation signals and contain more knowledge than true labels. By calculating the KL divergence loss between the student model's output and the teacher model's soft labels, the student model can learn the teacher model's decision boundary. KL divergence measures the difference between two probability distributions. Minimizing the KL divergence loss brings the student model's output distribution closer to the teacher model's output distribution, allowing the student model to learn the teacher model's generalization capabilities.
[0071] S3, uses feature matching loss to minimize the cosine similarity between the projection layer output of the student model and the LSTM hidden state of the teacher model;
[0072] Specifically, this step aims to minimize the cosine similarity between the projection layer output of the student model and the LSTM hidden state of the teacher model. This step focuses on feature-level matching, allowing the student model to learn the patterns of the teacher model's feature extraction process. Cosine similarity measures the cosine of the angle between two vectors; values closer to 1 indicate greater similarity. By minimizing cosine similarity, the student model's projection layer output is made as similar as possible to the teacher model's LSTM hidden state, thereby learning the teacher model's feature representation capabilities.
[0073] The above three steps are repeated repeatedly, continuously iterating and updating the parameters of the student model. In each iteration, an optimization algorithm (such as stochastic gradient descent) is used to update the student model parameters based on the calculated loss function. As the iterations proceed, the performance of the student model gradually improves until the loss function converges, meaning the loss value no longer decreases significantly. At this point, the final vibration compensation model is obtained. This model combines the knowledge of the teacher model with the lightweight advantage of the student model, enabling efficient and accurate prediction of vibration compensation information in practical applications.
[0074] In the process of building a lightweight student model and performing distillation training to obtain a vibration compensation model, a multi-feature fusion approach was adopted to improve model performance and generalization ability. Specifically, the actual data processing flow of the model is as follows:
[0075] S1, the student model has two branches to obtain different types of features. The first branch receives the attention-weighted feature vector output by the teacher model. The attention mechanism in the teacher model has processed the time-frequency features of the vibration signal and highlighted the key information. Therefore, this attention-weighted feature vector contains the important patterns and features learned by the teacher model; the second branch obtains the manual feature vector of the original vibration signal after time-frequency transformation.
[0076] S2 further concatenates the attention-weighted feature vectors and manual feature vectors obtained from the two branches to obtain a fused feature vector, which is then input into a learnable linear projection layer. The function of the linear projection layer is to map the fused feature vector to the MLP (multi-layer perceptron) standard space. In this space, the dimension and distribution of the features are more suitable for subsequent multi-layer fully connected network processing; after passing through the linear projection layer, the fused features enter the multi-layer fully connected network. The multi-layer fully connected network consists of multiple neuron layers, and each neuron is connected to all neurons in the previous layer. In the network, the data undergoes a series of nonlinear transformations (such as the ReLU activation function) to enable the model to learn complex nonlinear relationships. Finally, the multi-layer fully connected network outputs a compensation vector prediction value, which is the compensation signal prediction result of the student model and can be used for subsequent applications such as camera component position correction.
[0077] It can be understood that through this multi-feature fusion and nonlinear transformation method, the student model can comprehensively utilize different types of feature information to improve the understanding and analysis capabilities of vibration signals, thereby more accurately predicting compensation signals and providing more reliable support for the camera stabilization system.
[0078] Furthermore, after the initial model training is complete, iterative pruning is required to further optimize the model for use on a microcontroller and improve its efficiency. Iterative pruning is a process that gradually reduces the number of model parameters. By removing connections or neurons that have little impact on the prediction results, the model's computational load and storage requirements are reduced without significantly degrading its performance.
[0079] Specifically, the iterative pruning process is as follows:
[0080] First, define a pruning criterion, such as judging by the absolute value of the weight. Connections with smaller absolute weights generally have less impact on the model's output and can be pruned first.
[0081] Then, a round of pruning is performed to remove some connections or neurons according to the pruning criteria.
[0082] Next, the pruned model is fine-tuned using the optimized training set to re-adapt the model to the new structure and recover some of the performance lost due to pruning.
[0083] Repeat the above steps for multiple rounds of iterative pruning and fine-tuning until the preset pruning target is achieved, such as the number of model parameters is reduced to a certain proportion or the model performance drops to an acceptable range.
[0084] Furthermore, during iterative pruning, L2 regularization is applied to the preset vibration compensation model to prevent overfitting. Overfitting refers to a phenomenon where a model performs well on the training set but poorly on the test set or in real-world applications. L2 regularization adds a regularization term to the loss function, penalizing large weights in the model. This results in smoother weights and reduces the model's over-reliance on training data.
[0085] The loss function of L2 regularization can be expressed as:
[0086]
[0087] Among them, Loriginal is the original loss function, λ is the regularization coefficient that controls the strength of the regularization term, and wi is the weight of the model.
[0088] Furthermore, to further reduce the model's storage requirements and computational complexity, the parameters of the preset vibration compensation model are compressed into integers. Parameter compression can be achieved through quantization, for example, by converting floating-point weights to 8-bit or 16-bit integers. This quantization process significantly reduces the model's storage space and computational complexity without significantly compromising model accuracy, improving the model's operational efficiency on resource-constrained devices.
[0089] Optionally, a parameter update strategy for the preset vibration compensation model can be configured based on incremental learning and dynamic calibration mechanisms. Incremental learning allows the model to learn and update based on the existing model as it continuously acquires new data, without requiring retraining the entire model. Dynamic calibration adjusts model parameters in real time based on the model's performance in real applications to adapt to changing environments.
[0090] The specific parameter update strategy can be configured based on the characteristics of the data and the application scenario. For example, when the distribution of new data is slightly different from the original data, a smaller learning rate can be used for incremental learning to avoid over-adjusting the model. When the distribution of new data changes significantly, the learning rate can be increased appropriately to speed up the model update.
[0091] S103, sending the position compensation information to the camera base through the data processing device to instruct the camera base to adjust the magnetic force of the electromagnet according to the position compensation information to correct the position offset of the camera assembly caused by the vibration of the camera base.
[0092] Specifically, the data processing device and the camera base are connected through a specific communication link. This communication link can be wired, such as using a high-speed and stable serial communication interface to ensure that the position compensation information can be transmitted accurately and timely; it can also be wireless, using advanced wireless communication technology to achieve flexible data interaction.
[0093] The solid-state relay module plays a bridging role in this process. Based on the received position compensation information, it generates a corresponding electrical adjustment signal. The solid-state relay module integrates complex circuitry and control logic, enabling it to precisely adjust various parameters of the output electrical signal, such as voltage amplitude and current, based on the position compensation information. Based on this electrical adjustment signal, the solid-state relay module precisely controls the electromagnet's power supply circuit.
[0094] By precisely adjusting the magnetic force of the electromagnets, the camera mount effectively corrects the position of the camera assembly. For example, if the camera mount shifts due to external vibrations, causing the camera assembly to shift, the position compensation information instructs the camera mount to increase or decrease the magnetic force of the electromagnets in a specific direction, generating a force opposite to the shifted direction. This returns the camera assembly to its correct position, ensuring the camera remains stable during shooting and capturing clear, jitter-free images.
[0095] Through the above steps S101 to S103, the inverse motion magnetic levitation camera stabilization adjustment method provided by the embodiment of the present application collects vibration signals in real time through a six-axis gyroscope, and uses knowledge distillation technology to construct a lightweight MLP student model that can be deployed on a single-chip microcomputer and can meet the real-time response prediction of the compensation value; further combined with the time series feature extraction capability of the teacher model, the model accuracy is optimized through feature fusion and three-stage distillation training (MSE→KL→feature alignment); and after iterative pruning and parameter quantization compression, the position compensation signal is predicted through the model, and PWM-PID magnetic force control is used to achieve low-latency, high-precision suspension stability control, which solves the problem in the related art that the stability control accuracy of the suspension camera is poor and affects the camera performance.
[0096] On the other hand, the embodiment of the present application further provides a reverse motion magnetic levitation camera stabilization adjustment system, which is used for position stabilization control of the magnetic levitation camera. Figure 2 This is a structural block diagram of a reverse motion magnetic levitation camera stabilization adjustment system according to the present application. Figure 2 As shown, the system includes an acquisition device 20, a data processing device 21 and a camera assembly 22, wherein:
[0097] The acquisition device 20 is used to, when detecting displacement of the camera base, use a six-axis gyroscope sensor to acquire the motion state of the camera base, convert it into a vibration signal, and send it to a data processing device connected to the data processing device;
[0098] The data processing device 21 is used to perform calculation processing based on the vibration signal using a lightweight preset vibration compensation model to output position compensation information, wherein the position compensation signal is used to correct the position offset of the camera assembly caused by the vibration of the camera base;
[0099] Furthermore, the position compensation information is sent to the camera base to instruct the camera base to adjust the magnetic force of the electromagnet according to the position compensation information to correct the position offset of the camera assembly 22 caused by the vibration of the camera base.
[0100] Figure 3 is a schematic diagram of a camera base according to an embodiment of the present application, such as Figure 3As shown, this system adopts a modular design, which is easy to expand functions and upgrade technology to meet higher-level shooting needs in the future.
[0101] Compared with the camera stabilization adjustment system in traditional technology, the above system uses a six-axis gyroscope to collect vibration signals in real time, and adopts knowledge distillation technology to construct a lightweight MLP student model that can be deployed on a single-chip microcomputer and can meet the real-time response prediction of compensation values; further combined with the time series feature extraction capability of the teacher model, the model accuracy is optimized through feature fusion and three-stage distillation training (MSE→KL→feature alignment); and after iterative pruning and parameter quantization compression, the position compensation signal is predicted through the model, and PWM-PID magnetic control is used to achieve low-latency, high-precision suspension stability control, which solves the problem of poor accuracy of suspension camera stability control affecting camera performance in related technologies.
[0102] In one embodiment, Figure 4 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 4 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in FIG. Figure 4 As shown. This electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected via an internal bus, wherein the non-volatile memory stores an operating system, a computer program, and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with external terminals via a network connection, the internal memory is used to provide an environment for the operation of the operating system, the computer program, when executed by the processor, implements a method for stabilizing and adjusting a reverse motion magnetic levitation camera, and the database is used to store data.
[0103] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0104] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0105] The above embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for stabilizing and adjusting a reverse motion magnetic levitation camera, characterized in that: For position stabilization control of a magnetically levitated camera assembly, the method comprises: When the acquisition device detects displacement of the camera base, the six-axis gyroscope sensor is used to acquire the motion state of the camera base, converts the vibration signal into a vibration signal, and sends the vibration signal to a data processing device connected to the data processing device; The data processing device performs computational processing based on the vibration signal using a lightweight preset vibration compensation model to output position compensation information, wherein the position compensation signal is used to correct positional offset of the camera assembly caused by vibration of the camera base; The position compensation information is sent to the camera base through the data processing device to instruct the camera base to adjust the magnetic force of the electromagnet according to the position compensation information to correct the position offset of the camera assembly caused by the vibration of the camera base.
2. The method according to claim 1, characterized in that The data processing device receives the vibration signal through the transceiver module and forwards the position compensation information to the camera base; The data processing device performs calculations and processing using a lightweight preset vibration compensation model through a single-chip microcomputer to obtain the position compensation signal, wherein the preset vibration compensation model is trained based on a distillation mechanism and deployed on the single-chip microcomputer through pruning and compression.
3. The method according to claim 2, characterized in that The method further comprises: Collecting an initial training set containing a time series of vibration signals and corresponding position compensation information, performing lightweight time domain feature extraction on the vibration signals in the initial training set, and generating an optimized training set with time-frequency features; Constructing a teacher model including a bidirectional LSTM layer and an attention mechanism, and training a complex teacher model for predicting the position compensation information based on the vibration signal based on the optimized training set, wherein the time-frequency features are input into the LSTM layer in time steps to extract temporal dependencies, and a weighted feature vector is obtained by calculating the attention weight; Construct an MLP student model with a feature projection layer, where the dimension of the feature projection layer is consistent with the hidden state dimension of the teacher model and is used to receive the weighted feature vector transmitted by the teacher model; The trained teacher model is transferred to a lightweight student model, and the lightweight student model is distilled and trained based on the optimized training set to obtain a vibration compensation model.
4. The method according to claim 3, characterized in that In the distillation training process, the lightweight student model is subjected to distillation training based on the true labels of the training set and the soft labels of the teacher model, including: S1, freeze the parameters of the teacher model and calculate the mean square error loss between the compensation signal prediction result of the student model and the true compensation vector; S2, introduce the probability distribution soft label output by the teacher model, and align the decision boundaries of the teacher model and the student model through the KL divergence loss term; S3, using feature matching loss to minimize the cosine similarity between the projection layer output of the student model and the LSTM hidden state of the teacher model; The above steps S1-S3 are executed cyclically, and the parameters of the student model are updated iteratively until convergence, thereby obtaining the vibration compensation model.
5. The method according to claim 3, characterized in that The student model receives the attention-weighted feature vector output by the teacher model through the first branch, and obtains the manual feature vector of the original vibration signal after time-frequency transformation through the second branch; Concatenate the attention-weighted feature vector and the manual feature vector to obtain a fused feature; The fusion features are mapped to the MLP standard space through a learnable linear projection layer, and a nonlinear transformation is performed through a multi-layer fully connected network to generate a compensation vector prediction value, thereby obtaining the compensation signal prediction result of the student model.
6. The method according to claim 3, characterized in that After obtaining the vibration compensation model, the method further includes: Iteratively pruning the vibration compensation model and processing the preset vibration compensation model through L2 regularization to prevent overfitting; The parameters of the vibration compensation model are compressed into integers, and based on the incremental learning and dynamic calibration mechanism, the parameter update strategy of the preset vibration compensation model is configured to obtain the preset vibration compensation model that can be actually deployed on the single chip microcomputer.
7. The method according to claim 1, characterized in that The method further comprises, The camera base is fixed to the bottom surface and is used to lift the camera assembly through the magnetic force generated by multiple electromagnets to achieve suspension of the camera assembly; The compensation information is converted into a current regulation signal for the electromagnet coil through a solid-state relay module, and the magnetic gradient is continuously regulated through a PID controller to adjust the magnetic force of the electromagnet.
8. A stabilization and adjustment system for a reverse motion magnetic levitation camera, characterized in that: For position stabilization control of a magnetic levitation camera, the system includes an acquisition device, a data processing device, and a camera assembly, wherein: The acquisition device is used to, when detecting displacement of the camera base, use a six-axis gyroscope sensor to acquire the motion state of the camera base, convert the vibration signal into a vibration signal, and send the vibration signal to a data processing device in communication with the data processing device; The data processing device is configured to perform calculation processing based on the vibration signal using a lightweight preset vibration compensation model to output position compensation information, wherein the position compensation signal is used to correct a positional offset of the camera assembly caused by vibration of the camera base; Furthermore, the position compensation information is sent to the camera base to instruct the camera base to adjust the magnetic force of the electromagnet according to the position compensation information to correct the position offset of the camera assembly caused by the vibration of the camera base.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.