-
Notifications
You must be signed in to change notification settings - Fork 940
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
[feat] Inference API #798
[feat] Inference API #798
Conversation
2ab71e9
to
3012b7f
Compare
68ba8d9
to
6a41441
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brettallenyo has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great contribution. Please check my comments and address them.
b14b7cc
to
44c37f8
Compare
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
17 similar comments
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
Added an API to run inference in three use cases: - region features -> mmft - region features -> visual_bert - grid features -> movie_mcan Based on configs, some are provided here, users can run inference on various trained models with something as simple as an image URL and a text query.
5fe3eb6
to
7dc7ed7
Compare
@brettallenyo has updated the pull request. You must reimport the pull request before landing. |
@brettallenyo has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the comments. Looks good to me.
Summary: Added an API to run inference in these use cases: - region features -> mmft - region features -> visual_bert Based on configs, some are provided here, users can run inference on various trained models with something as simple as an image URL and a text query. Would love for people to take a look and provide feedback about my coding style and design choices. If you want to run it on your own you can pull and run ``` from mmf.utils.inference import Inference if __name__ == "__main__": inference = Inference(checkpoint_path="/checkpoint/brettallen/visualbert") answer = inference.forward( "http://i.imgur.com/1IWZX69.jpg", {"text": "what type of shoes is the woman in pink wearing"}, image_format="url", ) print(answer) ``` Pull Request resolved: #798 Reviewed By: vedanuj Differential Revision: D27171794 Pulled By: brettallenyo fbshipit-source-id: 25b51e5da8cdae944b53970ce1a30b253dee339f
Added an API to run inference in these
use cases:
Based on configs, some are provided here,
users can run inference on various
trained models with something as simple
as an image URL and a text query.
Would love for people to take a look and provide
feedback about my coding style and design choices.
If you want to run it on your own you can pull and run