wondervictor commited on
Commit
ed5c7a1
1 Parent(s): b00ff60

update examples

Browse files
Files changed (45) hide show
  1. __pycache__/inference.cpython-310.pyc +0 -0
  2. app.py +26 -6
  3. assets/boy.mp4 +0 -3
  4. assets/cat.mp4 +2 -2
  5. assets/dog.mp4 +2 -2
  6. assets/elephant.mp4 +2 -2
  7. assets/people.mp4 +2 -2
  8. model/__pycache__/configuration_evf.cpython-310.pyc +0 -0
  9. model/__pycache__/evf_sam2.cpython-310.pyc +0 -0
  10. model/__pycache__/evf_sam2_video.cpython-310.pyc +0 -0
  11. model/segment_anything/__pycache__/__init__.cpython-310.pyc +0 -0
  12. model/segment_anything/__pycache__/automatic_mask_generator.cpython-310.pyc +0 -0
  13. model/segment_anything/__pycache__/build_sam.cpython-310.pyc +0 -0
  14. model/segment_anything/__pycache__/predictor.cpython-310.pyc +0 -0
  15. model/segment_anything/modeling/__pycache__/__init__.cpython-310.pyc +0 -0
  16. model/segment_anything/modeling/__pycache__/common.cpython-310.pyc +0 -0
  17. model/segment_anything/modeling/__pycache__/image_encoder.cpython-310.pyc +0 -0
  18. model/segment_anything/modeling/__pycache__/mask_decoder.cpython-310.pyc +0 -0
  19. model/segment_anything/modeling/__pycache__/prompt_encoder.cpython-310.pyc +0 -0
  20. model/segment_anything/modeling/__pycache__/sam.cpython-310.pyc +0 -0
  21. model/segment_anything/modeling/__pycache__/transformer.cpython-310.pyc +0 -0
  22. model/segment_anything/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  23. model/segment_anything/utils/__pycache__/amg.cpython-310.pyc +0 -0
  24. model/segment_anything/utils/__pycache__/transforms.cpython-310.pyc +0 -0
  25. model/segment_anything_2/sam2/__pycache__/__init__.cpython-310.pyc +0 -0
  26. model/segment_anything_2/sam2/__pycache__/build_sam.cpython-310.pyc +0 -0
  27. model/segment_anything_2/sam2/__pycache__/sam2_video_predictor.cpython-310.pyc +0 -0
  28. model/segment_anything_2/sam2/modeling/__pycache__/__init__.cpython-310.pyc +0 -0
  29. model/segment_anything_2/sam2/modeling/__pycache__/memory_attention.cpython-310.pyc +0 -0
  30. model/segment_anything_2/sam2/modeling/__pycache__/memory_encoder.cpython-310.pyc +0 -0
  31. model/segment_anything_2/sam2/modeling/__pycache__/position_encoding.cpython-310.pyc +0 -0
  32. model/segment_anything_2/sam2/modeling/__pycache__/sam2_base.cpython-310.pyc +0 -0
  33. model/segment_anything_2/sam2/modeling/__pycache__/sam2_utils.cpython-310.pyc +0 -0
  34. model/segment_anything_2/sam2/modeling/backbones/__pycache__/__init__.cpython-310.pyc +0 -0
  35. model/segment_anything_2/sam2/modeling/backbones/__pycache__/hieradet.cpython-310.pyc +0 -0
  36. model/segment_anything_2/sam2/modeling/backbones/__pycache__/image_encoder.cpython-310.pyc +0 -0
  37. model/segment_anything_2/sam2/modeling/backbones/__pycache__/utils.cpython-310.pyc +0 -0
  38. model/segment_anything_2/sam2/modeling/sam/__pycache__/__init__.cpython-310.pyc +0 -0
  39. model/segment_anything_2/sam2/modeling/sam/__pycache__/mask_decoder.cpython-310.pyc +0 -0
  40. model/segment_anything_2/sam2/modeling/sam/__pycache__/prompt_encoder.cpython-310.pyc +0 -0
  41. model/segment_anything_2/sam2/modeling/sam/__pycache__/transformer.cpython-310.pyc +0 -0
  42. model/segment_anything_2/sam2/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  43. model/segment_anything_2/sam2/utils/__pycache__/misc.cpython-310.pyc +0 -0
  44. model/segment_anything_2/sam2_configs/__pycache__/__init__.cpython-310.pyc +0 -0
  45. model/unilm/beit3/__pycache__/modeling_utils.cpython-310.pyc +0 -0
