{"cells":[{"metadata":{},"cell_type":"markdown","source":"# CycleGAN from Repo\n\nThis notebook attempts to run CycleGAN directly from the github repo"},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"%%bash\n# git clone https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix\ngit init .\ngit remote add origin https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix\ngit pull origin master\npip3 install -r requirements.txt","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"%%time\n%%bash\nmkdir -p datasets/photo2monet/\ncp -r ../input/gan-getting-started/photo_jpg  datasets/photo2monet/testA\ncp -r ../input/gan-getting-started/photo_jpg  datasets/photo2monet/trainA\ncp -r ../input/gan-getting-started/monet_jpg  datasets/photo2monet/testB\ncp -r ../input/gan-getting-started/monet_jpg  datasets/photo2monet/trainB","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"%%time\n! python3 train.py --dataroot datasets/photo2monet --name photo2monet_cyclegan --model cycle_gan --lr_policy cosine --n_epochs 1 --save_epoch_freq 1","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"%%time\n! python3 test.py --dataroot datasets/photo2monet --name photo2monet_cyclegan --model cycle_gan --no_dropout","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"! zip -v -D images.zip results/photo2monet/test_latest/images/*fake_B.png","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":4}