Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multiple Target Tracking
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
phd-courses
Multiple Target Tracking
Commits
735ba95a
Commit
735ba95a
authored
3 years ago
by
Anton Kullberg
Browse files
Options
Downloads
Patches
Plain Diff
bug: fixed update_track bug after rename
parent
eb3ef1a8
Branches
Branches containing commit
Tags
v1.2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/trackers.py
+6
-6
6 additions, 6 deletions
src/trackers.py
with
6 additions
and
6 deletions
src/trackers.py
+
6
−
6
View file @
735ba95a
...
...
@@ -269,11 +269,11 @@ class GNN():
continue
else
:
# Update confirmed tracks
self
.
_
update_track
(
meas_k
[:,
unused_meas
][:,
row
],
tracks
[
col
])
self
.
update_track
(
meas_k
[:,
unused_meas
][:,
row
],
tracks
[
col
])
tracks
[
col
][
'
associations
'
].
append
(
k
)
# If we've associated something, add the time here (for plotting purposes)
for
i
in
range
(
len
(
tracks
)):
if
i
not
in
col_ind
:
self
.
_
update_track
(
np
.
array
([]),
tracks
[
i
])
self
.
update_track
(
np
.
array
([]),
tracks
[
i
])
# Remove any gated measurements from further consideration
tmp
=
unused_meas
[
unused_meas
]
# Extract the unused measurements
inds
=
np
.
where
(
validation_matrix
.
sum
(
axis
=
1
))
...
...
@@ -497,10 +497,10 @@ class JPDA():
meas
=
meas_k
[:,
unused_meas
]
for
ti
,
track
in
enumerate
(
tracks
):
if
validation_matrix
[
ti
,
1
:].
any
():
# If any measurements are validated to this track, update it accordingly
self
.
_
update_track
(
meas
[:,
validation_matrix
[
ti
,
1
:].
flatten
()],
track
,
association_matrix
[
ti
,
validation_matrix
[
ti
,
:]])
self
.
update_track
(
meas
[:,
validation_matrix
[
ti
,
1
:].
flatten
()],
track
,
association_matrix
[
ti
,
validation_matrix
[
ti
,
:]])
track
[
'
associations
'
].
append
(
k
)
# If we've associated something, add the time here (for plotting purposes)
else
:
self
.
_
update_track
(
np
.
array
([]),
track
,
None
)
self
.
update_track
(
np
.
array
([]),
track
,
None
)
# Measurements that are validated to any track can be removed from further association
tmp
=
unused_meas
[
unused_meas
]
used_inds
=
np
.
where
(
validation_matrix
[:,
1
:].
sum
(
axis
=
0
))
...
...
@@ -775,7 +775,7 @@ class MHT():
# Update the tracks with associated measurements
for
j
,
association
in
enumerate
(
associations
):
if
association
<
nt
:
# i.e. associated to a track
self
.
_
update_track
(
meas_k
[:,
j
],
hypothesis
[
k
][
-
1
][
'
tracks
'
][
association
])
self
.
update_track
(
meas_k
[:,
j
],
hypothesis
[
k
][
-
1
][
'
tracks
'
][
association
])
hypothesis
[
k
][
-
1
][
'
tracks
'
][
association
][
'
associations
'
].
append
(
k
)
unused_meas
[
j
]
=
0
# Update the proability of the hypothesis for this particular association
...
...
@@ -783,7 +783,7 @@ class MHT():
# Update tracks without an association in this particular hypothesis
for
j
in
range
(
nt
):
if
j
not
in
associations
:
self
.
_
update_track
(
np
.
array
([]),
hypothesis
[
k
][
-
1
][
'
tracks
'
][
j
])
self
.
update_track
(
np
.
array
([]),
hypothesis
[
k
][
-
1
][
'
tracks
'
][
j
])
# For any still unused measurements, possibly initiate a new track
while
unused_meas
.
any
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment