With larger images (e.g. >3 MB, like those that Browning produce, see attached example), the images will successfully get predictions from the MegaDetector endpoints, but they consistently fail with the following error on both the MIRAv2 and NZDOC endpoints:
Error: ValidationError: Request {request_id} has oversize body.
All endpoints have their maximumMemorySizeInMB set to 6 GB.
For now I'm going to try to resize images on the animl-api-inference Lambda side before sending them to the Sagemaker Serverless Endpoints for classification if they are too large and see if that does the trick.
With larger images (e.g. >3 MB, like those that Browning produce, see attached example), the images will successfully get predictions from the MegaDetector endpoints, but they consistently fail with the following error on both the MIRAv2 and NZDOC endpoints:
Error: ValidationError: Request {request_id} has oversize body.
All endpoints have their maximum
MemorySizeInMB
set to 6 GB.My best guess at the moment is that the pre-processing steps of cropping out the bounding box are inflating the memory-usage significantly, as it seems like this person was experiencing & described on StackOverflow: https://stackoverflow.com/questions/77537913/sagemaker-serverless-validationerror-oversize-body
For now I'm going to try to resize images on the
animl-api-inference
Lambda side before sending them to the Sagemaker Serverless Endpoints for classification if they are too large and see if that does the trick.