segment-anything
segment-anything copied to clipboard
Add video segmentation feature
Add video segmentation functionality to the project.
-
segment_anything/predictor.py
- Add
segment_videofunction to read video frames and segment objects usingSamPredictor. - Import
cv2for video processing.
- Add
-
demo/src/App.tsx
- Add state variable
isVideoto handle video input. - Add
handleVideoUploadfunction to process video files and callsegment_video. - Update
runONNXfunction to handle video frames ifisVideois true.
- Add state variable
-
demo/src/components/Tool.tsx
- Add
isVideoprop to handle video input. - Update
rendermethod to display video frames ifisVideois true.
- Add
-
README.md
- Add instructions for using the new video segmentation feature.