Skip to content

Commit 6a0f515

Browse files
Add files via upload
1 parent f937b0f commit 6a0f515

File tree

1 file changed

+52
-11
lines changed

1 file changed

+52
-11
lines changed

colab/LaMa_inpainting.ipynb

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@
1717
"accelerator": "GPU"
1818
},
1919
"cells": [
20+
{
21+
"cell_type": "markdown",
22+
"metadata": {
23+
"id": "_pRpIwnaOnb3"
24+
},
25+
"source": [
26+
"# 🦙 **LaMa: Resolution-robust Large Mask Inpainting with Fourier Convolutions**\n",
27+
"\n",
28+
"[[Project page](https://saic-mdal.github.io/lama-project/)] [[arXiv](https://arxiv.org/abs/2109.07161)] [[Supplementary](https://ashukha.com/projects/lama_21/lama_supmat_2021.pdf)] [[BibTeX](https://senya-ashukha.github.io/projects/lama_21/paper.txt)]\n",
29+
"\n",
30+
"<p align=\"center\" \"font-size:30px;\">\n",
31+
"Our model generalizes surprisingly well to much higher resolutions (~2k❗️) than it saw during training (256x256), and achieves the excellent performance even in challenging scenarios, e.g. completion of periodic structures.\n",
32+
"</p>\n",
33+
"\n",
34+
"# Try it yorself!👇\n"
35+
]
36+
},
2037
{
2138
"cell_type": "code",
2239
"metadata": {
@@ -25,7 +42,7 @@
2542
"base_uri": "https://localhost:8080/"
2643
},
2744
"cellView": "form",
28-
"outputId": "0c7de29c-0275-4d92-9407-fae5e3d232f5"
45+
"outputId": "9570e776-baea-4157-acfb-a35ec1f00e92"
2946
},
3047
"source": [
3148
"#@title Run this sell to set everything up\n",
@@ -133,33 +150,57 @@
133150
" with open(filename, 'wb') as f:\n",
134151
" f.write(binary)"
135152
],
136-
"execution_count": null,
153+
"execution_count": 1,
137154
"outputs": [
138155
{
139156
"output_type": "stream",
140157
"name": "stdout",
141158
"text": [
142159
"\n",
143160
"> Cloning the repo\n",
144-
"fatal: destination path 'lama' already exists and is not an empty directory.\n",
161+
"Cloning into 'lama'...\n",
162+
"remote: Enumerating objects: 406, done.\u001b[K\n",
163+
"remote: Counting objects: 100% (406/406), done.\u001b[K\n",
164+
"remote: Compressing objects: 100% (341/341), done.\u001b[K\n",
165+
"remote: Total 406 (delta 127), reused 261 (delta 45), pack-reused 0\u001b[K\n",
166+
"Receiving objects: 100% (406/406), 11.76 MiB | 17.75 MiB/s, done.\n",
167+
"Resolving deltas: 100% (127/127), done.\n",
145168
"\n",
146169
"> Install dependencies\n",
170+
"\u001b[K |████████████████████████████████| 12.5 MB 17 kB/s \n",
171+
"\u001b[K |████████████████████████████████| 22.3 MB 1.3 MB/s \n",
172+
"\u001b[K |████████████████████████████████| 72 kB 669 kB/s \n",
173+
"\u001b[K |████████████████████████████████| 144 kB 48.1 MB/s \n",
174+
"\u001b[K |████████████████████████████████| 841 kB 39.7 MB/s \n",
175+
"\u001b[K |████████████████████████████████| 271 kB 41.7 MB/s \n",
176+
"\u001b[K |████████████████████████████████| 45 kB 3.5 MB/s \n",
177+
"\u001b[K |████████████████████████████████| 37.1 MB 40 kB/s \n",
178+
"\u001b[K |████████████████████████████████| 948 kB 33.8 MB/s \n",
179+
"\u001b[K |████████████████████████████████| 112 kB 48.9 MB/s \n",
180+
"\u001b[K |████████████████████████████████| 74 kB 3.0 MB/s \n",
181+
"\u001b[K |████████████████████████████████| 176 kB 40.7 MB/s \n",
182+
"\u001b[K |████████████████████████████████| 829 kB 40.1 MB/s \n",
183+
"\u001b[K |████████████████████████████████| 125 kB 32.2 MB/s \n",
184+
"\u001b[K |████████████████████████████████| 269 kB 43.1 MB/s \n",
185+
"\u001b[K |████████████████████████████████| 1.3 MB 31.6 MB/s \n",
186+
"\u001b[K |████████████████████████████████| 160 kB 47.9 MB/s \n",
187+
"\u001b[K |████████████████████████████████| 271 kB 40.5 MB/s \n",
188+
"\u001b[?25h Building wheel for antlr4-python3-runtime (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
189+
" Building wheel for pyyaml (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
190+
" Building wheel for future (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
191+
" Building wheel for wget (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
147192
"\n",
148193
"> Changing the dir to:\n",
149194
"/content/lama\n",
150195
"\n",
151196
"> Download the model\n",
152197
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
153198
" Dload Upload Total Spent Left Speed\n",
154-
" 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n",
155-
"100 340M 0 340M 0 0 9.7M 0 --:--:-- 0:00:34 --:--:-- 9.9M^C\n",
199+
" 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0\n",
200+
"100 363M 0 363M 0 0 9852k 0 --:--:-- 0:00:37 --:--:-- 9975k\n",
156201
"Archive: big-lama.zip\n",
157-
" End-of-central-directory signature not found. Either this file is not\n",
158-
" a zipfile, or it constitutes one disk of a multi-part archive. In the\n",
159-
" latter case the central directory and zipfile comment will be found on\n",
160-
" the last disk(s) of this archive.\n",
161-
"unzip: cannot find zipfile directory in one of big-lama.zip or\n",
162-
" big-lama.zip.zip, and cannot find big-lama.zip.ZIP, period.\n",
202+
" inflating: big-lama/config.yaml \n",
203+
" inflating: big-lama/models/best.ckpt \n",
163204
"\n",
164205
"> Init mask-drawing code\n"
165206
]

0 commit comments

Comments
 (0)