Spaces:
Running
on
Zero
Running
on
Zero
derektan
commited on
Commit
·
d58fe81
1
Parent(s):
917af18
Shortlisted tax for demo
Browse files- app.py +6 -43
- test_parameter.py +1 -1
app.py
CHANGED
@@ -289,7 +289,7 @@ with gr.Blocks(title="Search-TTA (Simplified)", theme=gr.themes.Base()) as demo:
|
|
289 |
|
290 |
# EXAMPLES – copied from original demo (satellite, ground, taxonomy only)
|
291 |
with gr.Row():
|
292 |
-
gr.Markdown("###
|
293 |
with gr.Row():
|
294 |
gr.Examples(
|
295 |
examples=[
|
@@ -299,14 +299,9 @@ with gr.Blocks(title="Search-TTA (Simplified)", theme=gr.themes.Base()) as demo:
|
|
299 |
"Animalia Chordata Aves Charadriiformes Laridae Larus marinus",
|
300 |
],
|
301 |
[
|
302 |
-
"examples/
|
303 |
-
"examples/
|
304 |
-
"Animalia Chordata Mammalia
|
305 |
-
],
|
306 |
-
[
|
307 |
-
"examples/Animalia_Arthropoda_Malacostraca_Decapoda_Ocypodidae_Ocypode_quadrata/277303_38.72364_-75.07749.jpg",
|
308 |
-
"examples/Animalia_Arthropoda_Malacostraca_Decapoda_Ocypodidae_Ocypode_quadrata/0b9cc264-a2ba-44bd-8e41-0d01a6edd1e8.jpg",
|
309 |
-
"Animalia Arthropoda Malacostraca Decapoda Ocypodidae Ocypode quadrata",
|
310 |
],
|
311 |
[
|
312 |
"examples/Animalia_Chordata_Mammalia_Rodentia_Sciuridae_Marmota_marmota/388246_45.49036_7.14796.jpg",
|
@@ -325,38 +320,6 @@ with gr.Blocks(title="Search-TTA (Simplified)", theme=gr.themes.Base()) as demo:
|
|
325 |
cache_examples=False,
|
326 |
)
|
327 |
|
328 |
-
with gr.Row():
|
329 |
-
gr.Markdown("### Out-Domain Taxonomy")
|
330 |
-
with gr.Row():
|
331 |
-
gr.Examples(
|
332 |
-
examples=[
|
333 |
-
[
|
334 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Phocidae_Mirounga_angustirostris/27423_35.64005_-121.17595.jpg",
|
335 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Phocidae_Mirounga_angustirostris/3aac526d-c921-452a-af6a-cb4f2f52e2c4.jpg",
|
336 |
-
"Animalia Chordata Mammalia Carnivora Phocidae Mirounga angustirostris",
|
337 |
-
],
|
338 |
-
[
|
339 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Canidae_Canis_aureus/1528408_13.00422_80.23033.jpg",
|
340 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Canidae_Canis_aureus/37faabd2-a613-4461-b27e-82fe5955ecaf.jpg",
|
341 |
-
"Animalia Chordata Mammalia Carnivora Canidae Canis aureus",
|
342 |
-
],
|
343 |
-
[
|
344 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Ursidae_Ursus_americanus/yosemite_v3_resized.png",
|
345 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Ursidae_Ursus_americanus/248820933.jpeg",
|
346 |
-
"Animalia Chordata Mammalia Carnivora Ursidae Ursus americanus",
|
347 |
-
],
|
348 |
-
[
|
349 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Canidae_Urocyon_littoralis/304160_34.0144_-119.54417.jpg",
|
350 |
-
"examples/Animalia_Chordata_Mammalia_Carnivora_Canidae_Urocyon_littoralis/0cbdfbf2-6cfe-4d61-9602-c949f24d0293.jpg",
|
351 |
-
"Animalia Chordata Mammalia Carnivora Canidae Urocyon littoralis",
|
352 |
-
],
|
353 |
-
],
|
354 |
-
inputs=[sat_input, ground_input, taxonomy_input],
|
355 |
-
outputs=[run_tta_btn, run_no_tta_btn, display_img_tta],
|
356 |
-
fn=process_with_tta,
|
357 |
-
cache_examples=False,
|
358 |
-
)
|
359 |
-
|
360 |
|
361 |
run_tta_btn.click(
|
362 |
fn=process_with_tta,
|
@@ -383,8 +346,8 @@ if __name__ == "__main__":
|
|
383 |
from app_multimodal_inference import demo as multimodal_demo
|
384 |
|
385 |
combined_demo = gr.TabbedInterface(
|
386 |
-
[
|
387 |
-
["
|
388 |
)
|
389 |
combined_demo.queue(max_size=15)
|
390 |
combined_demo.launch(share=True)
|
|
|
289 |
|
290 |
# EXAMPLES – copied from original demo (satellite, ground, taxonomy only)
|
291 |
with gr.Row():
|
292 |
+
gr.Markdown("### Taxonomy")
|
293 |
with gr.Row():
|
294 |
gr.Examples(
|
295 |
examples=[
|
|
|
299 |
"Animalia Chordata Aves Charadriiformes Laridae Larus marinus",
|
300 |
],
|
301 |
[
|
302 |
+
"examples/Animalia_Chordata_Mammalia_Carnivora_Ursidae_Ursus_americanus/yosemite_v3_resized.png",
|
303 |
+
"examples/Animalia_Chordata_Mammalia_Carnivora_Ursidae_Ursus_americanus/248820933.jpeg",
|
304 |
+
"Animalia Chordata Mammalia Carnivora Ursidae Ursus americanus",
|
|
|
|
|
|
|
|
|
|
|
305 |
],
|
306 |
[
|
307 |
"examples/Animalia_Chordata_Mammalia_Rodentia_Sciuridae_Marmota_marmota/388246_45.49036_7.14796.jpg",
|
|
|
320 |
cache_examples=False,
|
321 |
)
|
322 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
run_tta_btn.click(
|
325 |
fn=process_with_tta,
|
|
|
346 |
from app_multimodal_inference import demo as multimodal_demo
|
347 |
|
348 |
combined_demo = gr.TabbedInterface(
|
349 |
+
[demo, multimodal_demo],
|
350 |
+
["Search-TTA", "Multimodal Inference"]
|
351 |
)
|
352 |
combined_demo.queue(max_size=15)
|
353 |
combined_demo.launch(share=True)
|
test_parameter.py
CHANGED
@@ -45,7 +45,7 @@ VIZ_GRAPH_EDGES = False # do you want to visualize the graph edges
|
|
45 |
# MODEL_NAME = "vlm_search_20x20_200125_256steps_CORRECT_REWARDS.pth" # checkpoint.pth
|
46 |
MODEL_NAME = "STAGE1_vlm_search_24x24_040425_no_tgt_rewards_iNAT_DS_16k.pth"
|
47 |
|
48 |
-
NUM_EPS_STEPS = getenv("NUM_EPS_STEPS", default=
|
49 |
TERMINATE_ON_TGTS_FOUND = False # Whether to terminate episode when all targets found
|
50 |
FORCE_LOGGING_DONE_TGTS_FOUND = True # Whether to force csv logging when all targets found
|
51 |
FIX_START_POSITION = getenv("FIX_START_POSITION", default=True, cast_type=bool) # Whether to fix the starting position of the robots (middle index)
|
|
|
45 |
# MODEL_NAME = "vlm_search_20x20_200125_256steps_CORRECT_REWARDS.pth" # checkpoint.pth
|
46 |
MODEL_NAME = "STAGE1_vlm_search_24x24_040425_no_tgt_rewards_iNAT_DS_16k.pth"
|
47 |
|
48 |
+
NUM_EPS_STEPS = getenv("NUM_EPS_STEPS", default=256, cast_type=int)
|
49 |
TERMINATE_ON_TGTS_FOUND = False # Whether to terminate episode when all targets found
|
50 |
FORCE_LOGGING_DONE_TGTS_FOUND = True # Whether to force csv logging when all targets found
|
51 |
FIX_START_POSITION = getenv("FIX_START_POSITION", default=True, cast_type=bool) # Whether to fix the starting position of the robots (middle index)
|