__pycache__/inference.cpython-310.pyc ADDED
Binary file (5.32 kB). View file
 
app.py CHANGED
@@ -172,6 +172,19 @@ with gr.Blocks() as demo:
172
  label="semantic level",
173
  info="check this if you want to segment body parts or background or multi objects (only available with latest evf-sam checkpoint)"
174
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  with gr.Tab(label="EVF-SAM-2-Video"):
176
  with gr.Row():
177
  input_video = gr.Video(label='Input Video')
@@ -192,10 +205,17 @@ with gr.Blocks() as demo:
192
  info="check this if you want to segment body parts or background or multi objects (only available with latest evf-sam checkpoint)"
193
  )
194
 
195
- submit_image.click(fn=inference_image,
196
- inputs=[input_image, image_prompt, semantic_type_img],
197
- outputs=output_image)
198
- submit_video.click(fn=inference_video,
199
- inputs=[input_video, video_prompt, semantic_type_vid],
200
- outputs=output_video)
 
 
 
 
 
 
 
201
  demo.launch(show_error=True)
 
172
  label="semantic level",
173
  info="check this if you want to segment body parts or background or multi objects (only available with latest evf-sam checkpoint)"
174
  )
175
+ submit_image.click(fn=inference_image,
176
+ inputs=[input_image, image_prompt, semantic_type_img],
177
+ outputs=output_image)
178
+ gr.Examples(
179
+ [
180
+ ["assets/zebra.jpg", "zebra bottum left", False],
181
+ ["assets/bus.jpg", "bus", True],
182
+ ["assets/seaside_sdxl.png", "sky", True],
183
+ ["assets/man_sdxl.png", "face", True]
184
+ ],
185
+ inputs=[input_image, image_prompt, semantic_type_img],
186
+ outputs=output_image
187
+ )
188
  with gr.Tab(label="EVF-SAM-2-Video"):
189
  with gr.Row():
190
  input_video = gr.Video(label='Input Video')
 
205
  info="check this if you want to segment body parts or background or multi objects (only available with latest evf-sam checkpoint)"
206
  )
207
 
208
+
209
+ submit_video.click(fn=inference_video,
210
+ inputs=[input_video, video_prompt, semantic_type_vid],
211
+ outputs=output_video)
212
+ gr.Examples(
213
+ [
214
+ ["assets/elephant.mp4", "sky", True],
215
+ ["assets/dog.mp4", "dog", False],
216
+ ["assets/cat.mp4", "cat", False]
217
+ ],
218
+ inputs=[input_video, video_prompt, semantic_type_vid],
219
+ outputs=output_video
220
+ )
221
  demo.launch(show_error=True)
assets/boy.mp4 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:625d251f0fe22562f92e9a484e6e3e582fdb9a99660071492bc914556e5f6215
3
- size 4187346
 
 
 
 
assets/cat.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0763a8a69c0f64f963fad7f76cb51089c32bc23713f9ffb540f55583c727c817
3
- size 4407171
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a9e0488d65865fc88511c94206fb51192af133aa8faf3f3031c0766bb64e7cf
3
+ size 6533386
assets/dog.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fbe970fcf0c178fdf5eebbc1a972edda82902f0ffb495dcb4507f123bf8e6c46
3
- size 3947779
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95a2c4255b060cee2cef317aa484e0c4eddbfa43323a51af5669777f266fa857
3
+ size 6524607
assets/elephant.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e075b728ac7c9de69fcf71e189c21761fc2ec4f113137ec865b49620f06b1a91
3
- size 3201357
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:910db47c927fbb3dad81b9830f64177be01300efa502765906732a6409667474
3
+ size 6587606
assets/people.mp4 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ac2cdf383aff5f0f6ba1348bc73e479b24d3fb70a2afb7043a9aa944ba0a4059
3
- size 5722593
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa377df6f27504ee37d14bd9a9fe5179b159a3bcd2b09609cc36112291f3afbb
3
+ size 6660792
model/__pycache__/configuration_evf.cpython-310.pyc ADDED
Binary file (3.65 kB). View file
 
model/__pycache__/evf_sam2.cpython-310.pyc ADDED
Binary file (8.95 kB). View file
 
model/__pycache__/evf_sam2_video.cpython-310.pyc ADDED
Binary file (5.71 kB). View file
 
