Closed chuan137 closed 8 years ago
Yes, should do.
Here is a snippet of my code for 2d object tracking
birthgmm = [ GmphdComponent(1, np.array([100,100,0,0]).T, initcovar) ]
g = Gmphd(birthgmm, survprob, detecprob, F, Q, H, R, clutterrate)
obs = np.array([102, 108]).T
g.update([ obs ])
somehow, it fails at the update step
[100,100,0,0]
is not 2D, it's 4D
Extra 0 meant to be momentum in the state vector. You are indicating they are redundant here?
Either the state vector is 2D, or the state vector is 4D. Your choice, but you have to be consistent
Actually wait, I wasn't quite right. The state vector can be different from the observation vector. It depends on the shapes of the matrices that relate them to each other. The easiest way to clarify is if you supply a self-contained complete code example that exhibits the potential problem
See for example obsnmatrix
in syntheticexamplestuff.py
- it shows two exmaples: 1D-obs-for-3D-state, and 2D-obs-for-3D-state
Thanks, I will look at your example.
Turns out I need to make sure the observations are column vectors. It works very well. Thanks for sharing the code.
Besides, I have read your two blog posts about using the filter. You mentioned the 'cold start' problem. Do you have more insights since you wrote the post?
Great! I'm glad you got it working.
I must confess that I have not used GMPHD much since I originally did this work (summarised in this brief 2012 paper). I don't have much to say about the "cold start" problem, except that it would probably help to use a "forward-backward" approach rather than just a "filter" approach.
The example seems to be 1d.