Spaces:
Runtime error
Runtime error
geekyrakshit
commited on
Commit
•
1150923
1
Parent(s):
171e1d9
added dockerfile
Browse files- .gitignore +3 -1
- Dockerfile +17 -0
- notebooks/enhance_me_train.ipynb +23 -9
.gitignore
CHANGED
@@ -131,4 +131,6 @@ dmypy.json
|
|
131 |
# Datasets
|
132 |
datasets/
|
133 |
**.zip
|
134 |
-
**.h5
|
|
|
|
|
|
131 |
# Datasets
|
132 |
datasets/
|
133 |
**.zip
|
134 |
+
**.h5
|
135 |
+
lol_dataset_**
|
136 |
+
wandb**
|
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Pull Base Image
|
2 |
+
FROM tensorflow/tensorflow:latest-gpu-jupyter
|
3 |
+
|
4 |
+
# Set Working Directory
|
5 |
+
RUN mkdir /usr/src/enhance-me
|
6 |
+
WORKDIR /usr/src/enhance-me
|
7 |
+
|
8 |
+
# Set Environment Variables
|
9 |
+
ENV PYTHONDONTWRITEBYTECODE 1
|
10 |
+
ENV PYTHONUNBUFFERED 1
|
11 |
+
|
12 |
+
RUN pip install --upgrade pip setuptools wheel
|
13 |
+
RUN pip install gdown matplotlib streamlit tqdm wandb
|
14 |
+
|
15 |
+
COPY . /usr/src/enhance-me/
|
16 |
+
|
17 |
+
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
|
notebooks/enhance_me_train.ipynb
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
"import os\n",
|
38 |
"import sys\n",
|
39 |
"\n",
|
40 |
-
"sys.path.append(\"
|
41 |
"\n",
|
42 |
"from PIL import Image\n",
|
43 |
"from enhance_me import commons\n",
|
@@ -187,8 +187,8 @@
|
|
187 |
"source": [
|
188 |
"# @title Zero-DCE Train Configs\n",
|
189 |
"\n",
|
190 |
-
"experiment_name = \"
|
191 |
-
"image_size =
|
192 |
"dataset_label = \"lol\" # @param [\"lol\"]\n",
|
193 |
"apply_random_horizontal_flip = True # @param {type:\"boolean\"}\n",
|
194 |
"apply_random_vertical_flip = True # @param {type:\"boolean\"}\n",
|
@@ -196,7 +196,7 @@
|
|
196 |
"use_mixed_precision = False # @param {type:\"boolean\"}\n",
|
197 |
"wandb_api_key = \"\" # @param {type:\"string\"}\n",
|
198 |
"val_split = 0.1 # @param {type:\"slider\", min:0.1, max:1.0, step:0.1}\n",
|
199 |
-
"batch_size =
|
200 |
"learning_rate = 1e-4 # @param {type:\"number\"}\n",
|
201 |
"epsilon = 1e-3 # @param {type:\"number\"}\n",
|
202 |
"epochs = 100 # @param {type:\"slider\", min:10, max:100, step:5}"
|
@@ -234,7 +234,9 @@
|
|
234 |
{
|
235 |
"cell_type": "code",
|
236 |
"execution_count": null,
|
237 |
-
"metadata": {
|
|
|
|
|
238 |
"outputs": [],
|
239 |
"source": [
|
240 |
"zero_dce.compile(learning_rate=learning_rate)\n",
|
@@ -245,7 +247,9 @@
|
|
245 |
{
|
246 |
"cell_type": "code",
|
247 |
"execution_count": null,
|
248 |
-
"metadata": {
|
|
|
|
|
249 |
"outputs": [],
|
250 |
"source": [
|
251 |
"for index, low_image_file in enumerate(zero_dce.test_low_images):\n",
|
@@ -270,13 +274,23 @@
|
|
270 |
"provenance": []
|
271 |
},
|
272 |
"kernelspec": {
|
273 |
-
"display_name": "Python 3",
|
|
|
274 |
"name": "python3"
|
275 |
},
|
276 |
"language_info": {
|
277 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
}
|
279 |
},
|
280 |
"nbformat": 4,
|
281 |
-
"nbformat_minor":
|
282 |
}
|
|
|
37 |
"import os\n",
|
38 |
"import sys\n",
|
39 |
"\n",
|
40 |
+
"sys.path.append(\"..\")\n",
|
41 |
"\n",
|
42 |
"from PIL import Image\n",
|
43 |
"from enhance_me import commons\n",
|
|
|
187 |
"source": [
|
188 |
"# @title Zero-DCE Train Configs\n",
|
189 |
"\n",
|
190 |
+
"experiment_name = \"lol_dataset_256\" # @param {type:\"string\"}\n",
|
191 |
+
"image_size = 256 # @param {type:\"integer\"}\n",
|
192 |
"dataset_label = \"lol\" # @param [\"lol\"]\n",
|
193 |
"apply_random_horizontal_flip = True # @param {type:\"boolean\"}\n",
|
194 |
"apply_random_vertical_flip = True # @param {type:\"boolean\"}\n",
|
|
|
196 |
"use_mixed_precision = False # @param {type:\"boolean\"}\n",
|
197 |
"wandb_api_key = \"\" # @param {type:\"string\"}\n",
|
198 |
"val_split = 0.1 # @param {type:\"slider\", min:0.1, max:1.0, step:0.1}\n",
|
199 |
+
"batch_size = 16 # @param {type:\"integer\"}\n",
|
200 |
"learning_rate = 1e-4 # @param {type:\"number\"}\n",
|
201 |
"epsilon = 1e-3 # @param {type:\"number\"}\n",
|
202 |
"epochs = 100 # @param {type:\"slider\", min:10, max:100, step:5}"
|
|
|
234 |
{
|
235 |
"cell_type": "code",
|
236 |
"execution_count": null,
|
237 |
+
"metadata": {
|
238 |
+
"scrolled": false
|
239 |
+
},
|
240 |
"outputs": [],
|
241 |
"source": [
|
242 |
"zero_dce.compile(learning_rate=learning_rate)\n",
|
|
|
247 |
{
|
248 |
"cell_type": "code",
|
249 |
"execution_count": null,
|
250 |
+
"metadata": {
|
251 |
+
"scrolled": false
|
252 |
+
},
|
253 |
"outputs": [],
|
254 |
"source": [
|
255 |
"for index, low_image_file in enumerate(zero_dce.test_low_images):\n",
|
|
|
274 |
"provenance": []
|
275 |
},
|
276 |
"kernelspec": {
|
277 |
+
"display_name": "Python 3 (ipykernel)",
|
278 |
+
"language": "python",
|
279 |
"name": "python3"
|
280 |
},
|
281 |
"language_info": {
|
282 |
+
"codemirror_mode": {
|
283 |
+
"name": "ipython",
|
284 |
+
"version": 3
|
285 |
+
},
|
286 |
+
"file_extension": ".py",
|
287 |
+
"mimetype": "text/x-python",
|
288 |
+
"name": "python",
|
289 |
+
"nbconvert_exporter": "python",
|
290 |
+
"pygments_lexer": "ipython3",
|
291 |
+
"version": "3.8.10"
|
292 |
}
|
293 |
},
|
294 |
"nbformat": 4,
|
295 |
+
"nbformat_minor": 1
|
296 |
}
|