CN115578425A - Dynamic tracking method applied to fry counter and based on unscented Kalman filtering - Google Patents

Dynamic tracking method applied to fry counter and based on unscented Kalman filtering Download PDF

Info

Publication number
CN115578425A
CN115578425A CN202211146505.XA CN202211146505A CN115578425A CN 115578425 A CN115578425 A CN 115578425A CN 202211146505 A CN202211146505 A CN 202211146505A CN 115578425 A CN115578425 A CN 115578425A
Authority
CN
China
Prior art keywords
fry
ukf
mahalanobis distance
unscented kalman
dynamic tracking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211146505.XA
Other languages
Chinese (zh)
Inventor
于豪光
何志成
任绪斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong EHualu Information Technology Co ltd
Original Assignee
Shandong EHualu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong EHualu Information Technology Co ltd filed Critical Shandong EHualu Information Technology Co ltd
Priority to CN202211146505.XA priority Critical patent/CN115578425A/en
Publication of CN115578425A publication Critical patent/CN115578425A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/80Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in fisheries management
    • Y02A40/81Aquaculture, e.g. of fish

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a dynamic tracking method based on an unscented Kalman filter, which is applied to a fry counter. The method mainly relates to the technical field of dynamic tracking. In the tracking process of the fry counter, the center point of the fry is taken as a track. Generally, during the counting process, the posture of the fry is continuously changed and continuously advanced, which causes that the track detected by us may be non-linearly changed, so that a dynamic tracking method based on the unscented kalman filter is proposed. The infinite Kalman filtering is a state prediction model based on nonlinear motion, and can also predict linear motion. Meanwhile, the FPS of the camera can be reduced by adopting the mathematical model, so that the analysis speed of the whole fry counter system is improved. The method mainly comprises the following steps: an unscented kalman filter prediction (UKF), a Mahalanobis distance calculation based on Unscented Kalman Filtering (UKF), and a minimum cost matrix calculation of the Mahalanobis distance.

Description

