{"cells":[{"metadata":{},"cell_type":"markdown","source":"## Import Libaries","execution_count":null},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"from PIL import Image\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport os\n%matplotlib inline","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"BASE_PATH = '../input/gan-getting-started/'\nMONET_PATH = os.path.join(BASE_PATH, 'monet_jpg')\nPHOTO_PATH = os.path.join(BASE_PATH, 'photo_jpg')","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### No of Monet and Photo Images","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"print(\"No of Monet Images {}\".format(len(os.listdir(MONET_PATH))))\nprint(\"No of Photo Images {}\".format(len(os.listdir(PHOTO_PATH))))","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## View Monet Images","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"from mpl_toolkits.axes_grid1 import ImageGrid\nfig = plt.figure(1, figsize=(15, 10))\nNUM_ROWS = 5\ngrid = ImageGrid(fig, 111, nrows_ncols=(NUM_ROWS, 5), axes_pad=0.05)\ni = 0\nimgid = 0\nfor row_id in range(NUM_ROWS):\n    for filepath in os.listdir(MONET_PATH)[imgid:imgid+5]:\n        ax = grid[i]\n        img = Image.open(MONET_PATH+'/'+filepath)\n        img = img.resize((240,240))\n        ax.imshow(img)\n        ax.axis('off')\n        i += 1\n        imgid+=5\nplt.show();","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## View PHOTO Images","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"from mpl_toolkits.axes_grid1 import ImageGrid\nfig = plt.figure(1, figsize=(15, 10))\nNUM_ROWS = 5\ngrid = ImageGrid(fig, 111, nrows_ncols=(NUM_ROWS, 5), axes_pad=0.05)\ni = 0\nimgid=0\n\nfor row_id in range(NUM_ROWS):\n    for filepath in os.listdir(PHOTO_PATH)[imgid:imgid+5]:\n        ax = grid[i]\n        img = Image.open(PHOTO_PATH+'/'+filepath)\n        img = img.resize((240,240))\n        ax.imshow(img,aspect='auto',extent=(20, 150, 20, 150))\n        ax.axis('off')\n        i += 1\n        imgid+=5\nplt.show();","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"More Updates in future. Upvote if you like","execution_count":null}],"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}