如何在 AWS sagemaker 中为 yolov5 推理创建端点

发布于 2025-01-15 01:26:01 字数 128 浏览 1 评论 0原文

我已经训练了 yolov5 来检测自定义对象,现在我必须将其部署在 AWS sagemaker 上,因为我需要创建一个推理端点,我已经看过一些关于如何在 AWS 上创建端点的教程,但我没有知道如何为 yolov5 做这件事,有人可以帮助我吗?

I've trained yolov5 to detect a custom object, now I have to deploy it on AWS sagemaker, for that I need to create an endpoint for inference, I've seen some tutorials on how to create endpoints on AWS but I don't know how to do it for yolov5 , can someone help me please ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

¢蛋碎的人ぎ生 2025-01-22 01:26:01

要在 SageMaker 上部署 yolov5 等模型,您需要构建自定义容器,这种方法称为自带容器 (BYOC)。您需要在 Dockerfile 上安装 yolov5 并在 Predictor.py 文件中采用您的推理代码。看一下下面使用 Spacy 库的示例,您可以模仿除 Dockerfile 和 Predictor.py 之外的所有内容,您需要调整安装和推理代码逻辑。

BYOC 示例: https://github.com /RamVegiraju/SageMaker-Deployment/tree/master/RealTime/BYOC/PreTrained-Examples/SpacyNER

要调整的文件: Dockerfile、预测器.py

To deploy a model such as yolov5 on SageMaker, you will need to build a custom container, this approach is known as Bring Your Own Container (BYOC). You will need to install yolov5 on the Dockerfile and adopt your inference code in the predictor.py file. Take a look at the following example with the library Spacy, you can mimic everything except the Dockerfile and predictor.py which you need to adjust for installation and your inference code logic.

BYOC Example: https://github.com/RamVegiraju/SageMaker-Deployment/tree/master/RealTime/BYOC/PreTrained-Examples/SpacyNER

Files To Adjust: Dockerfile , predictor.py

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文