|
@@ -143,17 +143,8 @@
|
|
|
"from google.colab import auth\n",
|
|
|
"from oauth2client.client import GoogleCredentials\n",
|
|
|
"from google.colab import drive\n",
|
|
|
- "from IPython.display import Image\n",
|
|
|
"import fastai\n",
|
|
|
- "from fastai import *\n",
|
|
|
- "from fastai.vision import *\n",
|
|
|
- "from fastai.callbacks.tensorboard import *\n",
|
|
|
- "from fastai.vision.gan import *\n",
|
|
|
- "from fasterai.dataset import *\n",
|
|
|
"from fasterai.visualize import *\n",
|
|
|
- "from fasterai.loss import *\n",
|
|
|
- "from fasterai.filters import *\n",
|
|
|
- "from fasterai.generators import *\n",
|
|
|
"from pathlib import Path\n",
|
|
|
"from itertools import repeat\n",
|
|
|
"from google.colab import drive\n",
|
|
@@ -187,27 +178,14 @@
|
|
|
"cell_type": "markdown",
|
|
|
"metadata": {},
|
|
|
"source": [
|
|
|
- "#◢ [ Render Factor: Determines resolution at which video is rendered. Higher is generally better (not always however!). Default is carefully chosen and should work for most scenarios"
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
- "metadata": {},
|
|
|
- "outputs": [],
|
|
|
- "source": [
|
|
|
- "render_factor = 36 #@param {type: \"slider\", min: 5, max: 45}"
|
|
|
+ "#◢ Render Factor"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "markdown",
|
|
|
- "metadata": {
|
|
|
- "colab_type": "text",
|
|
|
- "id": "z5rSDjZbTntY"
|
|
|
- },
|
|
|
+ "metadata": {},
|
|
|
"source": [
|
|
|
- "#◢ [ Specify URL\n",
|
|
|
- "YouTube, Imgur, Twitter, MySpace, Reddit ... most work. NOTE: If this is ommitted, you can just upload the file later in the workflow"
|
|
|
+ "Determines resolution at which video is rendered. Higher is generally better (not always however!). Default is carefully chosen and should work for most scenarios"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -216,7 +194,7 @@
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
- "source_url = '' #@param {type:\"string\"}"
|
|
|
+ "render_factor = 36 #@param {type: \"slider\", min: 5, max: 45}"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -226,16 +204,14 @@
|
|
|
"id": "z5rSDjZbTntY"
|
|
|
},
|
|
|
"source": [
|
|
|
- "##◢ [ </font> Not recommended to change the following (not really necessary)"
|
|
|
+ "#◢ Specify URL"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
+ "cell_type": "markdown",
|
|
|
"metadata": {},
|
|
|
- "outputs": [],
|
|
|
"source": [
|
|
|
- "file_name = 'video.mp4'"
|
|
|
+ "YouTube, Imgur, Twitter, MySpace, Reddit ... most work. NOTE: If this is ommitted, you can just upload the file later in the workflow"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -244,25 +220,24 @@
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
- "source_dir = './video/source/'"
|
|
|
+ "source_url = '' #@param {type:\"string\"}"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
- "metadata": {},
|
|
|
- "outputs": [],
|
|
|
+ "cell_type": "markdown",
|
|
|
+ "metadata": {
|
|
|
+ "colab_type": "text",
|
|
|
+ "id": "z5rSDjZbTntY"
|
|
|
+ },
|
|
|
"source": [
|
|
|
- "source_path = source_dir + file_name"
|
|
|
+ "#◢ Additional Parameters"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
+ "cell_type": "markdown",
|
|
|
"metadata": {},
|
|
|
- "outputs": [],
|
|
|
"source": [
|
|
|
- "dest_dir = './video/result/'"
|
|
|
+ "It's not recommended to change the following (not really necessary)"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -271,6 +246,10 @@
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
|
+ "file_name = 'video.mp4'\n",
|
|
|
+ "source_dir = './video/source/'\n",
|
|
|
+ "source_path = source_dir + file_name\n",
|
|
|
+ "dest_dir = './video/result/'\n",
|
|
|
"dest_path = dest_dir + file_name"
|
|
|
]
|
|
|
},
|
|
@@ -328,24 +307,15 @@
|
|
|
"id": "A5WMS_GgP4fm"
|
|
|
},
|
|
|
"source": [
|
|
|
- "#◢ [ Download\n",
|
|
|
- "* In the Menu on the left, click **Files**\n",
|
|
|
- "* It's in /content/DeOldify/video/result/\n",
|
|
|
- "* ( Or use this with its zero feedback :) )"
|
|
|
+ "#◢ Download"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- "cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
- "metadata": {
|
|
|
- "colab": {},
|
|
|
- "colab_type": "code",
|
|
|
- "id": "-PpnqBCUPw-Z"
|
|
|
- },
|
|
|
- "outputs": [],
|
|
|
+ "cell_type": "markdown",
|
|
|
+ "metadata": {},
|
|
|
"source": [
|
|
|
- "#Find your video in Files > /content/WORKFOLDER/ANSWER/ (It's better than this)\n",
|
|
|
- "files.download(dest_path)"
|
|
|
+ "* In the Menu on the left, click **Files**\n",
|
|
|
+ "* Rendered video should be in /content/DeOldify/video/result/"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -356,21 +326,10 @@
|
|
|
},
|
|
|
"source": [
|
|
|
"---\n",
|
|
|
- "#⚙ <font color='#FF000'>[ </font> \n",
|
|
|
+ "#⚙ Some great video and gif sources \n",
|
|
|
"* [/r/Nickelodeons/](https://www.reddit.com/r/Nickelodeons/)\n",
|
|
|
"* https://twitter.com/silentmoviegifs "
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
- "cell_type": "markdown",
|
|
|
- "metadata": {
|
|
|
- "colab_type": "text",
|
|
|
- "id": "3CUeJf2XF-1X"
|
|
|
- },
|
|
|
- "source": [
|
|
|
- "https://twitter.com/silentmoviegifs/status/1087282910288363522\n",
|
|
|
- "If you click the date at the top of a tweet you can copy the URL from the browser"
|
|
|
- ]
|
|
|
}
|
|
|
],
|
|
|
"metadata": {
|