0

I am currently working on deploying a SageMaker endpoint with custom inference code and a custom container for object detection and tracking. My goal is to perform real-time video analysis on videos stored in Amazon S3. However, I'm facing difficulties with parsing video files and sending them to the endpoint without encountering server timeouts.

I have attempted to directly send the video file to the endpoint via the API, but the server time runs out before the entire video is downloaded. After researching online, I came across suggestions that videos should be pre-processed into frames and then sent through the API. However, my custom inference code is designed to work with video files, not individual frames.

What would be the most efficient way to handle video files stored in S3 and feed them into a SageMaker endpoint for object detection and tracking, considering my custom inference code only supports video input?

Here are some specific questions I have:

  1. How can I efficiently parse and process video files from S3 in real-time and feed them into the SageMaker endpoint without incurring server timeouts?
  2. Is there a way to modify my custom inference code to work with individual frames instead of full video files, so I can leverage the suggested approach of pre-processing videos into frames?
  3. If modifying my inference code is not feasible, what are some alternatives to handle video files directly without encountering server timeouts?
  4. Are there any best practices or optimization techniques for working with video data in SageMaker endpoints that can improve overall performance?
  5. Any insights, code examples, or recommended resources related to video processing in SageMaker and deploying custom containers would be greatly appreciated.

Thank you in advance for your help!

sid
  • 1

1 Answers1

0

If you would like you can use Async endpoints. These endpoints have a 1 hour timeout period per request and allow for 1GB payloads.

See this blog here which shows how to run inference on large videos. https://aws.amazon.com/blogs/machine-learning/run-computer-vision-inference-on-large-videos-with-amazon-sagemaker-asynchronous-endpoints/

Marc Karp
  • 949
  • 4
  • 6