Spaces:
Running
on
Zero
Running
on
Zero
wondervictor
commited on
Commit
•
ed5c7a1
1
Parent(s):
b00ff60
update examples
Browse files- __pycache__/inference.cpython-310.pyc +0 -0
- app.py +26 -6
- assets/boy.mp4 +0 -3
- assets/cat.mp4 +2 -2
- assets/dog.mp4 +2 -2
- assets/elephant.mp4 +2 -2
- assets/people.mp4 +2 -2
- model/__pycache__/configuration_evf.cpython-310.pyc +0 -0
- model/__pycache__/evf_sam2.cpython-310.pyc +0 -0
- model/__pycache__/evf_sam2_video.cpython-310.pyc +0 -0
- model/segment_anything/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything/__pycache__/automatic_mask_generator.cpython-310.pyc +0 -0
- model/segment_anything/__pycache__/build_sam.cpython-310.pyc +0 -0
- model/segment_anything/__pycache__/predictor.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/common.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/image_encoder.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/mask_decoder.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/prompt_encoder.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/sam.cpython-310.pyc +0 -0
- model/segment_anything/modeling/__pycache__/transformer.cpython-310.pyc +0 -0
- model/segment_anything/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything/utils/__pycache__/amg.cpython-310.pyc +0 -0
- model/segment_anything/utils/__pycache__/transforms.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/__pycache__/build_sam.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/__pycache__/sam2_video_predictor.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/__pycache__/memory_attention.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/__pycache__/memory_encoder.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/__pycache__/position_encoding.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/__pycache__/sam2_base.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/__pycache__/sam2_utils.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/backbones/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/backbones/__pycache__/hieradet.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/backbones/__pycache__/image_encoder.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/backbones/__pycache__/utils.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/sam/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/sam/__pycache__/mask_decoder.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/sam/__pycache__/prompt_encoder.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/modeling/sam/__pycache__/transformer.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/utils/__pycache__/__init__.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2/utils/__pycache__/misc.cpython-310.pyc +0 -0
- model/segment_anything_2/sam2_configs/__pycache__/__init__.cpython-310.pyc +0 -0
- 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 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
3 |
-
size
|
|
|
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:
|
3 |
-
size
|
|
|
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:
|
3 |
-
size
|
|
|
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:
|
3 |
-
size
|
|
|
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
|
|