Spaces:
Running
Running
Commit
Β·
e2e1f8a
1
Parent(s):
ab9882a
Update hf checkpoint links
Browse files- README.md +7 -7
- demo.ipynb +1 -1
- demo.py +1 -1
- scripts/ckpts.py +1 -1
README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
| 10 |
<a href="https://linkedin.com/in/dmitriyvatolin">Dmitriy Vatolin</a>
|
| 11 |
</p>
|
| 12 |
<h3 align="center">ICCV 2025</h3>
|
| 13 |
-
<h3 align="center"><a href="https://arxiv.org/abs/2506.23151">π Paper</a> | <a href="https://msu-video-group.github.io/memfof">π Project Page</a> | <a href="https://colab.research.google.com/github/msu-video-group/memfof/blob/dev/demo.ipynb">π Colab</a> | <a href="https://huggingface.co/spaces/egorchistov/MEMFOF">π€ Demo</a></h3>
|
| 14 |
</p>
|
| 15 |
|
| 16 |
## π
Overview
|
|
@@ -48,12 +48,12 @@ python3 demo.py
|
|
| 48 |
|
| 49 |
## π¦ Models
|
| 50 |
|
| 51 |
-
- [`MEMFOF-Tartan`](https://huggingface.co/egorchistov/MEMFOF-Tartan)
|
| 52 |
-
- [`MEMFOF-Tartan-T`](https://huggingface.co/egorchistov/MEMFOF-Tartan-T)
|
| 53 |
-
- [`MEMFOF-Tartan-T-TSKH`](https://huggingface.co/egorchistov/MEMFOF-Tartan-T-TSKH) (β
|
| 54 |
-
- [`MEMFOF-Tartan-T-TSKH-kitti`](https://huggingface.co/egorchistov/MEMFOF-Tartan-T-TSKH-kitti)
|
| 55 |
-
- [`MEMFOF-Tartan-T-TSKH-sintel`](https://huggingface.co/egorchistov/MEMFOF-Tartan-T-TSKH-sintel)
|
| 56 |
-
- [`MEMFOF-Tartan-T-TSKH-spring`](https://huggingface.co/egorchistov/MEMFOF-Tartan-T-TSKH-spring)
|
| 57 |
|
| 58 |
## ποΈ Datasets
|
| 59 |
|
|
|
|
| 10 |
<a href="https://linkedin.com/in/dmitriyvatolin">Dmitriy Vatolin</a>
|
| 11 |
</p>
|
| 12 |
<h3 align="center">ICCV 2025</h3>
|
| 13 |
+
<h3 align="center"><a href="https://arxiv.org/abs/2506.23151">π Paper</a> | <a href="https://msu-video-group.github.io/memfof">π Project Page</a> | <a href="https://colab.research.google.com/github/msu-video-group/memfof/blob/dev/demo.ipynb">π Colab</a> | <a href="https://huggingface.co/spaces/egorchistov/optical-flow-MEMFOF">π€ Demo</a> | <a href="https://huggingface.co/collections/egorchistov/optical-flow-memfof-685695802e71b207b96d8fb8">π¦ Models</a></h3>
|
| 14 |
</p>
|
| 15 |
|
| 16 |
## π
Overview
|
|
|
|
| 48 |
|
| 49 |
## π¦ Models
|
| 50 |
|
| 51 |
+
- [`MEMFOF-Tartan`](https://huggingface.co/egorchistov/optical-flow-MEMFOF-Tartan)
|
| 52 |
+
- [`MEMFOF-Tartan-T`](https://huggingface.co/egorchistov/optical-flow-MEMFOF-Tartan-T)
|
| 53 |
+
- [`MEMFOF-Tartan-T-TSKH`](https://huggingface.co/egorchistov/optical-flow-MEMFOF-Tartan-T-TSKH) (β
Best for real videos)
|
| 54 |
+
- [`MEMFOF-Tartan-T-TSKH-kitti`](https://huggingface.co/egorchistov/optical-flow-MEMFOF-Tartan-T-TSKH-kitti)
|
| 55 |
+
- [`MEMFOF-Tartan-T-TSKH-sintel`](https://huggingface.co/egorchistov/optical-flow-MEMFOF-Tartan-T-TSKH-sintel)
|
| 56 |
+
- [`MEMFOF-Tartan-T-TSKH-spring`](https://huggingface.co/egorchistov/optical-flow-MEMFOF-Tartan-T-TSKH-spring)
|
| 57 |
|
| 58 |
## ποΈ Datasets
|
| 59 |
|
demo.ipynb
CHANGED
|
@@ -38,7 +38,7 @@
|
|
| 38 |
"metadata": {},
|
| 39 |
"outputs": [],
|
| 40 |
"source": [
|
| 41 |
-
"model = MEMFOF.from_pretrained(\"egorchistov/MEMFOF-Tartan-T-TSKH\").eval().to(device)"
|
| 42 |
]
|
| 43 |
},
|
| 44 |
{
|
|
|
|
| 38 |
"metadata": {},
|
| 39 |
"outputs": [],
|
| 40 |
"source": [
|
| 41 |
+
"model = MEMFOF.from_pretrained(\"egorchistov/optical-flow-MEMFOF-Tartan-T-TSKH\").eval().to(device)"
|
| 42 |
]
|
| 43 |
},
|
| 44 |
{
|
demo.py
CHANGED
|
@@ -151,7 +151,7 @@ def download(url: str) -> str:
|
|
| 151 |
@spaces.GPU(duration=60)
|
| 152 |
def run_demo(input_path: str, model_name: str) -> str:
|
| 153 |
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
| 154 |
-
model = MEMFOF.from_pretrained(f"egorchistov/{model_name}").eval().to(device)
|
| 155 |
output_path = tempfile.NamedTemporaryFile(suffix=".mp4").name
|
| 156 |
process_video(model, input_path, output_path, device, progress=gr.Progress(), soft_duration=57)
|
| 157 |
return output_path
|
|
|
|
| 151 |
@spaces.GPU(duration=60)
|
| 152 |
def run_demo(input_path: str, model_name: str) -> str:
|
| 153 |
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
|
| 154 |
+
model = MEMFOF.from_pretrained(f"egorchistov/optical-flow-{model_name}").eval().to(device)
|
| 155 |
output_path = tempfile.NamedTemporaryFile(suffix=".mp4").name
|
| 156 |
process_video(model, input_path, output_path, device, progress=gr.Progress(), soft_duration=57)
|
| 157 |
return output_path
|
scripts/ckpts.py
CHANGED
|
@@ -26,7 +26,7 @@ def main():
|
|
| 26 |
if os.path.exists(output_path):
|
| 27 |
continue
|
| 28 |
print(f"Downloading {output_path}")
|
| 29 |
-
snapshot_path = snapshot_download(repo_id=f"egorchistov/MEMFOF-{ckpt}")
|
| 30 |
state_dict = load_file(os.path.join(snapshot_path, "model.safetensors"))
|
| 31 |
state_dict = {"model." + k: v for k, v in state_dict.items()}
|
| 32 |
torch.save({"state_dict": state_dict}, output_path)
|
|
|
|
| 26 |
if os.path.exists(output_path):
|
| 27 |
continue
|
| 28 |
print(f"Downloading {output_path}")
|
| 29 |
+
snapshot_path = snapshot_download(repo_id=f"egorchistov/optical-flow-MEMFOF-{ckpt}")
|
| 30 |
state_dict = load_file(os.path.join(snapshot_path, "model.safetensors"))
|
| 31 |
state_dict = {"model." + k: v for k, v in state_dict.items()}
|
| 32 |
torch.save({"state_dict": state_dict}, output_path)
|