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

Spatial Soft-argmax (+optional scale adaptive) #1364

Closed
bhack opened this issue Mar 22, 2020 · 15 comments
Closed

Spatial Soft-argmax (+optional scale adaptive) #1364

bhack opened this issue Mar 22, 2020 · 15 comments
Labels
Feature Request help wanted Needs help as a contribution layers

Comments

@bhack
Copy link
Contributor

bhack commented Mar 22, 2020

Describe the feature and the current behavior/state.
Recover Spatial Soft-argmax from contrib + scale adaptive extension

Relevant information

  • Are you willing to contribute it (yes/no): no
  • Are you willing to maintain it going forward? (yes/no): yes
  • Is there a relevant academic paper? (if so, where): https://arxiv.org/abs/2003.07543 (for the scale adaptive version)
  • Is there already an implementation in another framework? (if so, where): Kornia (Scale adaptation extended formulation is still not released)
  • Was it part of tf.contrib? (if so, where): SpatialSoftmax tensorflow#23331 (only the non-scale adaptive version)

Which API type would this fall under (layer, metric, optimizer, etc.)
layer

Who will benefit with this feature?
Any application that requires heatmap based keypoints/landmarks regression

Any other info.

@bhack
Copy link
Contributor Author

bhack commented Mar 22, 2020

@0xshreyash
Copy link
Contributor

I can take a look at this in the weekend if you guys still need help?

@bhack
Copy link
Contributor Author

bhack commented Mar 30, 2020

@shreyashpatodia How do you want to organize the scale parameter API? With the scale adaptable extension the spatial soft argmax ops need to work inside ROI windows in every channel.

@bhack
Copy link
Contributor Author

bhack commented Mar 30, 2020

It partially relate on how we want to design basic keypoints<->heatmap ops. See #1366

@bhack
Copy link
Contributor Author

bhack commented Mar 30, 2020

I think that something like tf.image.crop_to_bounding_box but that works with a batch of offsets it is needed as parameter to work with Scales.

@bhack
Copy link
Contributor Author

bhack commented Mar 30, 2020

Probably the ROIs could be formulated like boxes in tf.image.draw_bounding_boxes

@bhack
Copy link
Contributor Author

bhack commented Apr 9, 2020

@shreyashpatodia Do you plan to make a PR?

@bhack
Copy link
Contributor Author

bhack commented Apr 10, 2020

@gabrieldemarmiesse @seanpmorgan Do you remember why we lost the tf.contrib version in the migration? In the table I see:

One OSS project found / Needs refactored as base Layer subclass / Uses get_variable_collections

@seanpmorgan
Copy link
Member

@gabrieldemarmiesse @seanpmorgan Do you remember why we lost the tf.contrib version in the migration? In the table I see:

One OSS project found / Needs refactored as base Layer subclass / Uses get_variable_collections

Just means there wasn't enough OSS usage to justify moving it. During the RFC period all candidates to be dropped were welcome to be picked up if there was community support, but no one did for spatial_softmax. Happy to review a PR for it, but the tf.contrib version used variable scoping etc. so there are some changes to be made.

@bhack
Copy link
Contributor Author

bhack commented Apr 13, 2020

What do you think about the Google version that I mentioned early in this ticket?

@bhack
Copy link
Contributor Author

bhack commented Apr 27, 2020

I was looking at pytorch.vision API signature for max pooling and I think that we could have a quite similar API interface for roi spatial soft-max.

@bhack
Copy link
Contributor Author

bhack commented Apr 27, 2020

Also boxes and box_indices params design in Tensorflow API crop_and_resize could be ok.

@bhack
Copy link
Contributor Author

bhack commented May 4, 2020

I would close this tomorrow but if someone is still interested in this topic I will just unsubscribe to the ticket. Let me know.

EDIT:
I postpone the decision to the next week

@bhack
Copy link
Contributor Author

bhack commented May 27, 2020

/cc @tanzhenyu Just in the case we want to have this migrated in the keypoints perimeter for the new keras-cv.

@seanpmorgan
Copy link
Member

TensorFlow Addons is transitioning to a minimal maintenance and release mode. New features will not be added to this repository. For more information, please see our public messaging on this decision:
TensorFlow Addons Wind Down

Please consider sending feature requests / contributions to other repositories in the TF community with a similar charters to TFA:
Keras
Keras-CV
Keras-NLP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request help wanted Needs help as a contribution layers
Projects
None yet
Development

No branches or pull requests

4 participants