Skip to content

Conversation

@marshallmallows
Copy link
Collaborator

@marshallmallows marshallmallows commented Aug 26, 2021

No description provided.

@coveralls
Copy link

coveralls commented Aug 26, 2021

Pull Request Test Coverage Report for Build 1192962262

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.756%

Totals Coverage Status
Change from base Build 1190028929: 0.0%
Covered Lines: 6105
Relevant Lines: 7037

💛 - Coveralls

@linjiX linjiX requested review from Lee-000 and graczhual August 27, 2021 05:22
@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch from ff6f655 to ceede23 Compare August 27, 2021 09:08
@marshallmallows marshallmallows requested a review from linjiX August 31, 2021 06:17
@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch from ceede23 to 4a12a9e Compare August 31, 2021 06:52
@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch from 4a12a9e to 12f1002 Compare August 31, 2021 09:08
@marshallmallows marshallmallows requested a review from linjiX August 31, 2021 09:09
@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch 3 times, most recently from 954d586 to bd5779b Compare September 1, 2021 02:45


def _get_instance_mask(filename: str, original_mask_path: str, mask_directory: str) -> InstanceMask:
mask_path = os.path.join(mask_directory, f"{filename}.png")
Copy link
Contributor

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?

Copy link
Collaborator Author

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)))):
Copy link
Contributor

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?

Copy link
Collaborator

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?

Copy link
Collaborator Author

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")))
Copy link
Contributor

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?

Copy link
Collaborator Author

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)))):
Copy link
Collaborator

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?

@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch from bd5779b to a1bb11a Compare September 1, 2021 07:50
@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch from a1bb11a to b1b35c4 Compare September 2, 2021 05:23
@marshallmallows marshallmallows force-pushed the T17267_BDD100K_10K_mask_loader branch from b1b35c4 to 4917ce9 Compare September 2, 2021 05:31
@marshallmallows marshallmallows merged commit 1e9bfad into Graviti-AI:main Sep 2, 2021
@marshallmallows marshallmallows deleted the T17267_BDD100K_10K_mask_loader branch September 2, 2021 05:31
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

Successfully merging this pull request may close these issues.

5 participants