model/segment_anything/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (401 Bytes). View file
 
model/segment_anything/__pycache__/automatic_mask_generator.cpython-310.pyc ADDED
Binary file (11.4 kB). View file
 
model/segment_anything/__pycache__/build_sam.cpython-310.pyc ADDED
Binary file (2.16 kB). View file
 
model/segment_anything/__pycache__/predictor.cpython-310.pyc ADDED
Binary file (9.97 kB). View file
 
model/segment_anything/modeling/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (388 Bytes). View file
 
model/segment_anything/modeling/__pycache__/common.cpython-310.pyc ADDED
Binary file (1.74 kB). View file
 
model/segment_anything/modeling/__pycache__/image_encoder.cpython-310.pyc ADDED
Binary file (12.9 kB). View file
 
model/segment_anything/modeling/__pycache__/mask_decoder.cpython-310.pyc ADDED
Binary file (5.49 kB). View file
 
model/segment_anything/modeling/__pycache__/prompt_encoder.cpython-310.pyc ADDED
Binary file (7.85 kB). View file
 
model/segment_anything/modeling/__pycache__/sam.cpython-310.pyc ADDED
Binary file (6.69 kB). View file
 
model/segment_anything/modeling/__pycache__/transformer.cpython-310.pyc ADDED
Binary file (6.6 kB). View file
 
model/segment_anything/utils/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (148 Bytes). View file
 
model/segment_anything/utils/__pycache__/amg.cpython-310.pyc ADDED
Binary file (12.1 kB). View file
 
model/segment_anything/utils/__pycache__/transforms.cpython-310.pyc ADDED
Binary file (3.99 kB). View file
 
model/segment_anything_2/sam2/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (277 Bytes). View file
 
model/segment_anything_2/sam2/__pycache__/build_sam.cpython-310.pyc ADDED
Binary file (1.96 kB). View file
 
model/segment_anything_2/sam2/__pycache__/sam2_video_predictor.cpython-310.pyc ADDED
Binary file (18.2 kB). View file
 
model/segment_anything_2/sam2/modeling/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (158 Bytes). View file
 
model/segment_anything_2/sam2/modeling/__pycache__/memory_attention.cpython-310.pyc ADDED
Binary file (4.03 kB). View file
 
model/segment_anything_2/sam2/modeling/__pycache__/memory_encoder.cpython-310.pyc ADDED
Binary file (5.01 kB). View file
 
model/segment_anything_2/sam2/modeling/__pycache__/position_encoding.cpython-310.pyc ADDED
Binary file (7.47 kB). View file
 
model/segment_anything_2/sam2/modeling/__pycache__/sam2_base.cpython-310.pyc ADDED
Binary file (17.7 kB). View file
 
model/segment_anything_2/sam2/modeling/__pycache__/sam2_utils.cpython-310.pyc ADDED
Binary file (6.03 kB). View file
 
model/segment_anything_2/sam2/modeling/backbones/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (168 Bytes). View file
 
model/segment_anything_2/sam2/modeling/backbones/__pycache__/hieradet.cpython-310.pyc ADDED
Binary file (7.05 kB). View file
 
model/segment_anything_2/sam2/modeling/backbones/__pycache__/image_encoder.cpython-310.pyc ADDED
Binary file (3.42 kB). View file
 
model/segment_anything_2/sam2/modeling/backbones/__pycache__/utils.cpython-310.pyc ADDED
Binary file (3.24 kB). View file
 
model/segment_anything_2/sam2/modeling/sam/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (162 Bytes). View file
 
model/segment_anything_2/sam2/modeling/sam/__pycache__/mask_decoder.cpython-310.pyc ADDED
Binary file (7.83 kB). View file
 
model/segment_anything_2/sam2/modeling/sam/__pycache__/prompt_encoder.cpython-310.pyc ADDED
Binary file (7.96 kB). View file
 
model/segment_anything_2/sam2/modeling/sam/__pycache__/transformer.cpython-310.pyc ADDED
Binary file (8.91 kB). View file
 
model/segment_anything_2/sam2/utils/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (155 Bytes). View file
 
model/segment_anything_2/sam2/utils/__pycache__/misc.cpython-310.pyc ADDED
Binary file (7.56 kB). View file
 
model/segment_anything_2/sam2_configs/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (157 Bytes). View file
 
model/unilm/beit3/__pycache__/modeling_utils.cpython-310.pyc ADDED
Binary file (2.97 kB). View file