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

Support keypoint on ElasticTransform (2-D) #1325

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

minipuding
Copy link

Rewrite (Add) apply_to_keypoint funtion on class ElasticTransform. Only consider 2-D case.

Add  ``apply_to_keypoint`` funtion to class ``ElasticTransform``. Only consider 2-D case.
Modified support for keypoints of ``ElasticTransform``. The previous version was incorrect. In fact, the coordinates of the transformed keypoints can only be obtained by transforming the target points into images followed by elastic transformation. However, the cost is long running time, especially if there are many keypoints.
Modified support for keypoints of ``ElasticTransform``. The previous version was incorrect. In fact, the coordinates of the transformed keypoints can only be obtained by transforming the target points into images followed by elastic transformation. However, the cost is long running time, especially if there are many keypoints.
Comment on lines +275 to +276
interp_y, interp_x = np.where(remap_image == np.max(remap_image))
return (interp_x[0], interp_y[0], 0.0, 0.0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the keypoint outside of the image? Looks like we always will find keypoint inside the image and in the case when we can not see the keypoint

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there is such a problem, but I can't think of a simple and elegant way to solve it. Therefore, you should try to ensure that the keypoints do not go beyond the scope of the image, otherwise it will return incorrect results.

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.

None yet

2 participants