Browse Source

Simplifying colabs further

Jason Antic 6 years ago
parent
commit
417996c058
2 changed files with 22 additions and 67 deletions
  1. 11 33
      ImageColorizerColab.ipynb
  2. 11 34
      VideoColorizerColab.ipynb

+ 11 - 33
ImageColorizerColab.ipynb

@@ -173,29 +173,23 @@
    "cell_type": "markdown",
    "metadata": {
     "colab_type": "text",
-    "id": "z5rSDjZbTntY"
+    "id": "sUQrbSYipiJn"
    },
    "source": [
-    "#◢ Image URL\n",
-    "\n",
-    "Any direct link to an image should do (will end with extension .jpg, .png, etc).  NOTE: If you want to use your own image, upload it first to a site like Imgur. "
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "source_url = '' #@param {type:\"string\"}"
+    "#◢ Colorize!!"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "#◢ Render Factor\n",
+    "### Instructions\n",
+    "\n",
+    "#### source_url\n",
+    "Any direct link to an image should do (will end with extension .jpg, .png, etc). NOTE: If you want to use your own image, upload it first to a site like Imgur. \n",
+    "\n",
     "\n",
+    "#### render_factor\n",
     "The default value of 35 has been carefully chosen and should work -ok- for most scenarios (but probably won't be the -best-). This determines resolution at which the photo is rendered. Lower resolution will render faster, and colors also tend to look more vibrant.  Older and lower quality photos in particular will generally benefit by lowering the render factor. Higher render factors are often better for higher quality photos."
    ]
   },
@@ -205,25 +199,9 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "render_factor = 35  #@param {type: \"slider\", min: 7, max: 46}"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "colab_type": "text",
-    "id": "sUQrbSYipiJn"
-   },
-   "source": [
-    "#◢ Run DeOldify"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
+    "source_url = '' #@param {type:\"string\"}\n",
+    "render_factor = 35  #@param {type: \"slider\", min: 7, max: 46}\n",
+    "\n",
     "if source_url is not None and source_url !='':\n",
     "    colorizer.plot_transformed_image_from_url(url=source_url, render_factor=render_factor)\n",
     "else:\n",

+ 11 - 34
VideoColorizerColab.ipynb

@@ -200,49 +200,23 @@
    "cell_type": "markdown",
    "metadata": {
     "colab_type": "text",
-    "id": "z5rSDjZbTntY"
+    "id": "sUQrbSYipiJn"
    },
    "source": [
-    "#◢ Video URL\n",
-    "\n",
-    "YouTube, Imgur, Twitter, Reddit ... files of type .gif, .gifv and .mp4 work.  NOTE: If you want to use your own video, upload it first to a site like Imgur. "
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "source_url = '' #@param {type:\"string\"}"
+    "#◢ Colorize!!"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "#◢ Render Factor\n",
+    "### Instructions\n",
     "\n",
-    "The default value of 21 has been carefully chosen and should work -ok- for most scenarios (but probably won't be the -best-). This determines resolution at which video is rendered. Lower resolution will render faster, and colors also tend to look more vibrant.  Older and lower quality film in particular will generally benefit by lowering the render factor. Higher render factors are often better for higher quality videos and inconsistencies (flashy render) will generally be reduced, but the colors may get slightly washed out.  "
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "render_factor = 21  #@param {type: \"slider\", min: 7, max: 45}"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {
-    "colab_type": "text",
-    "id": "sUQrbSYipiJn"
-   },
-   "source": [
-    "#◢ Colorize Video"
+    "#### source_url\n",
+    "YouTube, Imgur, Twitter, Reddit ... files of type .gif, .gifv and .mp4 work. NOTE: If you want to use your own video, upload it first to a site like YouTube. \n",
+    "\n",
+    "#### render_factor\n",
+    "The default value of 21 has been carefully chosen and should work -ok- for most scenarios (but probably won't be the -best-). This determines resolution at which video is rendered. Lower resolution will render faster, and colors also tend to look more vibrant. Older and lower quality film in particular will generally benefit by lowering the render factor. Higher render factors are often better for higher quality videos and inconsistencies (flashy render) will generally be reduced, but the colors may get slightly washed out. "
    ]
   },
   {
@@ -251,6 +225,9 @@
    "metadata": {},
    "outputs": [],
    "source": [
+    "source_url = '' #@param {type:\"string\"}\n",
+    "render_factor = 21  #@param {type: \"slider\", min: 7, max: 46}\n",
+    "\n",
     "if source_url is not None and source_url !='':\n",
     "    colorizer.colorize_from_url(source_url, file_name, render_factor)\n",
     "else:\n",