{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"gpu","dataSources":[{"sourceId":21755,"databundleVersionId":1475600,"sourceType":"competition"}],"dockerImageVersionId":30627,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!git clone https://github.com/taesungp/contrastive-unpaired-translation","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2024-01-01T05:34:35.998146Z","iopub.execute_input":"2024-01-01T05:34:35.998751Z","iopub.status.idle":"2024-01-01T05:34:38.291241Z","shell.execute_reply.started":"2024-01-01T05:34:35.998703Z","shell.execute_reply":"2024-01-01T05:34:38.289381Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install -r contrastive-unpaired-translation/requirements.txt\n!ls contrastive-unpaired-translation\n#!rm -r monet\n!mkdir monet\n!cp -r /kaggle/input/gan-getting-started/photo_jpg monet/trainA\n!cp -r /kaggle/input/gan-getting-started/monet_jpg monet/trainB\n!cp -r /kaggle/input/gan-getting-started/photo_jpg monet/testA\n!cp -r /kaggle/input/gan-getting-started/monet_jpg monet/testB\n!ls","metadata":{"execution":{"iopub.status.busy":"2024-01-01T09:27:00.805125Z","iopub.execute_input":"2024-01-01T09:27:00.805574Z","iopub.status.idle":"2024-01-01T09:27:42.758269Z","shell.execute_reply.started":"2024-01-01T09:27:00.805535Z","shell.execute_reply":"2024-01-01T09:27:42.757098Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import GPUtil\nGPUtil.getAvailable(limit=8, maxMemory=0.5)\n!python contrastive-unpaired-translation/train.py --dataroot monet --n_epochs 5 --lr 0.001 --n_epochs_decay 5 --no_html # --continue_train # --gpu_ids 0,1","metadata":{"execution":{"iopub.status.busy":"2024-01-01T10:30:36.066545Z","iopub.execute_input":"2024-01-01T10:30:36.066805Z","iopub.status.idle":"2024-01-01T10:30:36.091125Z","shell.execute_reply.started":"2024-01-01T10:30:36.066781Z","shell.execute_reply":"2024-01-01T10:30:36.090045Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!python contrastive-unpaired-translation/test.py --dataroot monet --num_test 7062","metadata":{"execution":{"iopub.status.busy":"2024-01-01T09:27:57.787766Z","iopub.execute_input":"2024-01-01T09:27:57.788740Z","iopub.status.idle":"2024-01-01T09:42:56.347529Z","shell.execute_reply.started":"2024-01-01T09:27:57.788703Z","shell.execute_reply":"2024-01-01T09:42:56.346451Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import shutil\nshutil.make_archive(\"images\",\"zip\", \"/kaggle/working/results/experiment_name/test_latest/images/fake_B\")\n","metadata":{"execution":{"iopub.status.busy":"2024-01-01T10:01:02.369323Z","iopub.execute_input":"2024-01-01T10:01:02.369736Z","iopub.status.idle":"2024-01-01T10:01:35.397191Z","shell.execute_reply.started":"2024-01-01T10:01:02.369705Z","shell.execute_reply":"2024-01-01T10:01:35.396014Z"},"trusted":true},"execution_count":null,"outputs":[]}]}