fix reading of images with dots in the filename #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If an image has a dot in the filename, and the filename is listed on the groundtruth
imlist
without the file extension, then its filepath is incorrectly constructed without the file extension. The issue is inconfig_imname
and `config_qimname):If the filename in
imlist
has a dot and no file extension, for exampleHenry_Moore_Three_Way_Piece_No._2_0000
, thenfileparts
returns_2_0000
as file extension, leading the code to construct the filepath without the file extension.I don't think it's possible to use
fileparts
to decide on whether a string has or has not a file extension.fileparts
is useful to split the filepath in its components but one needs to know a priori if we're dealing only with the basename or the filename.There's two ways to fix this. Either we expect
imlist
to be the filename (with file extension) or the basename (without file extension). Since the groundtruth files provided by the project for oxford5k and paris6k do not include the file extension inimlist
, I'm assuming that is preferred. This commit removes the logic that handlesimlist
andqimlist
with the file extensions, thus making a requirement for groundtruth files to list the basename only.