{"cells":[{"metadata":{},"cell_type":"markdown","source":"Hi Kagglers, I decided to upload my version of the dataset which I made using the awesome work from @akensert which you can find [here](https://www.kaggle.com/akensert/panda-optimized-tiling-tf-data-dataset).\nThis dataset is optimized for reading directly from a Kaggle Notebook. As a matter of fact, each images comes in dimension `(n_crops * 256, 256, 3)`, so it is possible to retrieve the crops by doing a reshape to `(-1, 256, 256, 3)`. This method let me spare precious space and disk reading speed.\n\nI'm succesfully using it on my Kaggle notebook to train a network and, with basic transformations, I'm able to fully use the GPU. You can find the dataset in the resources of this notebook or [here](https://www.kaggle.com/mawanda/akensert-transform-panda-tiles)\n\n\nA little demonstration follows.","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\n\npath_to_img = '../input/akensert-transform-panda-tiles/akensert_little/0005f7aaab2800f6170c399693a96917.jpeg'\n\nimgs = np.array(Image.open(path_to_img)).reshape(-1, 256, 256, 3)\n\nimgs.shape","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Now show a crop:","execution_count":null},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"Image.fromarray(imgs[0])","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"If you find this dataset helpful pleas upvote! And don't forget to upvote also @akensert work which I mentioned above.","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"","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}