Skip to content

Conversation

@wronk
Copy link
Contributor

@wronk wronk commented Jan 16, 2018

Closes #16

Todo:

  • Discuss logic of function
  • Add tests for 3 ml-types

@drewbo, continuing earlier discussion, algorithm looks like:

  1. As currently exists, get list of all tiles and labels (as one-hot vectors)
  2. IF sparse flag specified, separate all tilename keys based on if they are background (i.e., >0 in the 0th position of the label) using class_match from utils.py
  3. Randomly select sub-set of background images (equal to background_ratio * len(non_background_examples))
  4. Continue on like normal

@wronk wronk self-assigned this Jan 16, 2018
@wronk wronk force-pushed the feature/16-sparse branch from 23df2af to bee041e Compare January 17, 2018 19:30
@wronk wronk force-pushed the feature/16-sparse branch from d065376 to f3a7d07 Compare January 17, 2018 19:55
@wronk wronk requested a review from drewbo January 17, 2018 20:20
Copy link
Contributor

@drewbo drewbo left a comment

Choose a reason for hiding this comment

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

I think the test expectations are a little off and made a comment there. Otherwise 👍


# our labels should look like this
expected_labels = {
'62092-50162-17': np.array([1, 0, 0, 0, 0, 0, 0]),
Copy link
Contributor

Choose a reason for hiding this comment

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

We should actually expect not to see this first one, correct?

Copy link
Contributor Author

@wronk wronk Jan 18, 2018

Choose a reason for hiding this comment

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

Deleting it didn't cause checks to fail. That was weird, but it was because we just check that every tile in the npz file matches something in expected labels. I added a line (here and in vanilla verify-labels.py) to make sure that the number of tiles in label.npz and expected_labels also match

@drewbo drewbo merged commit 406e10d into master Jan 18, 2018
@drewbo drewbo deleted the feature/16-sparse branch January 18, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants