-
Notifications
You must be signed in to change notification settings - Fork 867
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
feature/add torchserve detectron2 #3355
base: master
Are you sure you want to change the base?
feature/add torchserve detectron2 #3355
Conversation
|
||
--- | ||
|
||
## Contributors |
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.
Please remove this section
|
||
--- | ||
|
||
## Usage |
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.
Please take a look at other examples and show all the steps in this README. Anyone should be able to replicate the example looking at just the README.
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.
Thank you for the guidance! I’ve now updated the README file.
logger.info(f"Inference started for a batch of {len(model_input)}.") | ||
|
||
outputs = [] | ||
for idx, image in enumerate(model_input): |
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.
Can detectron2 process a batch of images? Can we send the batch instead of looping over each image
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.
Yes, Detectron2 can process a batch of images, and we can send them.
List[str]: List of predictions. | ||
""" | ||
logger.info("Handling request...") | ||
start_time = time.time() |
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.
We already have a utility to measure the time, please check this handler
HI @Mudassar-MLE Thanks for the PR. Can you please add some context in the PR and write a short description |
…dassar-MLE/serve into feature/torchserve-detectron2
Add Detectron2 Support to TorchServe Object Detection Examples (#3344)
This pull request introduces support for Detectron2 models in TorchServe, addressing issue #3344. It includes a custom handler designed to ensure seamless deployment on both CPU and GPU environments, automatically managing device compatibility. Additionally, the example provides a requirements.txt file for dependencies and a detailed README to guide users in deploying pre-trained models from the Detectron2 Model Zoo as well as custom fine-tuned models. The updates are placed under examples/object_detector/detectron2 as suggested by the maintainers.
The contribution aims to simplify the deployment process for Detectron2 models in TorchServe, enhancing its usability for developers and making it a more commercially viable option for object detection tasks.