https://github.com/t04glovern/aws-opencv-serverless
Run OpenCV 4.0 on Lambda using Serverless framework
https://github.com/t04glovern/aws-opencv-serverless
aws-lambda aws-s3 opencv-python opencv4 serverless serverless-framework
Last synced: about 1 year ago
JSON representation
Run OpenCV 4.0 on Lambda using Serverless framework
- Host: GitHub
- URL: https://github.com/t04glovern/aws-opencv-serverless
- Owner: t04glovern
- Created: 2019-05-07T14:02:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-07T00:45:21.000Z (over 5 years ago)
- Last Synced: 2025-04-11T01:06:14.661Z (about 1 year ago)
- Topics: aws-lambda, aws-s3, opencv-python, opencv4, serverless, serverless-framework
- Language: Python
- Homepage: https://devopstar.com/2019/05/07/opencv-4-0-serverless-lambda/
- Size: 1.16 MB
- Stars: 8
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenCV on Lambda
Run OpenCV 4.0 on Lambda using Serverless framework. Extract images from scanned documents
## Serverless Setup
```bash
## Project Setup
mkdir opencv-serverless
cd opencv-serverless
serverless create --template aws-python3 --name opencv-serverless
```
### Requirements
```bash
serverless plugin install -n serverless-python-requirements
```
Create a `requirements.txt` file with the following
```bash
opencv-python==4.1.0.25
numpy==1.16.3
```
Also add the following to the `custom` area in the serverless.yaml template.
```bash
custom:
pythonRequirements:
dockerizePip: non-linux
noDeploy: []
```
### Deploy
```bash
serverless deploy
```
### Test
```bash
aws s3 cp in/square-test.png s3://devopstar-opencv-processing-bucket/square-test.png
aws s3 cp s3://devopstar-opencv-output-bucket/square-test.png out/square-test.png
```