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

augment keypoints in one run #259

Merged
merged 1 commit into from
May 31, 2021
Merged

augment keypoints in one run #259

merged 1 commit into from
May 31, 2021

Conversation

jiangxiluning
Copy link
Contributor

When the number of text boxes is too large (> 500), augmenting poly one by one will incur severe performance degration. According to the performance guide, we can augment all keypoints in the image in one run.

For keypoint-based and heatmap-based augmentation, try to increase the number of items per augmented instance. E.g. augment_keypoints() accepts a list of KeypointsOnImage instances, with each such instance representing the keypoints on an image. Try to place for each image all keypoints in the respective KeypointsOnImage instance instead of splitting them into multiple such instances (which would be more work anyways). The same is true for bounding boxes, heatmaps and segmentation maps.

In my case, there are 700 boxes in the image. The processing time is about 3s. After optimization, it becomes 0.03s.

@MhLiao MhLiao merged commit d0775a6 into MhLiao:master May 31, 2021
Loovelj added a commit to Loovelj/DBNet.pytorch that referenced this pull request Jun 3, 2021
 refer MhLiao/DB#259 , luning found this will accelerate the train
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.

2 participants