- Newest
- Most votes
- Most comments
The best solution will likely depend on:
- What kind of object you're looking at (whether it's something common that Rekognition could already pick up with no training required, as mentioned in Didier's answer - or whether it's something that might be intrinsically difficult like shiny/mirrored surfaces, or etc)
- Whether your solution needs to operate "online" with streaming video & low-latency detections, or just process already-captured video files in batch.
- How fast of a frame rate you need to capture the important things happening in your scene.
- Whether you need to track the object around between multiple frames, or (it sounds like) just extract one particular occasion where the object appeared.
In general, video is very high-bandwidth data and real-world storage formats (e.g. mp4) are compressed very efficiently. If your scene moves quite slowly so that you only need to analyse 1FPS or less to get a good picture of what's going on, then yes treating this as an image analysis problem might be most efficient. If you need to analyze every frame of e.g. 30FPS video (perhaps because your target object is only in shot briefly, or actions/motion in the video are important, or you need to track the same object's motion over time) - then I'd really try to avoid anything that converts every frame image into an HTTP(S) request because it'll be a lot of data movement. Even if the network cost isn't an issue, the speed is likely to be slow.
Most ML models for video are anyway a combination of some frame-wise image processing and then some aggregator between frames: For example see ByteTrack and FairMOT for multi-object tracking. The lower the frame-rate, the more things reduce to just being the same as image analysis.
Libraries like ffmpeg (which has some Python binding options) and OpenCV can help with splitting video into chunks and iterating through frames from Python. You can absolutely make a SageMaker model that takes short video chunks (mp4/mkv/etc) rather than images as a payload, so long as your input_fn or similar knows how to load them into a format your ML model understands.
If you need streaming, Kinesis Video Streams Consumer Library for Python could give you an option to use Kinesis to handle your video streaming and then read those streamed chunks into a Python environment. Consumers need to pull chunks from Kinesis, so you'd need to have some kind of long-lived service e.g. ECS running that to forward the requests to your ML model.
If you're okay to process in batch, you might be interested to chunk your videos anyway to parallelize for faster processing. You could just run your analysis in a SageMaker Processing/Training job or similar
Obstruction / occlusion is a little tricky because most of the research & models I've been aware of have been aiming for robustness to occlusion: Still detecting the object even if part is covered. If you know what's likely to get in the way, you could try to use an open-vocabulary object detector like Amazon Rekognition or YOLO-World on SageMaker to detect other overlapping objects & prefer other frames where possible. If you want robustness to any unexpected obstructions, you might want to do something more complex like pixel segmentation & post-processing... Or even try asking a generative model like Anthropic Claude 3 Sonnet on Amazon Bedrock whether anything is obstructing the view of {your object}?
Hi,
Did you consider AWS Rekognition for your use case: it already provides out of the box much of the features that you are looking for.
See https://aws.amazon.com/rekognition/ as a starting point
Best,
Didier
Relevant content
asked 3 years ago
asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 years ago

Hi Didier,
I have considered it for the overall project, but it seems like there are no APIs that directly do positional analysis of objects. It seems like I would have to do customLabels or either utilize SageMaker.
Please let me know if you think otherwise.
Rekognition's DetectLabels API should provide bounding box localization of a wide range of objects with no training required, and you can try it out from the AWS Console so it might be worth uploading a couple of test frames there to see if it can already reliably detect whatever object it is you're looking for... But if your object isn't something Rekognition recognises well out-of-the-box, then yeah would probably be looking at SageMaker or Rek Custom Labels