{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport os\nprint(os.listdir(\"../input\"))","execution_count":null,"outputs":[]},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":true},"cell_type":"code","source":"train_df=pd.read_csv(\"../input/train.csv\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_df.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_df.info()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Check for NAN"},{"metadata":{"trusted":true},"cell_type":"code","source":"train_df['labels'].isnull().sum()\n#276 NAN ","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport os\nimport cv2\nimport matplotlib.pyplot as plt\nimport tqdm\nfrom PIL import Image\n%matplotlib inline\n\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"img=Image.open(\"../input/train_images/100241706_00004_2.jpg\")\nplt.imshow(img)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"image_ids=train_df[\"image_id\"].tolist()\nimage_size=[]\nfor image_id in image_ids:\n    img=Image.open(\"../input/train_images/\"+image_id+\".jpg\")\n    width,height=img.size\n    image_size.append((width,height))\n   \n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"image_size_df=pd.DataFrame(image_size,columns=[\"width\",\"height\"])\nimage_size_df.head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Image width/height distribution"},{"metadata":{"trusted":true},"cell_type":"code","source":"names = ['width', 'height']\nplt.hist([image_size_df[\"width\"], image_size_df[\"height\"]],label=names)\nplt.legend()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Lets see some train images"},{"metadata":{"trusted":true},"cell_type":"code","source":"trainimage_lst=train_df.head(20).image_id.tolist()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"fig=plt.figure(figsize=(64, 64))\ncolumns = 4\nrows = 5\nfor index,image_id  in enumerate(trainimage_lst):\n    img=Image.open(\"../input/train_images/\"+image_id+\".jpg\")\n    fig.add_subplot(rows, columns, index+1)\n    plt.imshow(img)\n    plt.axis('off')\nplt.show()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Lets check unicode_translation.csv"},{"metadata":{"trusted":true},"cell_type":"code","source":"translation_df=pd.read_csv(\"../input/unicode_translation.csv\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"translation_df.head(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"translation_df.info()","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.4","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}