Adjust return value for image load error in extract line & line path #665
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.
The
_extract_line
and_extract_path_line
methods currently return a 3-tuple instead of a 2-tuple when there is an error loading the image file. This causes an error when the extract function is called bymap
orimap_unordered
- it looks like a code error and it took me some digging to determine I was not setting the image path correctly for thebuild_binary_dataset
method to be able to load the image files.I've revised to return two values instead of three and added logging so that it will be easier to diagnose image problems; I wasn't sure if it should be a warning or an error, so kept it as a warning.
I added a unit test based on the existing tests for the
build_binary_dataset
method.