Dynamic tracking method applied to fry counter and based on interplanetary Kalman filtering
Technical Field
The invention relates to the technical field of dynamic tracking, in particular to a method for solving dynamic tracking based on an infinite Kalman filtering algorithm applied to a fry counter.
Background
With the increase of the demand of human society, the number of fish culture increases greatly in the years, and people have high requirements on the automation degree, accuracy and speed of fish counting.
However, in the use process of many fry counter devices, because the postures of the fry moving ahead are different and constantly change, nonlinear motion will occur, so that the accuracy of the counting of the device is reduced, and in addition, the situation that the real-time counting of the device lags behind exists.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks of the prior art, embodiments of the present invention provide a method for dynamic tracking based on an unscented kalman filter in a fry counter to solve the above-mentioned problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme: a dynamic tracking method applied to a fry counter and based on unscented Kalman filtering comprises the following steps:
1. acquisition of a detection target.
And (4) obtaining a detection frame of the fry by using other deep learning libraries (the content related to deep learning does not relate to a dynamic tracking algorithm and is not repeated here), and setting the center of the detection frame as a detection target.
2. Unscented Kalman Filter (UKF) prediction
The UKF prediction step is generally divided into the following:
Figure BDA0003855522020000021
the state estimation variables, covariance matrix, and noise matrix at time k-1 are initialized. Namely: x k-1 ,P k-1 ,Q k-1 ,R k-1 . Where the Q, R noise matrix may need to be initialized as an acceleration model to simulate an acceleration motion model.
Figure BDA0003855522020000022
And (5) state prediction. Estimating variables from the state at time k-1, and covariance matrix, andand selecting 2n +1 sigma points and weight by UT transformation. 2n +1 point can obtain the formula:
Figure BDA0003855522020000023
i =0,1,2.. 2n. Obtaining a weight:
Figure BDA0003855522020000024
i=1,2...2n。
Figure BDA0003855522020000025
and (5) spreading sigma points according to a system equation to obtain a formula:
Figure BDA0003855522020000026
i=0,1,2...2n。
Figure BDA0003855522020000027
and (3) obtaining state prediction and variance prediction at the k moment:
Figure BDA0003855522020000028
Figure BDA0003855522020000029
Figure BDA00038555220200000210
status update _1. Will be provided with
Figure BDA00038555220200000211
The points are propagated through a measurement equation to obtain a sigma set of the measurement prediction points:
Figure BDA00038555220200000212
i=0,1,2...2n。
Figure BDA00038555220200000213
status update _2. And obtaining the measured value prediction, the variance of the measured prediction error, a covariance matrix of the state and the measured value, a gain K value and the like.
Figure BDA00038555220200000214
Figure BDA00038555220200000215
Figure BDA00038555220200000216
Figure BDA00038555220200000217
Figure BDA00038555220200000218
Status update _3. And obtaining the state equation and the covariance matrix at the k moment.
χ k|k =χ k|k-1 +K k (z k -z k|k-1 )
P k|k =P k|k-1 -K k S k K' k
3. Mahalanobis distance calculation based on UKF
Figure BDA0003855522020000031
Acquiring all information of a detection target detection frame, and performing the following calculation:
Figure BDA0003855522020000032
transposing the measured prediction matrix H obtained by UKF, i.e. H T
Figure BDA0003855522020000033
Multiplying a measurement prediction matrix H obtained by the UKF by a covariance prediction matrix of the UKF, namely: h P k|k-1
Figure BDA0003855522020000034
Calculating H.P k|k-1 *H T And the sum of the noise matrix R in the UKF.
Figure BDA0003855522020000035
And then the inverse of the result is obtained by the last step of the CHOLESKY algorithm.
Figure BDA0003855522020000036
Calculating a measurement matrix point in the UKF multiplied by a measurement matrix in the trajectory set, namely: HX'.
Figure BDA0003855522020000037
Calculating the difference value between the measurement value matrix of the detected target and the previous step result, namely: z-HX'.
Figure BDA0003855522020000038
And (3) solving a transposition matrix of the result of the previous step, namely: (z-HX') T
Figure BDA0003855522020000039
Will (z-HX') T Dot-multiplying the inverse of the result of the fourth step.
Figure BDA00038555220200000310
Multiplying the result of the previous step by (z-HX') T The square of the mahalanobis distance is obtained, and in addition, the square of the mahalanobis distance is obtained by proving that the square of the mahalanobis distance is inevitably in accordance with the chi-square distribution, and the chi-square distribution is obtainedThe degree of freedom of the matched chi-square can be determined by experimental values, and the alpha value is determined by the experimental values.
4. Minimum cost matrix formed by analyzing Mahalanobis distance
And (3) calculating to obtain the Mahalanobis distance between any one detection target and any one object in the track set, wherein the Mahalanobis distances form a matrix, namely: a minimum overhead matrix. By using the Hungarian KM algorithm, an optimal solution is obtained, namely, each detected target with the minimum Mahalanobis distance matched with the tracks in the track set is found, namely the target is the new position where the tracking is completed.
The invention has the technical effects and advantages that:
the fry counter can complete the dynamic tracking function of the fry when the fry counter works, and can effectively improve the counting accuracy of the fry counter when the fry moves irregularly. In addition, because the invention is based on the dynamic tracking of the nonlinear motion, the problem of mismatch is not required to be solved by requiring a high FPS of a camera like the linear dynamic tracking, the workload of a fry counter is reduced by reducing the FPS, and the counting speed of the fry counter can be effectively increased. According to the method, the moving track of the fry in the photo can be predicted through the nonlinear prediction of the infinite Kalman filtering, so that the Mahalanobis distance between the detected targets and the track is obtained, a minimum cost matrix is further formed, an optimal solution is obtained through the Hungary KM algorithm, namely, the shortest Mahalanobis distance between the detected targets and the track set, namely, the matched object is found, the dynamic tracking function is completed, and the counting accuracy and speed are effectively improved.
Drawings
FIG. 1 is a flow chart of the analysis and operation of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The method for the fry counter dynamic tracking based on the unscented kalman filter shown in the attached figure 1 is characterized by comprising the following steps:
the method comprises the following steps: the detection frame of the fry is obtained through other deep learning algorithms (the related content of deep learning does not relate to a dynamic tracking algorithm and is not repeated here), and the central point of the detection frame is used as a track point, namely a detection target.
Step two: unscented Kalman Filter (UKF) prediction. The initial state matrix, covariance matrix, error matrix and noise matrix of UKF are initialized, and an acceleration model is used to simulate the acceleration problem of fry in the forward process when Q and R matrices are initialized.
In UKF analysis, information of a current detected fry (detection box) is used as input, then UKF is used for state prediction, variables and covariance matrixes are estimated according to a state at a time k-1, and the state prediction and the variance prediction at the time k are obtained by utilizing UT transformation to select 2n +1 sigma points and weights. State prediction value generated by integrating 2n +1 sigma points
Figure BDA0003855522020000051
And carrying out propagation through a measurement equation to obtain a sigma set of the measured values of the predicted points, and then obtaining measured value prediction according to the set to obtain the variance of the measurement prediction error, a covariance matrix of the state and the measured values, a gain K value and the like. And finally, deducing a state equation at the k moment and a covariance matrix according to the obtained intermediate information.
Step three: and calculating the Mahalanobis distance based on the UKF to obtain the Mahalanobis distance between each track and the predicted value of the UKF. Prediction matrix P using covariance in UKF computation k|k-1 The state prediction matrix X k|k-1
Measuring the prediction matrix Z k|k-1 And both the noise and error prediction matrices Q and R will participate in the horseAnd calculating the distance.
Step four: and calculating the optimal solution of the minimum cost matrix of the Mahalanobis distance formed in the step three. During the counting process of the fry counter, a plurality of pictures are generated every second, each picture finally generates a minimum cost matrix formed by the mahalanobis distance between any fry detection frame information detected at the present time (at the k moment) and any track in an information set predicted at the k-1 moment (the information at the k moment predicted at the k-1 moment), and an object matched with any fry detected in the current shot picture and any track in the track set predicted at the k-1 moment can be solved by using the Hungary KM algorithm. In addition, if the resulting optimal solution, i.e., mahalanobis distance to the matching object, is greater than some threshold, the match is considered invalid. Since the square of the mahalanobis distance is bound to the chi-squared distribution, we set the chi-squared degree of freedom at which the threshold is met to 27 by experimentation, and in addition, we set α to 0.001 here in order to expand the matching space as much as possible. And finally, obtaining a value meeting the requirement, wherein the track corresponding to the value can be successfully matched with the detected object, and the tracking is completed.
Firstly: in the drawings of the disclosed embodiments of the invention, only the design related to the disclosed embodiments of the invention is referred to, other designs can refer to common designs, and the same embodiment and different embodiments of the invention can be combined with each other without conflict;
and finally: the above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (4)

1. The method for dynamically tracking the fry counter based on the unscented Kalman filtering is characterized by comprising the following steps of: the method comprises the following steps:
the method comprises the following steps: the detection frame of the fry is obtained through other deep learning algorithms (the related content of deep learning does not relate to a dynamic tracking algorithm and is not repeated here), and the central point of the detection frame is used as a track point, namely a detection target.
Step two: unscented Kalman Filter (UKF) prediction.
Step three: and calculating the mahalanobis distance of each track and the predicted value of the UKF based on the mahalanobis distance of the UKF.
Step four: and C, calculating the optimal solution of the minimum cost matrix of the Mahalanobis distance formed in the step three.
2. The method for unscented kalman filter-based dynamic tracking for application in fry counters according to claim 1, characterized in that: in the UKF prediction in the second step, the probability distribution of the approximate nonlinear function is easier than that of the approximate nonlinear function. A gaussian distribution with the same mean and covariance as the true distribution needs to be found, which is the process of Unscented Transformation (UT). The UT conversion is characterized in that the probability density distribution of the nonlinear function is approximated instead of the nonlinear function, and even if a system model is complex, the difficulty of algorithm realization is not increased, and the realization principle is as follows: taking some points in the original distribution according to a certain rule, and enabling the mean value and the covariance of the points to be equal to the mean value and the covariance of the original state distribution; substituting the points into a nonlinear function to correspondingly obtain a nonlinear function value point set, and solving the mean value and covariance of transformation through the point sets. For any nonlinear system, when the Gaussian state is transferred through the nonlinear system, the posterior mean and covariance accurate to the third moment can be obtained by using the group of sampling points.
3. The method for dynamic tracking based on the unscented kalman filter in fry counter as claimed in claim 1, wherein in the third step, the mahalanobis distance calculation depends on the variance of the measured estimated error value generated by the UKF, the predicted value of the measured value, and the state equation and covariance matrix finally generated by the UKF, the mahalanobis distance between one of the detected targets and one of the existing tracks can be calculated by using the measured values of the detected targets and the existing tracks, and the mahalanobis distance represents the distance between the covariance elements of the data, in which method, the predicted measured value at the time k is compared with the detected target value at the time k.
4. The method for the dynamic tracking based on the unscented Kalman filter applied to the fry counter as recited in claim 1, wherein in the fourth step, the Mahalanobis distance generated in the third step is combined into a minimum cost matrix, and an optimal solution is obtained through a Hungary KM algorithm, namely a track matched with a certain detection target is found in a track set predicted by UKF.
CN202211146505.XA 2022-09-20 2022-09-20 Dynamic tracking method applied to fry counter and based on unscented Kalman filtering Pending CN115578425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211146505.XA CN115578425A (en) 2022-09-20 2022-09-20 Dynamic tracking method applied to fry counter and based on unscented Kalman filtering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211146505.XA CN115578425A (en) 2022-09-20 2022-09-20 Dynamic tracking method applied to fry counter and based on unscented Kalman filtering

Publications (1)

Publication Number Publication Date
CN115578425A true CN115578425A (en) 2023-01-06

Family

ID=84581791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211146505.XA Pending CN115578425A (en) 2022-09-20 2022-09-20 Dynamic tracking method applied to fry counter and based on unscented Kalman filtering

Country Status (1)

Country Link
CN (1) CN115578425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117720012A (en) * 2024-02-08 2024-03-19 泰安市特种设备检验研究院 Crane system model prediction control method and system based on extended Kalman filtering

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117720012A (en) * 2024-02-08 2024-03-19 泰安市特种设备检验研究院 Crane system model prediction control method and system based on extended Kalman filtering
CN117720012B (en) * 2024-02-08 2024-05-07 泰安市特种设备检验研究院 Crane system model prediction control method and system based on extended Kalman filtering

Similar Documents

Publication Publication Date Title
Humpherys et al. A fresh look at the Kalman filter
CN111985093A (en) Adaptive unscented Kalman filtering state estimation method with noise estimator
CN109508445A (en) A kind of method for tracking target for surveying noise and variation Bayesian adaptation Kalman filtering with colo(u)r specification
CN111722214B (en) Method for realizing radar multi-target tracking PHD
CN109581281B (en) Moving target positioning method based on arrival time difference and arrival frequency difference
Lee et al. Tracking human motion with multichannel interacting multiple model
Eltoukhy et al. An adaptive turn rate estimation for tracking a maneuvering target
CN113673565B (en) Multi-sensor GM-PHD self-adaptive sequential fusion multi-target tracking method
Chen et al. Integrated Bayesian clutter estimation with JIPDA/MHT trackers
CN115578425A (en) Dynamic tracking method applied to fry counter and based on unscented Kalman filtering
CN111711432B (en) Target tracking algorithm based on UKF and PF hybrid filtering
CN112162244A (en) Event trigger target tracking method under correlated noise and random packet loss environment
CN116631438A (en) Width learning and secondary correlation sound source positioning method based on minimum p norm
CN112991394B (en) KCF target tracking method based on cubic spline interpolation and Markov chain
CN111582159B (en) Maneuvering target tracking method facing monitoring system
CN109886126A (en) A kind of region traffic density estimation method based on dynamic sampling mechanism and RBF neural
Liang et al. Robust tracking of moving sound source using scaled unscented particle filter
Singh et al. Design of Kalman filter for wireless sensor network
Zhang et al. Distributed acoustic source tracking in noisy and reverberant environments with distributed microphone networks
Beutler et al. Optimal stochastic linearization for range-based localization
JPH0797136B2 (en) Multi-target tracking method and apparatus
Cheng et al. Linear sequential filtering based on the debiased measurement matrix of the converted pseudo measurement for radar target tracking
CN113537302B (en) Multi-sensor randomized data association fusion method
JP3411485B2 (en) Target tracking device
Gorji et al. Policy gradient for observer trajectory planning with application in multi-target tracking problems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination