diff --git a/notebooks/train_vae_painter.ipynb b/notebooks/train_vae_painter.ipynb
index fee6f85..644b545 100644
--- a/notebooks/train_vae_painter.ipynb
+++ b/notebooks/train_vae_painter.ipynb
@@ -24,7 +24,7 @@
"colab_type": "text"
},
"source": [
- ""
+ ""
]
},
{
@@ -52,7 +52,7 @@
"#from google.colab import drive\n",
"#drive.mount('/drive')"
],
- "execution_count": 7,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -127,7 +127,7 @@
"source": [
"!pip install future-fstrings"
],
- "execution_count": 3,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -155,7 +155,7 @@
"!cd SPIRAL-tensorflow && git checkout reiinakano-patch-2 #reiinakano-patches\n",
"!cd SPIRAL-tensorflow && git pull"
],
- "execution_count": 4,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -190,7 +190,7 @@
"!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip\n",
"!unzip ngrok-stable-linux-amd64.zip"
],
- "execution_count": 5,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -222,37 +222,23 @@
"source": [
"# Download episodes. \n",
"\n",
- "If you want to generate your own brushstrokes, go to https://github.com/reiinakano/diff-painter/blob/master/notebooks/generate_stroke_examples.ipynb or put your data under the data/ folder "
+ "If you want to use/generate your own brushstrokes, go to https://github.com/reiinakano/diff-painter/blob/master/notebooks/generate_stroke_examples.ipynb or put your data under the data/ folder.\n",
+ "\n",
+ "Otherwise, you can download pre-calculated brushstrokes from Kaggle. You will need to set your API credentials via https://github.com/Kaggle/kaggle-api#api-credentials"
]
},
{
"metadata": {
"id": "wAV5YBk6vu3z",
"colab_type": "code",
- "colab": {
- "base_uri": "https://localhost:8080/",
- "height": 35
- },
- "outputId": "fae6cc73-2747-45b3-ac3c-c989e06ebbab"
+ "colab": {}
},
"cell_type": "code",
"source": [
- "!mkdir data\n",
- "#!mkdir tf_vae\n",
- "!cp /drive/My\\ Drive/world-painter5/episodes_*.npz data/\n",
- "#!cp /drive/My\\ Drive/world-painter5/tf_vae/* tf_vae/\n",
- "#!cp -r /drive/My\\ Drive/world-painter5/logdir_tf_vae logdir"
+ "!pip install kaggle"
],
- "execution_count": 8,
- "outputs": [
- {
- "output_type": "stream",
- "text": [
- "mkdir: cannot create directory ‘data’: File exists\n"
- ],
- "name": "stdout"
- }
- ]
+ "execution_count": 0,
+ "outputs": []
},
{
"metadata": {
@@ -262,7 +248,10 @@
},
"cell_type": "code",
"source": [
- ""
+ "!mkdir -p ~/.kaggle\n",
+ "\n",
+ "# Make sure to upload your Kaggle key from somewhere. I saved mine in Drive\n",
+ "#!cp \"/drive/My Drive/kaggle.json\" ~/.kaggle/"
],
"execution_count": 0,
"outputs": []
@@ -274,6 +263,45 @@
"colab": {}
},
"cell_type": "code",
+ "source": [
+ "!kaggle datasets download reiinakano/mypaint_brushstrokes"
+ ],
+ "execution_count": 0,
+ "outputs": []
+ },
+ {
+ "metadata": {
+ "id": "2ahBjWypZbUE",
+ "colab_type": "code",
+ "colab": {}
+ },
+ "cell_type": "code",
+ "source": [
+ "!unzip mypaint_brushstrokes.zip"
+ ],
+ "execution_count": 0,
+ "outputs": []
+ },
+ {
+ "metadata": {
+ "id": "1x2_6feNZbYD",
+ "colab_type": "code",
+ "colab": {}
+ },
+ "cell_type": "code",
+ "source": [
+ "!mv strokes-dataset data"
+ ],
+ "execution_count": 0,
+ "outputs": []
+ },
+ {
+ "metadata": {
+ "id": "XK6wamHyZbct",
+ "colab_type": "code",
+ "colab": {}
+ },
+ "cell_type": "code",
"source": [
""
],
@@ -607,7 +635,7 @@
" plt.imshow(img)\n",
"plt.show()"
],
- "execution_count": 4,
+ "execution_count": 0,
"outputs": [
{
"output_type": "display_data",
@@ -924,7 +952,7 @@
" reuse=False,\n",
" gpu_mode=True)\n"
],
- "execution_count": 9,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -1002,7 +1030,7 @@
"!curl -s http://localhost:4040/api/tunnels | python3 -c \\\n",
" \"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])\"\n"
],
- "execution_count": 10,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -1198,7 +1226,7 @@
" reuse=False,\n",
" gpu_mode=False)"
],
- "execution_count": 14,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -1258,7 +1286,7 @@
" \n",
"experiment(20, 'tf_vae')\n"
],
- "execution_count": 16,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",
@@ -1344,7 +1372,7 @@
"_test_gans[0].load_checkpoint('tf_vae')\n",
"experiment5(_test_gans, 20.)\n"
],
- "execution_count": 17,
+ "execution_count": 0,
"outputs": [
{
"output_type": "stream",