{"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_minor":4,"nbformat":4,"cells":[{"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 glob\nimport cv2\nimport matplotlib.pyplot as plt","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-03-20T09:25:46.332263Z","iopub.execute_input":"2022-03-20T09:25:46.332651Z","iopub.status.idle":"2022-03-20T09:25:46.714022Z","shell.execute_reply.started":"2022-03-20T09:25:46.332565Z","shell.execute_reply":"2022-03-20T09:25:46.713111Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = glob.glob(\"../input/happy-whale-and-dolphin/test_images/*\")\nI=cv2.imread(train[0])\nI.shape","metadata":{"execution":{"iopub.status.busy":"2022-03-20T09:25:46.715704Z","iopub.execute_input":"2022-03-20T09:25:46.715999Z","iopub.status.idle":"2022-03-20T09:25:47.415394Z","shell.execute_reply.started":"2022-03-20T09:25:46.715963Z","shell.execute_reply":"2022-03-20T09:25:47.414589Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data =pd.DataFrame()\ndata['path'] = train\ndata['x']=data['path'].apply(lambda a: cv2.imread(a).shape[0])\ndata['y']=data['path'].apply(lambda a: cv2.imread(a).shape[1])\ndata","metadata":{"execution":{"iopub.status.busy":"2022-03-20T09:25:47.416793Z","iopub.execute_input":"2022-03-20T09:25:47.417163Z","iopub.status.idle":"2022-03-20T10:33:24.577393Z","shell.execute_reply.started":"2022-03-20T09:25:47.41712Z","shell.execute_reply":"2022-03-20T10:33:24.576026Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.describe()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test = glob.glob(\"../input/happy-whale-and-dolphin/train_images/*\")\nI=cv2.imread(test[0])\nI.shape","metadata":{"execution":{"iopub.status.busy":"2022-03-20T10:33:24.581771Z","iopub.execute_input":"2022-03-20T10:33:24.582144Z","iopub.status.idle":"2022-03-20T10:33:25.607751Z","shell.execute_reply.started":"2022-03-20T10:33:24.582088Z","shell.execute_reply":"2022-03-20T10:33:25.60716Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data2 =pd.DataFrame()\ndata2['path'] = test\ndata2['x'] =data2['path'].apply(lambda a: cv2.imread(a).shape[0])\ndata2['y'] =data2['path'].apply(lambda a: cv2.imread(a).shape[1])\ndata2\n","metadata":{"execution":{"iopub.status.busy":"2022-03-20T10:33:25.608771Z","iopub.execute_input":"2022-03-20T10:33:25.609452Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data2.describe()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.to_csv('train.csv',index=False)\ndata2.to_csv('test.csv',index=False)","metadata":{"trusted":true},"execution_count":null,"outputs":[]}]}