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

Made Python 3 compatible and included Word Mover's Distance metric. #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mtanti
Copy link

@mtanti mtanti commented Dec 2, 2018

I have added the Word Mover's Distance metric that was introduced by Mert Kilickaya et al. in their paper "Re-evaluating Automatic Metrics for Image Captioning". I believe this will be a useful addition to the standard evaluation toolkit just like SPICE.

Signed-off-by: mtanti [email protected]

@@ -85,7 +85,7 @@ def compute_score(self, gts, res):
for image_id in imgIds:
# Convert none to NaN before saving scores over subcategories
score_set = {}
for category,score_tuple in imgId_to_scores[image_id].iteritems():
for category,score_tuple in imgId_to_scores[image_id].items():
score_set[category] = {k: self.float_convert(v) for k, v in score_tuple.items()}
Copy link

Choose a reason for hiding this comment

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

score_set[category] = {k: self.float_convert(v) for k, v in list(score_tuple.items())}

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.

2 participants