Skip to content

Commit

Permalink
Clarify that the reference predictions don't work with prepareTestRes…
Browse files Browse the repository at this point in the history
…ults
  • Loading branch information
anibali committed Jul 18, 2018
1 parent 50a71c3 commit 2ae9913
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ which predictions to include and which subset (train/val) to use.

Loads flat test set predictions and prepares them for submission.

## Reference predictions

The `preds/reference` directory contains multiple validation set prediction
files generated by established pose estimation models.
You can compare against these predictions using `evalMPII.m`.

NOTE: Since the reference predictions are for the validation set, they are
_not_ compatible with the `prepareTestResults.m` script.

## File origins

In order to keep evaluation in line with existing work, a lot of files in this
Expand Down
23 changes: 18 additions & 5 deletions prepareTestResults.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@

% Check that the number of predictions is correct
n_test_examples = length(test_indices);
assert(size(test_preds, 3) == n_test_examples);

% Validate the number of predictions
n_test_preds = size(test_preds, 3);
if (n_test_preds ~= n_test_examples)
switch n_test_preds
case 2958
fprintf('! It looks like your predictions are from the validation set,\n')
fprintf('! but this script works for test set predictions only.\n')
case 22246
fprintf('! It looks like your predictions are from the training set,\n')
fprintf('! but this script works for test set predictions only.\n')
end
error(sprintf('Expected %d predictions, got %d', n_test_examples, n_test_preds))
end

pred = RELEASE.annolist;
n_joints = size(test_preds, 2); % Should be 16
Expand Down Expand Up @@ -79,13 +92,13 @@

correlation = corr(cell2mat(centers)', cell2mat(thorax_preds)');

display('Correlation between person centers and thorax predictions:\n');
fprintf('Correlation between person centers and thorax predictions:\n');
display(diag(correlation));

if min(diag(correlation)) < 0.5
display('! Low correlation between predicted thorax positions and\n');
display('! annotated person centers detected. This could indicate a\n');
display('! mismatch in example ordering, or very poor predictions.\n');
fprintf('! Low correlation between predicted thorax positions and\n');
fprintf('! annotated person centers detected. This could indicate a\n');
fprintf('! mismatch in example ordering, or very poor predictions.\n');
end

save(OUT_FILE, 'pred', '-v7');

1 comment on commit 2ae9913

@738654805
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job.

Please sign in to comment.