Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
rcnn
Commits
b1b88164
Commit
b1b88164
authored
Mar 13, 2014
by
Ross Girshick
Browse files
utility to compare feature cache files across two feature caches
parent
064324d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/cmp_feat_caches.m
0 → 100644
View file @
b1b88164
function
cmp_feat_caches
(
dir1
,
dir2
)
% For comparing new feat cache files to known good
% feat cache files after some change
s
=
dir
([
dir1
'/*.mat'
]);
for
i
=
1
:
length
(
s
)
[
a
,
b
,
c
]
=
fileparts
(
s
(
i
)
.
name
);
s1
=
[
dir1
'/'
s
(
i
)
.
name
];
s2
=
[
dir2
'/'
b
'.mat'
];
if
~
exist
(
s2
)
fprintf
(
'Skipping %s\n'
,
s
(
i
)
.
name
);
continue
;
end
d1
=
load
(
s1
);
d2
=
load
(
s2
);
% gt: [2448x1 logical]
% overlap: [2448x20 single]
% boxes: [2448x4 single]
% feat: [2448x9216 single]
% class: [2448x1 uint8]
assert
(
sum
(
abs
(
d1
.
gt
-
d2
.
gt
))
==
0
);
assert
(
sum
(
sum
(
abs
(
d1
.
overlap
-
d2
.
overlap
)))
==
0
);
assert
(
sum
(
sum
(
abs
(
d1
.
boxes
-
d2
.
boxes
)))
==
0
);
assert
(
sum
(
sum
(
abs
(
d1
.
feat
-
d2
.
feat
)))
==
0
);
assert
(
sum
(
abs
(
d1
.
class
-
d2
.
class
))
==
0
);
fprintf
(
'%d is ok\n'
,
i
);
end
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