From d0f4637f8ea2a89ea650336ed3b6472451ca474e Mon Sep 17 00:00:00 2001 From: Ejbejaranos <91475734+EjbejaranosAI@users.noreply.github.com> Date: Thu, 17 Aug 2023 23:10:58 +0200 Subject: [PATCH] Creado con Colaboratory --- ALIA_implementation_notebook.ipynb | 3222 ++++++++++++++++++++++++++++ 1 file changed, 3222 insertions(+) create mode 100644 ALIA_implementation_notebook.ipynb diff --git a/ALIA_implementation_notebook.ipynb b/ALIA_implementation_notebook.ipynb new file mode 100644 index 0000000..ed656be --- /dev/null +++ b/ALIA_implementation_notebook.ipynb @@ -0,0 +1,3222 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "T4", + "authorship_tag": "ABX9TyNB2EQsQTW0cxT3UdZRhAsz", + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "accelerator": "GPU" + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "source": [ + "## ALIA Setup" + ], + "metadata": { + "id": "q3JpJm7ECRTs" + } + }, + { + "cell_type": "code", + "source": [ + "import sys\n", + "import os\n", + "import tensorflow as tf\n", + "\n", + "\n", + "colab = 'google.colab' in sys.modules\n", + "if colab:\n", + " # noinspection PyBroadException\n", + " try:\n", + " !git clone https://github.com/lisadunlap/ALIA.git\n", + " except Exception:\n", + " pass\n", + "\n", + "if colab:\n", + " os.environ['PROJECT_DIR'] = project_dir = '/content/ALIA'\n", + " replace = True\n", + " if os.path.isdir(project_dir):\n", + " choice = input(\"Project already exists in folder \"+\n", + " \"{}\\nDelete the files and pull again? Enter Y/(N):\\n\"\n", + " .format(project_dir))\n", + " if choice.lower()=='y':\n", + " !rm -r $PROJECT_DIR\n", + " print(\"Deleted folder {}\".format(project_dir))\n", + " else:\n", + " replace = False\n", + " print(\"Nothing was changed.\")\n", + " if replace:\n", + " !cd /content && git clone https://github.com/lisadunlap/ALIA.git\n", + " print(\"Project cloned to \" + project_dir)\n", + " os.chdir(project_dir)\n", + " print(\"Done.\")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "1K_LL__B_DiM", + "outputId": "29027b68-69e3-4d8c-ef62-bb5edb0ee289" + }, + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Cloning into 'ALIA'...\n", + "remote: Enumerating objects: 305, done.\u001b[K\n", + "remote: Counting objects: 100% (305/305), done.\u001b[K\n", + "remote: Compressing objects: 100% (182/182), done.\u001b[K\n", + "remote: Total 305 (delta 167), reused 237 (delta 114), pack-reused 0\u001b[K\n", + "Receiving objects: 100% (305/305), 5.83 MiB | 12.21 MiB/s, done.\n", + "Resolving deltas: 100% (167/167), done.\n", + "Project already exists in folder /content/ALIA\n", + "Delete the files and pull again? Enter Y/(N):\n", + "n\n", + "Nothing was changed.\n", + "Done.\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "!pip install -q numpy clip matplotlib regex wilds omegaconf wandb scikit-image torch torchfile torchtext torchvision tqdm transformers attrdict diffusers[torch] tyro git+https://github.com/ildoonet/cutmix git+https://github.com/openai/CLIP.git cleanlab" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "rwzJj7IyB28q", + "outputId": "54cb206a-a61b-4994-adc2-561190091866" + }, + "execution_count": 2, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m126.2/126.2 kB\u001b[0m \u001b[31m3.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.5/79.5 kB\u001b[0m \u001b[31m9.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.1/2.1 MB\u001b[0m \u001b[31m11.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.4/7.4 MB\u001b[0m \u001b[31m53.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m61.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m85.8/85.8 kB\u001b[0m \u001b[31m10.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m225.1/225.1 kB\u001b[0m \u001b[31m22.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.1/53.1 kB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.8/78.8 kB\u001b[0m \u001b[31m9.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m117.0/117.0 kB\u001b[0m \u001b[31m14.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m188.5/188.5 kB\u001b[0m \u001b[31m22.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m215.6/215.6 kB\u001b[0m \u001b[31m26.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m31.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m73.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m59.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m244.2/244.2 kB\u001b[0m \u001b[31m24.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.7/62.7 kB\u001b[0m \u001b[31m7.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for clip (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for antlr4-python3-runtime (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for torchfile (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for cutmix (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for pathtools (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for littleutils (setup.py) ... \u001b[?25l\u001b[?25hdone\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "#!sudo apt install tree\n", + "!tree" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "PxkhRsNwSxrN", + "outputId": "a2a46f27-e43d-4bc5-8888-e50a221a596c" + }, + "execution_count": 27, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[01;34m.\u001b[0m\n", + "├── \u001b[00mcaption.py\u001b[0m\n", + "├── \u001b[01;34mcaptions\u001b[0m\n", + "│   ├── \u001b[00mCub2011.csv\u001b[0m\n", + "│   ├── \u001b[00miWildCamMini.csv\u001b[0m\n", + "│   └── \u001b[00mPlanes.csv\u001b[0m\n", + "├── \u001b[01;34mconfigs\u001b[0m\n", + "│   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   ├── \u001b[01;34mCub2011\u001b[0m\n", + "│   │   ├── \u001b[00malia.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mbase_mlp.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mextra.yaml\u001b[0m\n", + "│   │   └── \u001b[00mtxt2img.yaml\u001b[0m\n", + "│   ├── \u001b[01;34miWildCamMini\u001b[0m\n", + "│   │   ├── \u001b[00malia_instruct.yaml\u001b[0m\n", + "│   │   ├── \u001b[00malia.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mextra.yaml\u001b[0m\n", + "│   │   └── \u001b[00mtxt2img.yaml\u001b[0m\n", + "│   └── \u001b[01;34mPlanes\u001b[0m\n", + "│   ├── \u001b[00malia.yaml\u001b[0m\n", + "│   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   ├── \u001b[00mextra.yaml\u001b[0m\n", + "│   ├── \u001b[00mimg2img.yaml\u001b[0m\n", + "│   ├── \u001b[00minstruct_generic.yaml\u001b[0m\n", + "│   ├── \u001b[00minstruct.yaml\u001b[0m\n", + "│   └── \u001b[00mtxt2img.yaml\u001b[0m\n", + "├── \u001b[01;34mdata\u001b[0m\n", + "│   ├── \u001b[01;34miwildcam_v2.0\u001b[0m\n", + "│   │   ├── \u001b[00mtest_subset.csv\u001b[0m\n", + "│   │   ├── \u001b[00mtrain_extra_subset.csv\u001b[0m\n", + "│   │   ├── \u001b[00mtrain_subset.csv\u001b[0m\n", + "│   │   └── \u001b[00mval_subset.csv\u001b[0m\n", + "│   └── \u001b[00mplanes_ext.csv\u001b[0m\n", + "├── \u001b[01;34mdatasets\u001b[0m\n", + "│   ├── \u001b[00mbase.py\u001b[0m\n", + "│   ├── \u001b[00mcub.py\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00mplanes.py\u001b[0m\n", + "│   ├── \u001b[01;34m__pycache__\u001b[0m\n", + "│   │   ├── \u001b[00mbase.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00mcub.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00m__init__.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00mplanes.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00mWaterbirds.cpython-310.pyc\u001b[0m\n", + "│   │   └── \u001b[00mwilds.cpython-310.pyc\u001b[0m\n", + "│   ├── \u001b[00mWaterbirds.py\u001b[0m\n", + "│   └── \u001b[00mwilds.py\u001b[0m\n", + "├── \u001b[01;34mdiffusion_generated_data\u001b[0m\n", + "│   └── \u001b[01;34mtxt2img\u001b[0m\n", + "│   └── \u001b[01;34mstreet_images_in_winter_snowing_but_with_sun,_some_traffic_are_observed_and_2_dogs_with_a_guy_walknig_\u001b[0m\n", + "│   ├── \u001b[00m0.png\u001b[0m\n", + "│   ├── \u001b[00m10.png\u001b[0m\n", + "│   ├── \u001b[00m11.png\u001b[0m\n", + "│   ├── \u001b[00m12.png\u001b[0m\n", + "│   ├── \u001b[00m13.png\u001b[0m\n", + "│   ├── \u001b[00m14.png\u001b[0m\n", + "│   ├── \u001b[00m15.png\u001b[0m\n", + "│   ├── \u001b[00m16.png\u001b[0m\n", + "│   ├── \u001b[00m17.png\u001b[0m\n", + "│   ├── \u001b[00m18.png\u001b[0m\n", + "│   ├── \u001b[00m19.png\u001b[0m\n", + "│   ├── \u001b[00m1.png\u001b[0m\n", + "│   ├── \u001b[00m2.png\u001b[0m\n", + "│   ├── \u001b[00m3.png\u001b[0m\n", + "│   ├── \u001b[00m4.png\u001b[0m\n", + "│   ├── \u001b[00m5.png\u001b[0m\n", + "│   ├── \u001b[00m6.png\u001b[0m\n", + "│   ├── \u001b[00m7.png\u001b[0m\n", + "│   ├── \u001b[00m8.png\u001b[0m\n", + "│   └── \u001b[00m9.png\u001b[0m\n", + "├── \u001b[01;34mediting_methods\u001b[0m\n", + "│   ├── \u001b[00margs.py\u001b[0m\n", + "│   ├── \u001b[00mimg2img_example.py\u001b[0m\n", + "│   ├── \u001b[00mimg2img.py\u001b[0m\n", + "│   ├── \u001b[00minstruct_pix2pix_example.py\u001b[0m\n", + "│   ├── \u001b[00minstruct_pix2pix.py\u001b[0m\n", + "│   ├── \u001b[00moriginal.png\u001b[0m\n", + "│   ├── \u001b[01;34m__pycache__\u001b[0m\n", + "│   │   └── \u001b[00margs.cpython-310.pyc\u001b[0m\n", + "│   ├── \u001b[00mtxt2img_example.py\u001b[0m\n", + "│   └── \u001b[00mtxt2img.py\u001b[0m\n", + "├── \u001b[00menvironment.yml\u001b[0m\n", + "├── \u001b[01;34mex_imgs\u001b[0m\n", + "│   └── \u001b[00mgiraffe.png\u001b[0m\n", + "├── \u001b[01;34mfigures\u001b[0m\n", + "│   ├── \u001b[00mmethod.png\u001b[0m\n", + "│   ├── \u001b[00mmethod_w_caption.png\u001b[0m\n", + "│   ├── \u001b[00mteaser.png\u001b[0m\n", + "│   └── \u001b[00mteaser_w_caption.png\u001b[0m\n", + "├── \u001b[01;34mfiltering\u001b[0m\n", + "│   └── \u001b[00mfilter.py\u001b[0m\n", + "├── \u001b[01;34mhelpers\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00mload_dataset.py\u001b[0m\n", + "│   └── \u001b[01;34m__pycache__\u001b[0m\n", + "│   ├── \u001b[00m__init__.cpython-310.pyc\u001b[0m\n", + "│   └── \u001b[00mload_dataset.cpython-310.pyc\u001b[0m\n", + "├── \u001b[00mhuggingface_api.py\u001b[0m\n", + "├── \u001b[00mmain.py\u001b[0m\n", + "├── \u001b[01;34mmodels\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00mpretrained.py\u001b[0m\n", + "│   └── \u001b[01;34m__pycache__\u001b[0m\n", + "│   ├── \u001b[00m__init__.cpython-310.pyc\u001b[0m\n", + "│   └── \u001b[00mpretrained.cpython-310.pyc\u001b[0m\n", + "├── \u001b[00mprompt_generation.py\u001b[0m\n", + "├── \u001b[01;34m__pycache__\u001b[0m\n", + "│   └── \u001b[00mutils.cpython-310.pyc\u001b[0m\n", + "├── \u001b[00mREADME.md\u001b[0m\n", + "├── \u001b[00msetup.py\u001b[0m\n", + "├── \u001b[00mutils.py\u001b[0m\n", + "└── \u001b[01;34mwandb\u001b[0m\n", + " ├── \u001b[00mdebug-cli.root.log\u001b[0m\n", + " ├── \u001b[01;36mdebug-internal.log\u001b[0m -> \u001b[00mrun-20230817_201310-3lskj4ix/logs/debug-internal.log\u001b[0m\n", + " ├── \u001b[01;36mdebug.log\u001b[0m -> \u001b[00mrun-20230817_201310-3lskj4ix/logs/debug.log\u001b[0m\n", + " ├── \u001b[01;36mlatest-run\u001b[0m -> \u001b[01;34mrun-20230817_201310-3lskj4ix\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_181024-x0fvs55t\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   └── \u001b[00mconfig.yaml\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-x0fvs55t.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_181201-4fbgxb16\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-4fbgxb16.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_182924-8cqdmg81\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-8cqdmg81.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_183416-787tkq7m\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-787tkq7m.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_184201-96izhtlu\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-96izhtlu.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_184454-dfniuf7l\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-dfniuf7l.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_185720-kyqizdog\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-kyqizdog.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_190056-ncy8i80d\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-ncy8i80d.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_191956-b7ivbzf5\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-b7ivbzf5.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_192830-3veicss3\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[01;34mmedia\u001b[0m\n", + " │   │   │   └── \u001b[01;34mimages\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_06a381786dc8900d0737.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_269fe685c7b48f3776a6.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_3199567921dcf9687bfb.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_43057225c1352bf33bd4.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_4a9a9395d18ea88abd1a.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_6861f1258674ca1bc5e1.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_7b406ce7e476e66175f0.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_7c81055258478ab18fde.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_8088fe69b0ff98df826c.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_945c82983cdc940f9b30.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_a705085a5477674a8589.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_aac82b4dd0a857036db0.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_b84d9fb26d2e4e9d5b21.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_bd375dbc70276622e112.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_caab57ff9944ed14f001.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_d4f4f34d82f91763f318.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_e0295817a3a08b3013a8.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_e2f46fcae3560f05e6db.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_e63c8316c8e9dc707922.png\u001b[0m\n", + " │   │   │   └── \u001b[00mSamples_0_f6c88270caf92ff97786.png\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-3veicss3.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_193204-1uaosqkw\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-1uaosqkw.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_195157-h40ya9yd\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   └── \u001b[00mconfig.yaml\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-h40ya9yd.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_200337-0nz6rh18\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   └── \u001b[00mconfig.yaml\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-0nz6rh18.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " └── \u001b[01;34mrun-20230817_201310-3lskj4ix\u001b[0m\n", + " ├── \u001b[01;34mfiles\u001b[0m\n", + " │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " ├── \u001b[01;34mlogs\u001b[0m\n", + " │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   └── \u001b[00mdebug.log\u001b[0m\n", + " ├── \u001b[00mrun-3lskj4ix.wandb\u001b[0m\n", + " └── \u001b[01;34mtmp\u001b[0m\n", + " └── \u001b[01;34mcode\u001b[0m\n", + "\n", + "96 directories, 213 files\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "# ALIA implementation\n", + "#### API KEY WANBS: ************" + ], + "metadata": { + "id": "GnKeMabWCaRl" + } + }, + { + "cell_type": "markdown", + "source": [ + "## Prompt generation" + ], + "metadata": { + "id": "jl01dvGWMxt8" + } + }, + { + "cell_type": "code", + "source": [ + "import urllib.request\n", + "\n", + "url = \"https://data.caltech.edu/records/65de6-vp158/files/CUB_200_2011.tgz?download=1\"\n", + "filename = \"/content/dataset/CUB_200_2011.tgz\"\n", + "\n", + "urllib.request.urlretrieve(url, filename)\n", + "\n" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ulhkzbUvK9KC", + "outputId": "28a7f5f9-dc0f-45b4-f62e-5decb1ca7b25" + }, + "execution_count": 31, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "('/content/CUB_200_2011.tgz', )" + ] + }, + "metadata": {}, + "execution_count": 31 + } + ] + }, + { + "cell_type": "code", + "source": [ + "!tar -xzf /content/dataset/CUB_200_2011.tgz -C \"/content/dataset/\" && rm /content/dataset/CUB_200_2011.tgz" + ], + "metadata": { + "id": "ER5jqfS4NGl-" + }, + "execution_count": 35, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!python caption.py --config configs/Cub2011/base.yaml" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "sYsrOpWjMx2A", + "outputId": "d4df13c6-a7e7-4f5f-b064-7edddc4c4810" + }, + "execution_count": 36, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "2023-08-17 20:42:35.718290: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mejbejaranos22\u001b[0m. Use \u001b[1m`wandb login --relogin`\u001b[0m to force relogin\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Tracking run with wandb version 0.15.8\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Run data is saved locally in \u001b[35m\u001b[1m/content/ALIA/wandb/run-20230817_204240-lpwz0srv\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Run \u001b[1m`wandb offline`\u001b[0m to turn off syncing.\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Syncing run \u001b[33mdeep-violet-8\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: ⭐️ View project at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-Cub2011\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: 🚀 View run at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-Cub2011/runs/lpwz0srv\u001b[0m\n", + "==> Preparing data..\n", + "/shared/lisabdunlap/data/CUB-200-Painting/classes.txt\n", + "Traceback (most recent call last):\n", + " File \"/content/ALIA/caption.py\", line 63, in \n", + " trainset, valset, testset = get_filtered_dataset(args, None, None)\n", + " File \"/content/ALIA/helpers/load_dataset.py\", line 149, in get_filtered_dataset\n", + " trainset, valset, testset, extraset = get_dataset(args.data.base_dataset, transform, val_transform, root=args.data.base_root, embedding_root=args.data.embedding_root if args.model == 'MLP' else None)\n", + " File \"/content/ALIA/helpers/load_dataset.py\", line 116, in get_dataset\n", + " trainset = Cub2011(root=root, subset=False, split='train', transform=transform)\n", + " File \"/content/ALIA/datasets/cub.py\", line 35, in __init__\n", + " with open(f'{root}/CUB-200-Painting/classes.txt') as f:\n", + "FileNotFoundError: [Errno 2] No such file or directory: '/shared/lisabdunlap/data/CUB-200-Painting/classes.txt'\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Waiting for W&B process to finish... \u001b[31m(failed 1).\u001b[0m Press Control-C to abort syncing.\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: 🚀 View run \u001b[33mdeep-violet-8\u001b[0m at: \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-Cub2011/runs/lpwz0srv\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: ️⚡ View job at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-Cub2011/jobs/QXJ0aWZhY3RDb2xsZWN0aW9uOjg4NTk2NDY0/version_details/v2\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Find logs at: \u001b[35m\u001b[1m./wandb/run-20230817_204240-lpwz0srv/logs\u001b[0m\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "## Creating images from prompts" + ], + "metadata": { + "id": "9Mi9BtWKJacs" + } + }, + { + "cell_type": "markdown", + "source": [ + "- Generating images about arachnophobia" + ], + "metadata": { + "id": "Ynyde3xbJmpy" + } + }, + { + "cell_type": "code", + "source": [ + "!python editing_methods/txt2img_example.py --prompt \"Arachnophobia\" --n 20" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Bah1ZMsOCO_v", + "outputId": "a8c4f723-ed32-45f3-fb08-8eaca646d6e8" + }, + "execution_count": 3, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "2023-08-17 10:37:35.733474: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: (1) Create a W&B account\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: (2) Use an existing W&B account\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: (3) Don't visualize my results\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Enter your choice: 2\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: You chose 'Use an existing W&B account'\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Logging into wandb.ai. (Learn how to deploy a W&B server locally: https://wandb.me/wandb-server)\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: You can find your API key in your browser here: https://wandb.ai/authorize\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Paste an API key from your profile and hit enter, or press ctrl+c to quit: \n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Appending key for api.wandb.ai to your netrc file: /root/.netrc\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Tracking run with wandb version 0.15.8\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Run data is saved locally in \u001b[35m\u001b[1m/content/ALIA/wandb/run-20230817_103753-8jes68c5\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Run \u001b[1m`wandb offline`\u001b[0m to turn off syncing.\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Syncing run \u001b[33mArachnophobia\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: ⭐️ View project at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/Text-2-Image\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: 🚀 View run at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/Text-2-Image/runs/8jes68c5\u001b[0m\n", + "Downloading (…)ain/model_index.json: 100% 541/541 [00:00<00:00, 1.39MB/s]\n", + "Fetching 13 files: 0% 0/13 [00:00\n", + " main(args)\n", + " File \"/content/ALIA/editing_methods/img2img.py\", line 44, in main\n", + " trainset, _, _, _ = get_dataset(args.dataset, transform=None, val_transform=None, root='/content/dataset')\n", + " File \"/content/ALIA/helpers/load_dataset.py\", line 143, in get_dataset\n", + " assert all([hasattr(dataset, var) for dataset in [trainset, valset, testset]]), f\"datasets missing the attribute {var}\"\n", + "UnboundLocalError: local variable 'trainset' referenced before assignment\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Waiting for W&B process to finish... \u001b[31m(failed 1).\u001b[0m Press Control-C to abort syncing.\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: 🚀 View run \u001b[33mCub2011-a photo of a {} bird on rocks.-0.6-5\u001b[0m at: \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/Image-2-Image/runs/lgiw0bgi\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: ️⚡ View job at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/Image-2-Image/jobs/QXJ0aWZhY3RDb2xsZWN0aW9uOjkxMDc2MTcz/version_details/v2\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Find logs at: \u001b[35m\u001b[1m./wandb/run-20230817_205524-lgiw0bgi/logs\u001b[0m\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "id": "F887p_EOShh4" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "!python editing_methods/img2img_example.py" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "sRbXjUlQ-ePY", + "outputId": "819f6e52-3a06-437a-b617-297f768c7ba5" + }, + "execution_count": 22, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "2023-08-17 20:10:10.107270: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "!python filtering/filter.py --config configs/Cub2011/alia.yaml filter.load=false" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "_dkfnA1NkHzB", + "outputId": "261f1e5a-0f9c-4eb2-f77e-f694bede131c" + }, + "execution_count": 24, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "before\n", + "['/content/ALIA/filtering', '/env/python', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages']\n", + "After\n", + "['/content/ALIA/filtering', '/env/python', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages', '/content/ALIA']\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mejbejaranos22\u001b[0m. Use \u001b[1m`wandb login --relogin`\u001b[0m to force relogin\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Tracking run with wandb version 0.15.8\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Run data is saved locally in \u001b[35m\u001b[1m/content/ALIA/wandb/run-20230817_201310-3lskj4ix\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Run \u001b[1m`wandb offline`\u001b[0m to turn off syncing.\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Syncing run \u001b[33mautumn-snowflake-1\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: ⭐️ View project at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-filter\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: 🚀 View run at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-filter/runs/3lskj4ix\u001b[0m\n", + "100%|███████████████████████████████████████| 890M/890M [00:10<00:00, 89.1MiB/s]\n", + "==> Preparing data..\n", + "Roots ['/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_flying/strength-0.6_guidance-7.5', '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_interacting_with_flowers/strength-0.6_guidance-7.5', '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_in_the_water/strength-0.6_guidance-7.5', '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_on_a_branch/strength-0.6_guidance-7.5', '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_on_rocks/strength-0.6_guidance-7.5', '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_perched_on_a_birdfeeder/strength-0.6_guidance-7.5', '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_perched_on_a_fence/strength-0.6_guidance-7.5']\n", + "Traceback (most recent call last):\n", + " File \"/content/ALIA/filtering/filter.py\", line 116, in \n", + " dataset = get_aug_dataset(args, transform)\n", + " File \"/content/ALIA/filtering/filter.py\", line 99, in get_aug_dataset\n", + " dsets.append(getattr(datasets.base, args.data.extra_dataset)(r, transform=transform, cfg=args, group=i))\n", + " File \"/content/ALIA/datasets/base.py\", line 184, in __init__\n", + " super().__init__(root, transform=transform, cfg=cfg, group=group)\n", + " File \"/content/ALIA/datasets/base.py\", line 123, in __init__\n", + " super().__init__(root, transform=transform)\n", + " File \"/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py\", line 309, in __init__\n", + " super().__init__(\n", + " File \"/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py\", line 144, in __init__\n", + " classes, class_to_idx = self.find_classes(self.root)\n", + " File \"/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py\", line 218, in find_classes\n", + " return find_classes(directory)\n", + " File \"/usr/local/lib/python3.10/dist-packages/torchvision/datasets/folder.py\", line 40, in find_classes\n", + " classes = sorted(entry.name for entry in os.scandir(directory) if entry.is_dir())\n", + "FileNotFoundError: [Errno 2] No such file or directory: '/shared/lisabdunlap/edited/img2img/newCub2011/a_photo_of_a_{}_bird_flying/strength-0.6_guidance-7.5'\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Waiting for W&B process to finish... \u001b[31m(failed 1).\u001b[0m Press Control-C to abort syncing.\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: 🚀 View run \u001b[33mautumn-snowflake-1\u001b[0m at: \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-filter/runs/3lskj4ix\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: ️⚡ View job at \u001b[34m\u001b[4mhttps://wandb.ai/ejbejaranos22/ALIA-filter/jobs/QXJ0aWZhY3RDb2xsZWN0aW9uOjkxMTYzMDkx/version_details/v0\u001b[0m\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Synced 5 W&B file(s), 0 media file(s), 2 artifact file(s) and 0 other file(s)\n", + "\u001b[34m\u001b[1mwandb\u001b[0m: Find logs at: \u001b[35m\u001b[1m./wandb/run-20230817_201310-3lskj4ix/logs\u001b[0m\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "XUS5pOBCOrir", + "outputId": "9b772318-5ffa-41da-8496-a0105380a6b4" + }, + "execution_count": 13, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[01;34m.\u001b[0m\n", + "├── \u001b[00mcaption.py\u001b[0m\n", + "├── \u001b[01;34mcaptions\u001b[0m\n", + "│   ├── \u001b[00mCub2011.csv\u001b[0m\n", + "│   ├── \u001b[00miWildCamMini.csv\u001b[0m\n", + "│   └── \u001b[00mPlanes.csv\u001b[0m\n", + "├── \u001b[01;34mconfigs\u001b[0m\n", + "│   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   ├── \u001b[01;34mCub2011\u001b[0m\n", + "│   │   ├── \u001b[00malia.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mbase_mlp.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mextra.yaml\u001b[0m\n", + "│   │   └── \u001b[00mtxt2img.yaml\u001b[0m\n", + "│   ├── \u001b[01;34miWildCamMini\u001b[0m\n", + "│   │   ├── \u001b[00malia_instruct.yaml\u001b[0m\n", + "│   │   ├── \u001b[00malia.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   │   ├── \u001b[00mextra.yaml\u001b[0m\n", + "│   │   └── \u001b[00mtxt2img.yaml\u001b[0m\n", + "│   └── \u001b[01;34mPlanes\u001b[0m\n", + "│   ├── \u001b[00malia.yaml\u001b[0m\n", + "│   ├── \u001b[00mbase.yaml\u001b[0m\n", + "│   ├── \u001b[00mextra.yaml\u001b[0m\n", + "│   ├── \u001b[00mimg2img.yaml\u001b[0m\n", + "│   ├── \u001b[00minstruct_generic.yaml\u001b[0m\n", + "│   ├── \u001b[00minstruct.yaml\u001b[0m\n", + "│   └── \u001b[00mtxt2img.yaml\u001b[0m\n", + "├── \u001b[01;34mdata\u001b[0m\n", + "│   ├── \u001b[01;34miwildcam_v2.0\u001b[0m\n", + "│   │   ├── \u001b[00mtest_subset.csv\u001b[0m\n", + "│   │   ├── \u001b[00mtrain_extra_subset.csv\u001b[0m\n", + "│   │   ├── \u001b[00mtrain_subset.csv\u001b[0m\n", + "│   │   └── \u001b[00mval_subset.csv\u001b[0m\n", + "│   └── \u001b[00mplanes_ext.csv\u001b[0m\n", + "├── \u001b[01;34mdatasets\u001b[0m\n", + "│   ├── \u001b[00mbase.py\u001b[0m\n", + "│   ├── \u001b[00mcub.py\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00mplanes.py\u001b[0m\n", + "│   ├── \u001b[01;34m__pycache__\u001b[0m\n", + "│   │   ├── \u001b[00mbase.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00mcub.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00m__init__.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00mplanes.cpython-310.pyc\u001b[0m\n", + "│   │   ├── \u001b[00mWaterbirds.cpython-310.pyc\u001b[0m\n", + "│   │   └── \u001b[00mwilds.cpython-310.pyc\u001b[0m\n", + "│   ├── \u001b[00mWaterbirds.py\u001b[0m\n", + "│   └── \u001b[00mwilds.py\u001b[0m\n", + "├── \u001b[01;34mdiffusion_generated_data\u001b[0m\n", + "│   └── \u001b[01;34mtxt2img\u001b[0m\n", + "│   ├── \u001b[01;34mArachnophobia\u001b[0m\n", + "│   │   ├── \u001b[00m0.png\u001b[0m\n", + "│   │   ├── \u001b[00m10.png\u001b[0m\n", + "│   │   ├── \u001b[00m11.png\u001b[0m\n", + "│   │   ├── \u001b[00m12.png\u001b[0m\n", + "│   │   ├── \u001b[00m13.png\u001b[0m\n", + "│   │   ├── \u001b[00m14.png\u001b[0m\n", + "│   │   ├── \u001b[00m15.png\u001b[0m\n", + "│   │   ├── \u001b[00m16.png\u001b[0m\n", + "│   │   ├── \u001b[00m17.png\u001b[0m\n", + "│   │   ├── \u001b[00m18.png\u001b[0m\n", + "│   │   ├── \u001b[00m19.png\u001b[0m\n", + "│   │   ├── \u001b[00m1.png\u001b[0m\n", + "│   │   ├── \u001b[00m2.png\u001b[0m\n", + "│   │   ├── \u001b[00m3.png\u001b[0m\n", + "│   │   ├── \u001b[00m4.png\u001b[0m\n", + "│   │   ├── \u001b[00m5.png\u001b[0m\n", + "│   │   ├── \u001b[00m6.png\u001b[0m\n", + "│   │   ├── \u001b[00m7.png\u001b[0m\n", + "│   │   ├── \u001b[00m8.png\u001b[0m\n", + "│   │   └── \u001b[00m9.png\u001b[0m\n", + "│   └── \u001b[01;34mCats_in_winter\u001b[0m\n", + "│   ├── \u001b[00m0.png\u001b[0m\n", + "│   ├── \u001b[00m10.png\u001b[0m\n", + "│   ├── \u001b[00m11.png\u001b[0m\n", + "│   ├── \u001b[00m12.png\u001b[0m\n", + "│   ├── \u001b[00m13.png\u001b[0m\n", + "│   ├── \u001b[00m14.png\u001b[0m\n", + "│   ├── \u001b[00m15.png\u001b[0m\n", + "│   ├── \u001b[00m16.png\u001b[0m\n", + "│   ├── \u001b[00m17.png\u001b[0m\n", + "│   ├── \u001b[00m18.png\u001b[0m\n", + "│   ├── \u001b[00m19.png\u001b[0m\n", + "│   ├── \u001b[00m1.png\u001b[0m\n", + "│   ├── \u001b[00m2.png\u001b[0m\n", + "│   ├── \u001b[00m3.png\u001b[0m\n", + "│   ├── \u001b[00m4.png\u001b[0m\n", + "│   ├── \u001b[00m5.png\u001b[0m\n", + "│   ├── \u001b[00m6.png\u001b[0m\n", + "│   ├── \u001b[00m7.png\u001b[0m\n", + "│   ├── \u001b[00m8.png\u001b[0m\n", + "│   └── \u001b[00m9.png\u001b[0m\n", + "├── \u001b[01;34mediting_methods\u001b[0m\n", + "│   ├── \u001b[00margs.py\u001b[0m\n", + "│   ├── \u001b[00mimg2img_example.py\u001b[0m\n", + "│   ├── \u001b[00mimg2img.py\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00minstruct_pix2pix_example.py\u001b[0m\n", + "│   ├── \u001b[00minstruct_pix2pix.py\u001b[0m\n", + "│   ├── \u001b[01;34m__pycache__\u001b[0m\n", + "│   │   └── \u001b[00margs.cpython-310.pyc\u001b[0m\n", + "│   ├── \u001b[00mtxt2img_example.py\u001b[0m\n", + "│   └── \u001b[00mtxt2img.py\u001b[0m\n", + "├── \u001b[00menvironment.yml\u001b[0m\n", + "├── \u001b[01;34mex_imgs\u001b[0m\n", + "│   └── \u001b[00mgiraffe.png\u001b[0m\n", + "├── \u001b[01;34mfigures\u001b[0m\n", + "│   ├── \u001b[00mmethod.png\u001b[0m\n", + "│   ├── \u001b[00mmethod_w_caption.png\u001b[0m\n", + "│   ├── \u001b[00mteaser.png\u001b[0m\n", + "│   └── \u001b[00mteaser_w_caption.png\u001b[0m\n", + "├── \u001b[01;34mfiltering\u001b[0m\n", + "│   └── \u001b[00mfilter.py\u001b[0m\n", + "├── \u001b[01;34mhelpers\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00mload_dataset.py\u001b[0m\n", + "│   └── \u001b[01;34m__pycache__\u001b[0m\n", + "│   ├── \u001b[00m__init__.cpython-310.pyc\u001b[0m\n", + "│   └── \u001b[00mload_dataset.cpython-310.pyc\u001b[0m\n", + "├── \u001b[00mhuggingface_api.py\u001b[0m\n", + "├── \u001b[00mmain.py\u001b[0m\n", + "├── \u001b[01;34mmodels\u001b[0m\n", + "│   ├── \u001b[00m__init__.py\u001b[0m\n", + "│   ├── \u001b[00mpretrained.py\u001b[0m\n", + "│   └── \u001b[01;34m__pycache__\u001b[0m\n", + "│   ├── \u001b[00m__init__.cpython-310.pyc\u001b[0m\n", + "│   └── \u001b[00mpretrained.cpython-310.pyc\u001b[0m\n", + "├── \u001b[00mprompt_generation.py\u001b[0m\n", + "├── \u001b[01;34m__pycache__\u001b[0m\n", + "│   └── \u001b[00mutils.cpython-310.pyc\u001b[0m\n", + "├── \u001b[00mREADME.md\u001b[0m\n", + "├── \u001b[00msetup.py\u001b[0m\n", + "├── \u001b[00mutils.py\u001b[0m\n", + "└── \u001b[01;34mwandb\u001b[0m\n", + " ├── \u001b[00mdebug-cli.root.log\u001b[0m\n", + " ├── \u001b[01;36mdebug-internal.log\u001b[0m -> \u001b[00mrun-20230817_111344-osloqyc4/logs/debug-internal.log\u001b[0m\n", + " ├── \u001b[01;36mdebug.log\u001b[0m -> \u001b[00mrun-20230817_111344-osloqyc4/logs/debug.log\u001b[0m\n", + " ├── \u001b[01;36mlatest-run\u001b[0m -> \u001b[01;34mrun-20230817_111344-osloqyc4\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_103753-8jes68c5\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[01;34mmedia\u001b[0m\n", + " │   │   │   └── \u001b[01;34mimages\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_02e54300b07ee756d0b0.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_0b71f566b2a1a14e8b33.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_2684764e543160d6246e.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_3885e2492b4522d8f8e3.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_4c1b7a74c4694f6fbc3a.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_51260822d0a4945a5517.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_7315a3222ce8e559ce83.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_760d319e3dff188f1c95.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_7c11f7021205421c6968.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_8643e092507565b0c3bf.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_a48dc91f4a92e838cf52.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_a573140db107bbbc89f7.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_b39f6bb9be67c895c1de.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_b3a0d97d25da200bd712.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_b47002e09906954de7da.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_c4685bbd358ce5e2061a.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_d40b658d602eff497ea8.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_db258401ab009dcd490a.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_e0b4f40f38451dbc4fb5.png\u001b[0m\n", + " │   │   │   └── \u001b[00mSamples_0_e591f20ff015d0940aeb.png\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-8jes68c5.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " ├── \u001b[01;34mrun-20230817_104856-o5dulnah\u001b[0m\n", + " │   ├── \u001b[01;34mfiles\u001b[0m\n", + " │   │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   │   ├── \u001b[01;34mmedia\u001b[0m\n", + " │   │   │   └── \u001b[01;34mimages\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_091c34d4b830438a4ff4.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_3a63f3479bb6305647f2.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_41adaa36b37f10953655.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_5cfb6760fe448989ec2d.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_66be27e897acb9ddf9af.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_6f8092ebd0bef472b551.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_73f2f4425b9e074b86fa.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_82c070657227533bd301.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_879916a482080a33aff1.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_89b5d77210226ffc8633.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_994e6a35055a2c183ad2.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_a132ea32fbb5a72e9045.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_a3f78334ae3c1b5be56a.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_c4121214a6ae77afad8e.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_c6e22d12e167d8afc57e.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_c9c421504280cfc540ad.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_e3f78ff1f5ba1cd6f886.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_e889bd1fa811860c79cf.png\u001b[0m\n", + " │   │   │   ├── \u001b[00mSamples_0_ee70ed44beed9ceb8cb5.png\u001b[0m\n", + " │   │   │   └── \u001b[00mSamples_0_fbdad8b793a75f275e56.png\u001b[0m\n", + " │   │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " │   ├── \u001b[01;34mlogs\u001b[0m\n", + " │   │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   │   └── \u001b[00mdebug.log\u001b[0m\n", + " │   ├── \u001b[00mrun-o5dulnah.wandb\u001b[0m\n", + " │   └── \u001b[01;34mtmp\u001b[0m\n", + " │   └── \u001b[01;34mcode\u001b[0m\n", + " └── \u001b[01;34mrun-20230817_111344-osloqyc4\u001b[0m\n", + " ├── \u001b[01;34mfiles\u001b[0m\n", + " │   ├── \u001b[00mconfig.yaml\u001b[0m\n", + " │   ├── \u001b[00moutput.log\u001b[0m\n", + " │   ├── \u001b[00mrequirements.txt\u001b[0m\n", + " │   ├── \u001b[00mwandb-metadata.json\u001b[0m\n", + " │   └── \u001b[00mwandb-summary.json\u001b[0m\n", + " ├── \u001b[01;34mlogs\u001b[0m\n", + " │   ├── \u001b[00mdebug-internal.log\u001b[0m\n", + " │   └── \u001b[00mdebug.log\u001b[0m\n", + " ├── \u001b[00mrun-osloqyc4.wandb\u001b[0m\n", + " └── \u001b[01;34mtmp\u001b[0m\n", + " └── \u001b[01;34mcode\u001b[0m\n", + "\n", + "44 directories, 177 files\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "id": "8LedkwnlOtxr" + }, + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file