-
-
Notifications
You must be signed in to change notification settings - Fork 62
Add ScoreTiler #129
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
Add ScoreTiler #129
Conversation
We should save a .csv file containing the filenames of the tiles and the associated scores |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GENERAL COMMENT + SOME MINOR COMMENTS -> Please refactor the code respecting alphabetic order for methods and props, furthermore do not mix private and public func/props
73d269a
to
64307d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…imensions + drop sparse dependency
…ScoreTiler's extract method
550ec0b
to
19f00b2
Compare
fixes #83 |
A
ScoreTiler
is basically aGridTiler
(because it extracts all the tiles following a grid structure), but it saves only the firstn_tiles
with the highest score, according to a scoring function. Ifn_tiles
is equal to 0, it saves all the tiles (exact same behavior as aGridTiler
)Scorer
The scoring functions are implemented in the
scorer
module. All the scorers are classes with a__call__
method, which takes as parameter aTile
object and returns a float. These characteristics are implemented in theScorer
protocol. At the moment there is only aRandomScorer
, which returns a random number between 0 and 1, not considering the tile, but it serves as an initial example.Example
ScoreTiler
The
ScoreTiler
(other than the parameters required by aGridTiler
) needs a scoring function (which implements theScoring
protocol).Example