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

How to caculate the scores on MSCOCO 1k test images? #25

Closed
jamiechoi1995 opened this issue Dec 31, 2019 · 3 comments
Closed

How to caculate the scores on MSCOCO 1k test images? #25

jamiechoi1995 opened this issue Dec 31, 2019 · 3 comments

Comments

@jamiechoi1995
Copy link

I have read some image-text matching papers but I still have no idea about how to select 1k images from the 5k test images, how can I get the ID list of the 1k test images?

@fartashf
Copy link
Owner

fartashf commented Jan 2, 2020

The 1K results we reported on the result of cross-validation over 5 folds of the test set. Similar to prior works and their open-source codes, we chose 5-folds sequentially without random permutation.

For implementation see here:

vsepp/evaluation.py

Lines 169 to 189 in 226688a

else:
# 5fold cross-validation, only for MSCOCO
results = []
for i in range(5):
r, rt0 = i2t(img_embs[i * 5000:(i + 1) * 5000],
cap_embs[i * 5000:(i + 1) *
5000], measure=opt.measure,
return_ranks=True)
print("Image to text: %.1f, %.1f, %.1f, %.1f, %.1f" % r)
ri, rti0 = t2i(img_embs[i * 5000:(i + 1) * 5000],
cap_embs[i * 5000:(i + 1) *
5000], measure=opt.measure,
return_ranks=True)
if i == 0:
rt, rti = rt0, rti0
print("Text to image: %.1f, %.1f, %.1f, %.1f, %.1f" % ri)
ar = (r[0] + r[1] + r[2]) / 3
ari = (ri[0] + ri[1] + ri[2]) / 3
rsum = r[0] + r[1] + r[2] + ri[0] + ri[1] + ri[2]
print("rsum: %.1f ar: %.1f ari: %.1f" % (rsum, ar, ari))
results += [list(r) + list(ri) + [ar, ari, rsum]]

@chinmay5
Copy link

Just to confirm, we evaluate on the 5 folds and report the best result on one of these samples(the best performing 1k sample) or we report the average value for all 5 sets?

@fartashf
Copy link
Owner

fartashf commented Jan 13, 2020

See #26

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

No branches or pull requests

3 participants