Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
陈科研 committed Dec 30, 2023
1 parent 88ccc78 commit 1cf33c0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
title: TTP Demo Space
emoji: 🤗
colorFrom: yellow
colorTo: orange
title: TTP
emoji: 📉
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 4.12.0
app_file: app.py
pinned: false
---
license: apache-2.0
---

This is the demo of ["Time Travelling Pixels: Bitemporal Features Integration with Foundation Model for Remote Sensing Image Change Detection"](https://arxiv.org/abs/2312.16202). Seeing [Github](https://github.com/KyanChen/TTP) for more information!

17 changes: 15 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ def infer(img1, img2):


with gr.Blocks() as demo:
gr.Markdown(
"""
# [Time Travelling Pixels: Bitemporal Features Integration with Foundation Model for Remote Sensing Image Change Detection](https://arxiv.org/abs/2312.16202)
""")
# a empty row
gr.Row()

with gr.Row():
input_0 = gr.Image(label='Input Image1')
input_1 = gr.Image(label='Input Image2')
Expand All @@ -36,7 +43,13 @@ def infer(img1, img2):
img1_files = glob.glob('samples/A/*.png')
img2_files = [f.replace('A', 'B') for f in img1_files]
input_files = [[x, y] for x, y in zip(img1_files, img2_files)]
gr.Examples(input_files, fn=infer, inputs=[input_0, input_1], outputs=[output_gt], cache_examples=True)
gr.Examples(input_files, fn=infer, inputs=[input_0, input_1], outputs=[output_gt], cache_examples=False)
gr.Markdown(
"""
This is the demo of ["Time Travelling Pixels: Bitemporal Features Integration with Foundation Model for Remote Sensing Image Change Detection"](https://arxiv.org/abs/2312.16202). Seeing [Github](https://github.com/KyanChen/TTP) for more information!
""")
# a empty row
gr.Row()

if __name__ == "__main__":
demo.launch()
demo.launch()
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ peft
scipy
ftfy
prettytable
torchmetrics
torchmetrics
modelindex

0 comments on commit 1cf33c0

Please sign in to comment.