Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
a5082f7a
Commit
a5082f7a
authored
Feb 22, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the track association testing functions smarter about how they evaluate
the quality of a track association function.
parent
ea60f622
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
cross_validate_track_association_trainer.h
dlib/svm/cross_validate_track_association_trainer.h
+12
-3
No files found.
dlib/svm/cross_validate_track_association_trainer.h
View file @
a5082f7a
...
...
@@ -29,16 +29,25 @@ namespace dlib
typedef
typename
detection_type
::
track_type
track_type
;
using
namespace
impl
;
dlib
::
rand
rnd
;
std
::
vector
<
track_type
>
tracks
;
std
::
map
<
label_type
,
unsigned
long
>
track_idx
;
// tracks[track_idx[id]] == track with ID id.
for
(
unsigned
long
j
=
0
;
j
<
samples
.
size
();
++
j
)
{
total_dets
+=
samples
[
j
].
size
();
std
::
vector
<
long
>
assignments
=
f
(
get_unlabeled_dets
(
samples
[
j
]),
tracks
);
std
::
vector
<
labeled_detection
<
detection_type
,
label_type
>
>
dets
=
samples
[
j
];
// Shuffle the order of the detections so we can be sure that there isn't
// anything funny going on like the detections always coming in the same
// order relative to their labels and the association function just gets
// lucky by picking the same assignment ordering every time. So this way
// we know the assignment function really is doing something rather than
// just being lucky.
randomize_samples
(
dets
,
rnd
);
total_dets
+=
dets
.
size
();
std
::
vector
<
long
>
assignments
=
f
(
get_unlabeled_dets
(
dets
),
tracks
);
std
::
vector
<
bool
>
updated_track
(
tracks
.
size
(),
false
);
// now update all the tracks with the detections that associated to them.
const
std
::
vector
<
labeled_detection
<
detection_type
,
label_type
>
>&
dets
=
samples
[
j
];
for
(
unsigned
long
k
=
0
;
k
<
assignments
.
size
();
++
k
)
{
// If the detection is associated to tracks[assignments[k]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment