Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing error metrics as discussed in #27 #50

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Selmaan
Copy link
Contributor

@Selmaan Selmaan commented Apr 18, 2020

I implemented these changes, plus two minor additions.

First, for keypoints which are supposed to be not-visible, it seemed reasonable to replace their confience score with 1 minus the confidence score, for the purposes of reporting online during training, since the target confidence for these points is 0. Euclidean errors however should be masked out, since they are not defined for non-visible keypoints. These changes only affect values printed to command line during training, but not logged values to disk. This is fine, because the keypoint errors logged to disk includes NaN values for non-visible keypoints

Second, in debugging these changes, I noticed that the logger callback appeared to be broken. Instead of adding a new entry for each epoch, it appears to have a first entry with all zeros, and a second entry with only the most recent values. This looked like a single line got misplaced outside a conditional statement, and I tested that logger works correctly after making this change.

Modify keypoints error to return nan values for non-visible keypoints. Modify logger to mask out euclidean error for non-visible keypoints, and to correct confidence scores (to 1 minus value) for these keypoints
should store new copy of prediction and errors for each epoch
prevents warning that future h5py will change default file mode to read only
@stale
Copy link

stale bot commented Apr 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Issue has been inactive for 7 days label Apr 25, 2020
@Selmaan
Copy link
Contributor Author

Selmaan commented Apr 26, 2020

This push is to fix the issues discussed in open issue #27

@stale stale bot removed the stale Issue has been inactive for 7 days label Apr 26, 2020
@jgraving
Copy link
Owner

jgraving commented Apr 26, 2020

I'd get rid of all the code for detecting nans and just use np.nanpercentile and np.nanmean. That would greatly simplify things and give the same result. If you could update to use that then I'll merge.

confidence_mean = confidence.mean()
# keypoint_percentile = np.percentile(
# [euclidean, confidence], [0, 5, 25, 50, 75, 95, 100], axis=1
# ).T
Copy link
Owner

Choose a reason for hiding this comment

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

Just delete this commented code. git keeps track of changes. There's no need to keep old code.

@Selmaan
Copy link
Contributor Author

Selmaan commented Apr 26, 2020 via email

@stale
Copy link

stale bot commented May 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Issue has been inactive for 7 days label May 3, 2020
@jgraving jgraving removed the stale Issue has been inactive for 7 days label May 6, 2020
@stale
Copy link

stale bot commented May 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Issue has been inactive for 7 days label May 13, 2020
@stale
Copy link

stale bot commented May 20, 2020

This issue has been automatically closed because it has not had recent activity.

@stale stale bot closed this May 20, 2020
@jgraving jgraving reopened this May 25, 2020
@stale stale bot removed the stale Issue has been inactive for 7 days label May 25, 2020
@jgraving jgraving added the bug Something isn't working label May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants