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

mscoco_image_filename() in utils.py cannot handle splits #11

Open
davidschlangen opened this issue Jun 27, 2019 · 1 comment
Open

mscoco_image_filename() in utils.py cannot handle splits #11

davidschlangen opened this issue Jun 27, 2019 · 1 comment

Comments

@davidschlangen
Copy link
Contributor

At the moment, the function only looks in train2014. So when it gets an image_id for an image in val2014, it looks for it in train2014, and fails. (Thankfully.)

Three possible solutions:

  • Make split a keyword argument (to get_image_filename() first). Advantage is that this is general. Disadvantage is that the information about the split isn't present in the feature file,
    where there are only three fields for each image (corpus code, image id, region id).
  • Make a test first, and if image_id is not in train, try in val. Advantage: API doesn't change. Disadvantage: For each image in val, there would be one unnecessary file test.
  • Encode information about the split in some other way, directly on the image id. E.g., 0001 is train, but 0001.5 is val. Advantage: Compatible with format of feature file. Disadvantage: turns image_id into a float, where it used to be an unsigned int.

These solutions are not mutually exclusive, at least as far as this function is concerned.

@davidschlangen
Copy link
Contributor Author

The reason why this never was a problem is that all the MSCOCO dataframes we had were only for the training part. But now the cocoent data also talks about the val split.

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