I'm working on the project that requires me to run my code on the AWS cloud, I've tried some tutorial and I successfully used the python numpy module on AWS lambda, even I'm using window OS, following https://serverless.com/blog/serverless-python-packaging/
However, I would like to import the opencv, I installed opencv-python-headless bypip install opencv-python-headless. After all, I counldn't complete my development, it was told that the "unzipped size must be smaller than 262144000 bytes", it's true, since I had my .zip file with size more than 300000000 bytes.
My question is can I have the more simple opencv for installing, so I can have the package with smaller than the certain amount, I just want few codes about cv2:
faceCascade = cv2.CascadeClassifier(cascPath)
image = cv2.imread(imagePath, cv2.IMREAD_GRAYSCALE )
faces = faceCascade.detectMultiScale(
image,
scaleFactor=1.2,
minNeighbors=5,
minSize=(30, 50),
flags = cv2.CASCADE_SCALE_IMAGE
)
for (x, y, w, h) in faces:
cv2.rectangle(image, (x, y), (x+w, y+h), (0, 255, 0), 2)
......
lastimg = cv2.resize(crop_img, (182, 182))
cv2.imwrite("crop_{}".format(imagePath), lastimg)
OR is there any method to run these code on AWS cloud, (for example, can I upload my opencv module on AWS S3, and download it when running the above python code.