{"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":"markdown","source":"## Hi all Dolphins and Whales here.\n### Let's do it together.","metadata":{}},{"cell_type":"markdown","source":"> ## Required libraries","metadata":{}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd \nimport os\nimport cv2\nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:36:59.592835Z","iopub.execute_input":"2022-02-02T09:36:59.593166Z","iopub.status.idle":"2022-02-02T09:37:01.222839Z","shell.execute_reply.started":"2022-02-02T09:36:59.593133Z","shell.execute_reply":"2022-02-02T09:37:01.221860Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"samp_submission = pd.read_csv('/kaggle/input/happy-whale-and-dolphin/sample_submission.csv')\ntrain_csv = pd.read_csv('/kaggle/input/happy-whale-and-dolphin/train.csv')","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:09:38.531270Z","iopub.execute_input":"2022-02-02T09:09:38.531637Z","iopub.status.idle":"2022-02-02T09:09:38.705566Z","shell.execute_reply.started":"2022-02-02T09:09:38.531596Z","shell.execute_reply":"2022-02-02T09:09:38.704589Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> ## Data Analysis","metadata":{}},{"cell_type":"code","source":"train_csv.head()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_csv.describe()","metadata":{"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#### So there are 30 unique species","metadata":{}},{"cell_type":"code","source":"train_csv.species.unique()","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:09:44.358719Z","iopub.execute_input":"2022-02-02T09:09:44.359130Z","iopub.status.idle":"2022-02-02T09:09:44.380929Z","shell.execute_reply.started":"2022-02-02T09:09:44.359093Z","shell.execute_reply":"2022-02-02T09:09:44.379743Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_csv.species.value_counts()","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:09:46.274500Z","iopub.execute_input":"2022-02-02T09:09:46.274814Z","iopub.status.idle":"2022-02-02T09:09:46.291692Z","shell.execute_reply.started":"2022-02-02T09:09:46.274784Z","shell.execute_reply":"2022-02-02T09:09:46.290922Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_csv.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:09:55.194864Z","iopub.execute_input":"2022-02-02T09:09:55.195287Z","iopub.status.idle":"2022-02-02T09:09:55.219678Z","shell.execute_reply.started":"2022-02-02T09:09:55.195253Z","shell.execute_reply":"2022-02-02T09:09:55.218881Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> ## As the dataset is so huge, let's specify directory paths and get Image paths","metadata":{}},{"cell_type":"code","source":"train_directory = '../input/happy-whale-and-dolphin/train_images'\ntest_directory = '../input/happy-whale-and-dolphin/test_images'\n\ndef getImagePaths(path):\n    images = []\n    for directoryname, _, filename in os.walk(path):\n        for fname in filename:\n            fullpath = os.path.join(directoryname, fname)\n            images.append(fullpath)\n    return images\n\ntrainimages_path = getImagePaths(train_directory)\ntestimages_path = getImagePaths(test_directory)","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:41:22.537030Z","iopub.execute_input":"2022-02-02T09:41:22.537338Z","iopub.status.idle":"2022-02-02T09:42:04.193726Z","shell.execute_reply.started":"2022-02-02T09:41:22.537304Z","shell.execute_reply":"2022-02-02T09:42:04.192509Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#### Now we have the image paths, we can load the images easily.","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"samp_submission.head()","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:09:56.142658Z","iopub.execute_input":"2022-02-02T09:09:56.144305Z","iopub.status.idle":"2022-02-02T09:09:56.157811Z","shell.execute_reply.started":"2022-02-02T09:09:56.144235Z","shell.execute_reply":"2022-02-02T09:09:56.157021Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"> ## Data Modeling","metadata":{}},{"cell_type":"markdown","source":"#### Figuring ot out. Coming soon!","metadata":{}},{"cell_type":"markdown","source":"> ## Submission","metadata":{}},{"cell_type":"markdown","source":"#### Just trying to submit the sample file directly. That's not the correct way. That's just for trial.","metadata":{}},{"cell_type":"code","source":"samp_submission.to_csv('submission.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2022-02-02T09:14:17.569868Z","iopub.execute_input":"2022-02-02T09:14:17.570178Z","iopub.status.idle":"2022-02-02T09:14:17.713180Z","shell.execute_reply.started":"2022-02-02T09:14:17.570145Z","shell.execute_reply":"2022-02-02T09:14:17.712229Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#### This notebook is not yet completed.","metadata":{}},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}