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

mismatch of index between the files img_urls_all.json and captioning_dataset.json #7

Open
pgaylumen opened this issue Sep 14, 2019 · 0 comments

Comments

@pgaylumen
Copy link

Hi and thanks for providing this repo,

maybe related to #6, it seems the files do not use the same indices:

urls = json.load(open('img_urls_all.json','r'))
capt = json.load(open('../../data/captioning_dataset.json','r'))
print(capt['58cedcaa95d0e02489b91f23']['images'])
{'0': '\nChuck Berry, shown in 1980, created a sound and style that made him rock ’n’ roll’s first true superstar.\n\n',
 '4': '\nChuck Berry, shown in 2008, provided rock ’n’ roll with swagger, guitar chops and meticulous songwriting.\n\n'}

print(urls['58cedcaa95d0e02489b91f23'])
{'0': 'https://static01.nyt.com/images/2017/03/20/arts/20BERRY-APPRAISAL/20BERRY-APPRAISAL-articleInline.jpg?quality=90&auto=webp',
 '3': 'https://static01.nyt.com/images/2017/03/20/arts/20BERRY-APPRAISALJP/20BERRY-APPRAISALJP-articleInline.jpg?quality=90&auto=webp'}

It seems to be only an index issue as the images correspond to the text.

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

1 participant