junma commited on
Commit
e974ac1
·
verified ·
1 Parent(s): e3e5d76

add readme

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -350,8 +350,19 @@ def seg_track_app():
350
  gr.Markdown(
351
  '''
352
  <div style="text-align:center;">
353
- <span style="font-size:3em; font-weight:bold;">SAM2</span>
354
  </div>
 
 
 
 
 
 
 
 
 
 
 
355
  '''
356
  )
357
 
@@ -409,7 +420,7 @@ def seg_track_app():
409
  value=0.0,
410
  )
411
  new_object_button = gr.Button(
412
- value="Add new object",
413
  interactive=True
414
  )
415
  track_for_video = gr.Button(
 
350
  gr.Markdown(
351
  '''
352
  <div style="text-align:center;">
353
+ <span style="font-size:3em; font-weight:bold;">SAM2 for Video Segmentation 🔥</span>
354
  </div>
355
+ This API supports using box (generated by scribble) and point prompts for video segmentation with SAM2.
356
+
357
+ 1. Upload video file
358
+ 2. Select mdoel size and downsample frame rate and run `Preprocess`
359
+ 3. Use `Stroke to Box Prompt` to draw box on the first frame or `Point Prompt` to click on the first frame.
360
+ Note: The bounding rectangle of the stroke should be able to conver the segmentation target.
361
+ 4. Click `Segment` to get the segmentation result
362
+ 5. Click `Add New Object` to add new object
363
+ 6. Click `Start Tracking` to track objects in the video
364
+ 7. Click `Reset` to reset the app
365
+ 8. Download the video with segmentation results
366
  '''
367
  )
368
 
 
420
  value=0.0,
421
  )
422
  new_object_button = gr.Button(
423
+ value="Add New Object",
424
  interactive=True
425
  )
426
  track_for_video = gr.Button(