Skip to content

trainyolo/YOLOv8-aws-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner image

HowTo: Deploying YOLOv8 on AWS Lambda

This repository contains code and instructions for deploying YOLOv8 on AWS Lambda. The accompanying blog post, "HowTo: Deploying YOLOv8 on AWS Lambda," can be found here.

Requirements

Before you begin, make sure you have the following requirements installed:

  • AWS SAM
  • Docker (optionally): if you want to build your Lambda deployment package within a Docker container, otherwise make sure you have the same python version as indicated in the template.yaml file.

Getting Started

Follow these steps to get started with deploying YOLOv8 on AWS Lambda:

  1. Clone this repository to your local machine.
git clone https://github.com/trainyolo/YOLOv8-aws-lambda
  1. Place your YOLOv8 ONNX model in the lambda-codebase/models directory within the cloned repository.

  2. In the lambda-codebase/app.py file, change the name of the YOLOv8 model to match the filename of the model you placed in the models directory.

  3. Deploy the project using AWS SAM:

sam build --use-container
sam deploy --guided

Follow the prompts to deploy your YOLOv8 model on AWS Lambda.

Testing the API Endpoint

To test the API endpoint, follow these steps:

In the test/test_api.py file, change the URL to match the endpoint of your deployed AWS Lambda function.

Run the test script:

python test/test_api.py

License

This project is licensed under the MIT License.

Contact

If you have any questions or feedback, you can reach out to davy@trainyolo.com

About

Deploy YOLOv8 on AWS Lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages