This change updates the request field image to media_file and loads the appropriate segment-anything-2 inference model based on the content type of the file. It uses ffmpeg to process the video to image frames and loads them in with inference values from the request.
Some adjustments still need to be made to the request/response parameters. I think "frame index" and "object id' may be two request parameters to add to this pipeline for the video requests, I've hard coded some values for now.
This change updates the request field
image
tomedia_file
and loads the appropriate segment-anything-2 inference model based on the content type of the file. It uses ffmpeg to process the video to image frames and loads them in with inference values from the request.Some adjustments still need to be made to the request/response parameters. I think "frame index" and "object id' may be two request parameters to add to this pipeline for the video requests, I've hard coded some values for now.