-
Notifications
You must be signed in to change notification settings - Fork 35
feat(opendataset): add masks for BDD100K_10K dataset #973
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
feat(opendataset): add masks for BDD100K_10K dataset #973
Conversation
Pull Request Test Coverage Report for Build 1192962262
💛 - Coveralls |
ff6f655 to
ceede23
Compare
ceede23 to
4a12a9e
Compare
4a12a9e to
12f1002
Compare
954d586 to
bd5779b
Compare
|
|
||
|
|
||
| def _get_instance_mask(filename: str, original_mask_path: str, mask_directory: str) -> InstanceMask: | ||
| mask_path = os.path.join(mask_directory, f"{filename}.png") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use mask_filename rather than mask_path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually a path, use mask_filename may be a little weird.
| all_attributes = {} | ||
| if seg_type == "pan": | ||
| all_category_ids = {} | ||
| for instance_info in set(map(tuple, np.reshape(mask, (-1, 4)))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the set for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this map to tuple necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use set to get all different pixels
np.ndarray is unhashable, so I must map the pixels to tuple
|
|
||
| def _generate_test_data(image_subdir: str, _: str, __: _DATA_GETTER) -> Iterable[Data]: | ||
| yield from map(Data, _utility.glob(os.path.join(image_subdir, "*.jpg"))) | ||
| yield from map(Data, glob(os.path.join(image_subdir, "*.jpg"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is called only once, also there is only one line, is it necessary to write a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is used for reusing _load_tracking_segment for MOT and MOTS
| all_attributes = {} | ||
| if seg_type == "pan": | ||
| all_category_ids = {} | ||
| for instance_info in set(map(tuple, np.reshape(mask, (-1, 4)))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this map to tuple necessary?
bd5779b to
a1bb11a
Compare
a1bb11a to
b1b35c4
Compare
b1b35c4 to
4917ce9
Compare
No description provided.