Skip to content
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

The conversion overhead here is not negligible and it will slow down training. How about moving this to the data pipeline? #9508

Open
RangiLyu opened this issue Dec 19, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request refactor v-3.x
Milestone

Comments

@RangiLyu
Copy link
Member

    The conversion overhead here is not negligible and it will slow down training. How about moving this to the data pipeline?

Originally posted by @tascj in #9494 (comment)

@RangiLyu
Copy link
Member Author

We are considering moving mask.to_tesnor to PackDetInputs. But this modification is related to all instance segmentation methods. We will open another PR for the refactoring.

@tascj
Copy link

tascj commented Dec 19, 2022

Great. I tried mask.to_tesnor in PackDetInputs and it saved me 0.1x s/iter at batch size 32.

There's one related problem. You are using ndarray to store masks in BitmapMasks, which could be slow (long data_time) when used together with DataLoader. torch.Tensor with DataLoader does not have that problem.
You can speed up Mask R-CNN training a bit if using torch.Tensor in BitmapMasks. It would be nice to have that in mmdet 3.x.

@RangiLyu
Copy link
Member Author

Great! Thanks for your suggestion! We will consider this feature in the refactoring.

@ZwwWayne ZwwWayne assigned RangiLyu and unassigned Czm369 Dec 19, 2022
@RangiLyu RangiLyu added this to the 3.0.0rc6 milestone Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor v-3.x
Projects
None yet
Development

No branches or pull requests

3 participants