Parcourir la source

Fixes to Colabs

Jason Antic il y a 6 ans
Parent
commit
6140248158
3 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 3 3
      DeOldify-video.ipynb
  2. 2 2
      DeOldify_colab.ipynb
  3. 1 1
      fasterai/visualize.py

+ 3 - 3
DeOldify-video.ipynb

@@ -19,7 +19,7 @@
    "source": [
     "#◢ <font color='#FF000'>[ </font> DeOldify-video\n",
     "\n",
-    "##This colbab notebook colorizes video in four steps\n",
+    "##This Colab notebook colorizes video in four steps\n",
     "1. Upload source media or specify media URL - YouTube, Twitter, MySpace, etc.\n",
     "2. Extract single images from media\n",
     "3. Process images with [DeOldify](https://github.com/jantic/DeOldify) \n",
@@ -91,7 +91,7 @@
    "source": [
     "!git clone -b FastAIv1 --single-branch https://github.com/jantic/DeOldify.git DeOldify\n",
     "#!git clone https://github.com/jantic/DeOldify.git DeOldify\n",
-    "!cd DeOldify"
+    "cd DeOldify"
    ]
   },
   {
@@ -174,7 +174,7 @@
    },
    "outputs": [],
    "source": [
-    "!wget https://www.dropbox.com/s/1ReNu8QCgi4vfyDovgYGMs7tlUGrnz72V/colorize_gen.pth -O ./models/colorize_gen.pth"
+    "!wget https://www.dropbox.com/s/3e4dqky91h824ik/colorize_gen.pth -O ./models/colorize_gen.pth"
    ]
   },
   {

+ 2 - 2
DeOldify_colab.ipynb

@@ -71,7 +71,7 @@
    },
    "outputs": [],
    "source": [
-    "!cd DeOldify"
+    "cd DeOldify"
    ]
   },
   {
@@ -195,7 +195,7 @@
     "# note that the id is the ending part of the shareable link url (after open?id=)\n",
     "# The pretrained weights can be downloaded from https://www.dropbox.com/s/3e4dqky91h824ik/colorize_gen.pth\n",
     "!mkdir \"models\"\n",
-    "download = drive.CreateFile({'id': '1ReNu8QCgi4vfyDovgYGMs7tlUGrnz72V'})\n",
+    "download = drive.CreateFile({'id': '3e4dqky91h824ik'})\n",
     "download.GetContentFile('./models/colorize_gen.pth')"
    ]
   },

+ 1 - 1
fasterai/visualize.py

@@ -52,7 +52,7 @@ class ModelImageVisualizer():
         return rows, columns
 
 
-def get_colorize_visualizer(root_folder:Path=Path('./'), weights_name:str='colorizer_gen', 
+def get_colorize_visualizer(root_folder:Path=Path('./'), weights_name:str='colorize_gen', 
         results_dir = 'result_images', nf_factor:float=1.25, render_factor:int=21)->ModelImageVisualizer:
     learn = colorize_gen_inference(root_folder=root_folder, weights_name=weights_name, nf_factor=nf_factor)
     filtr = MasterFilter([ColorizerFilter(learn=learn)], render_factor=render_factor)