{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"7027890b-071d-66b2-5f09-835e8e277e92"},"outputs":[],"source":"\n\n%matplotlib inline\nimport os\nimport numpy as np \nimport pandas as pd \nimport glob\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom scipy.misc import imresize\n\nfor base_dir in [\"train\", \"additional\"]:\n    print(base_dir)    \n    type1 = glob.glob(\"../input/{}/Type_1/*.jpg\".format(base_dir))\n    type2 = glob.glob(\"../input/{}/Type_2/*.jpg\".format(base_dir))\n    type3 = glob.glob(\"../input/{}/Type_3/*.jpg\".format(base_dir))\n    print(\"Type 1:\", len(type1))\n    print(\"Type 2:\", len(type2))\n    print(\"Type 3:\", len(type3))\n    print(\"--\")\nplt.imshow(np.hstack([imresize(plt.imread(x), (320,240)) for x in type1[:5]]))\n"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"5710d15f-971f-1598-a00d-4983f20cecfb"},"outputs":[],"source":"plt.imshow(np.hstack([imresize(plt.imread(x), (320,240)) for x in type2[:5]]))"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"9e8b3610-2f18-fa40-a2d1-6e9bd753b0a1"},"outputs":[],"source":"plt.imshow(np.hstack([imresize(plt.imread(x), (320,240)) for x in type3[:5]]))"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"3baadb57-4cb2-eb41-98c6-8935049d7ca7"},"outputs":[],"source":"for base_dir in [\"train\", \"additional\"]:\n    for x in glob.glob(\"../input/{}/**/*.jpg\".format(base_dir)):\n        s = os.stat(x)\n        if s.st_size == 0:\n            print(\"WARNING: corrupted file: \", x)\n"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"da01ce89-7fa7-b3ed-b88f-751183cef995"},"outputs":[],"source":""}],"metadata":{"_change_revision":0,"_is_fork":false,"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.6.0"}},"nbformat":4,"nbformat_minor":0}