Update create_coco_tf_record.py#10820
Merged
copybara-service[bot] merged 7 commits intomasterfrom Nov 21, 2022
Merged
Conversation
When number of `bbox_annotations` is same as `num_annotations_skipped` in a single example include a check, not to create the `feature_dict` and just return any empty `feature_dict`.
luotigerlsx
reviewed
Nov 9, 2022
luotigerlsx
reviewed
Nov 9, 2022
Member
|
Hey @sineeli, thanks for the PR. I have added two comments. |
sineeli
commented
Nov 13, 2022
sineeli
commented
Nov 13, 2022
| proto = tfrecord_lib.convert_to_feature([b'123', b'456']) | ||
| self.assertSequenceAlmostEqual(proto.bytes_list.value, [b'123', b'456']) | ||
|
|
||
| def test_obj_annotation_tf_example(self): |
Contributor
Author
There was a problem hiding this comment.
I have added the test case, can you please check and review the same. Really thanks for reviewing the code.
Member
There was a problem hiding this comment.
Thanks for adding the test case. It looks good to me. But due to the newly added code, the lint test doesn't pass. Please check the log the modify accordingly.
Contributor
Author
There was a problem hiding this comment.
I made all the corrections which are required from lint of point of view. Thanks
saberkun
approved these changes
Nov 15, 2022
copybara-service bot
pushed a commit
that referenced
this pull request
Nov 21, 2022
PiperOrigin-RevId: 490001056
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Code breaks when bounding box coordinates crosses the original image width or height itself.
bbox_annotationsis same asnum_annotations_skippedin a single example include a check, not to create thefeature_dictand just return any emptyfeature_dict.tfrecord_lib.pywhethertf_exampleis not empty while writing to outputtfrecordfile.Type of change
For a new feature or function, please create an issue first to discuss it
with us before submitting a pull request.
Note: Please delete options that are not relevant.
Tests
Test Configuration:
Checklist