livepeer / ai-worker

https://livepeer.ai
MIT License
17 stars 27 forks source link

add video support to segment-anything-2 pipeline #181

Open eliteprox opened 1 month ago

eliteprox commented 1 month ago

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.