{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"markdown","source":"## Let's GO!!!\n\nIn this Kernel We will be doing EDA on Google Landmark Retrieval:\n- [Understanding the data](#1)\n- [Plotting the data](#2)\n- [Displaying the images](#3)\n\n<p><font size='4' color='green'> If you like this kernel then please consider giving an upvote !</font></p>","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"from IPython.display import Image\nImage(\"../input/imagefile/place.jpg\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Understanding the data <a id=\"1\" ></a>","execution_count":null},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"#Importing necessary libraries\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport cv2\nimport glob","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"import os\nprint(os.listdir(\"../input/landmark-retrieval-2020\"))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#reading the training and test data\ntrain_data = pd.read_csv('../input/landmark-retrieval-2020/train.csv')\n\nprint(\"Training data size:\",train_data.shape)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_data.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_data.info()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train_data.head()\ntrain_data['landmark_id'][33]","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#Displaying number of unique URLs & ids\nlen(train_data['landmark_id'].unique())","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"len(train_data['id'].unique())","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Plotting the data <a id=\"2\" ></a>","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.title('Distribution')\nsns.distplot(train_data['landmark_id'])","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"sns.set()\nprint(train_data.nunique())\ntrain_data['landmark_id'].value_counts().hist()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"from scipy import stats\nsns.set()\nres = stats.probplot(train_data['landmark_id'], plot=plt)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Displaying the images <a id=\"3\" ></a>","execution_count":null},{"metadata":{"trusted":true},"cell_type":"code","source":"test_list = glob.glob('../input/landmark-retrieval-2020/test/*/*/*/*')\nindex_list = glob.glob('../input/landmark-retrieval-2020/index/*/*/*/*')\ntrain_list= glob.glob('../input/landmark-retrieval-2020/train/*/*/*/*')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.rcParams[\"axes.grid\"] = True\nf, axarr = plt.subplots(6, 5, figsize=(24, 22))\n\ncurr_row = 0\nfor i in range(30):\n    example = cv2.imread(test_list[i])\n    example = example[:,:,::-1]\n    \n    col = i%6\n    axarr[col, curr_row].imshow(example)\n    if col == 5:\n        curr_row += 1","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}