Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import FFV1MT_MS
|
|
8 |
import flow_tools
|
9 |
import spaces
|
10 |
|
11 |
-
@spaces.GPU
|
12 |
def process_images(videos, x, y):
|
13 |
# read video file
|
14 |
cap = cv2.VideoCapture(videos)
|
@@ -67,13 +67,14 @@ description = "## Introduction π₯π₯π₯\n" \
|
|
67 |
"The video presentation is available at [Video Record](https://recorder-v3.slideslive.com/?share=85662&s=6afe157c-e764-4e3c-9302-2c6dd6887db1). \n" \
|
68 |
"## Conference Website \n" \
|
69 |
"The project is presented at [NeurIPS 2023](https://neurips.cc/virtual/2023/poster/70202). \n" \
|
70 |
-
"## Below is the interactive demo of our model. You can select the
|
|
|
71 |
"We also provide two sliders to adjust the location of the attention visualizer. \n" \
|
72 |
" **Note**: The demo is running on CPU, so it may take a while to process the video. \n"
|
73 |
|
74 |
examples = [["example_1.mp4", 62, 56], ["example_2.mp4", 59, 55], ["example_3.mp4", 50, 50], ["example_4.mp4", 50, 50],
|
75 |
["example_5.mp4", 39, 72]]
|
76 |
-
|
77 |
md = "## Citation \n" \
|
78 |
"If you do think this work helps your research, please cite our work as:\n"\
|
79 |
"```\n"\
|
@@ -82,7 +83,7 @@ md = "## Citation \n" \
|
|
82 |
"title={Modeling Human Visual Motion Processing with Trainable Motion Energy Sensing and a Self-attention Network},\n"\
|
83 |
"author={Zitang Sun and Yen-Ju Chen and Yung-Hao Yang and Shin'ya Nishida},\n"\
|
84 |
"booktitle={Thirty-seventh Conference on Neural Information Processing Systems},\n"\
|
85 |
-
|
86 |
"url={https://openreview.net/forum?id=tRKimbAk5D}\n"\
|
87 |
"}\n"\
|
88 |
"```\n"\
|
@@ -90,7 +91,7 @@ md = "## Citation \n" \
|
|
90 |
"This project page is developed by Zitang Sun π§ (zitangsun96 @ gmail.com)\n" \
|
91 |
"## LICENSE \n" \
|
92 |
"This project is licensed under the terms of the MIT license. \n"\
|
93 |
-
|
94 |
"[Cognitive Informatics Lab](http://www.cog.ist.i.kyoto-u.ac.jp/en/index.html), Graduate School of Informatics, Kyoto University, Japan \n"
|
95 |
|
96 |
if __name__ =='__main__':
|
|
|
8 |
import flow_tools
|
9 |
import spaces
|
10 |
|
11 |
+
@spaces.GPU # for dynamic GPU resource
|
12 |
def process_images(videos, x, y):
|
13 |
# read video file
|
14 |
cap = cv2.VideoCapture(videos)
|
|
|
67 |
"The video presentation is available at [Video Record](https://recorder-v3.slideslive.com/?share=85662&s=6afe157c-e764-4e3c-9302-2c6dd6887db1). \n" \
|
68 |
"## Conference Website \n" \
|
69 |
"The project is presented at [NeurIPS 2023](https://neurips.cc/virtual/2023/poster/70202). \n" \
|
70 |
+
"## Below is the interactive demo of our model. You can select the video examples below or upload your own videos. "\
|
71 |
+
"The model outputs the motion flow field, the activation of the first stage, and the attention map of the second stage." \
|
72 |
"We also provide two sliders to adjust the location of the attention visualizer. \n" \
|
73 |
" **Note**: The demo is running on CPU, so it may take a while to process the video. \n"
|
74 |
|
75 |
examples = [["example_1.mp4", 62, 56], ["example_2.mp4", 59, 55], ["example_3.mp4", 50, 50], ["example_4.mp4", 50, 50],
|
76 |
["example_5.mp4", 39, 72]]
|
77 |
+
|
78 |
md = "## Citation \n" \
|
79 |
"If you do think this work helps your research, please cite our work as:\n"\
|
80 |
"```\n"\
|
|
|
83 |
"title={Modeling Human Visual Motion Processing with Trainable Motion Energy Sensing and a Self-attention Network},\n"\
|
84 |
"author={Zitang Sun and Yen-Ju Chen and Yung-Hao Yang and Shin'ya Nishida},\n"\
|
85 |
"booktitle={Thirty-seventh Conference on Neural Information Processing Systems},\n"\
|
86 |
+
"year={2023},\n"\
|
87 |
"url={https://openreview.net/forum?id=tRKimbAk5D}\n"\
|
88 |
"}\n"\
|
89 |
"```\n"\
|
|
|
91 |
"This project page is developed by Zitang Sun π§ (zitangsun96 @ gmail.com)\n" \
|
92 |
"## LICENSE \n" \
|
93 |
"This project is licensed under the terms of the MIT license. \n"\
|
94 |
+
"## Address π‘ \n" \
|
95 |
"[Cognitive Informatics Lab](http://www.cog.ist.i.kyoto-u.ac.jp/en/index.html), Graduate School of Informatics, Kyoto University, Japan \n"
|
96 |
|
97 |
if __name__ =='__main__':
|