{"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":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-04-21T02:12:04.202236Z","iopub.execute_input":"2023-04-21T02:12:04.202930Z","iopub.status.idle":"2023-04-21T02:12:06.243935Z","shell.execute_reply.started":"2023-04-21T02:12:04.202889Z","shell.execute_reply":"2023-04-21T02:12:06.242706Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Load the required libraries\n","metadata":{}},{"cell_type":"code","source":"import tensorflow as tf\nfrom tensorflow import keras\nimport cv2\nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:16.500285Z","iopub.execute_input":"2023-04-21T03:22:16.500714Z","iopub.status.idle":"2023-04-21T03:22:16.507280Z","shell.execute_reply.started":"2023-04-21T03:22:16.500677Z","shell.execute_reply":"2023-04-21T03:22:16.505582Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Load the data","metadata":{}},{"cell_type":"code","source":"df_train_labels = pd.read_csv(\"/kaggle/input/image-matching-challenge-2023/train/train_labels.csv\")","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:18.289524Z","iopub.execute_input":"2023-04-21T03:22:18.289956Z","iopub.status.idle":"2023-04-21T03:22:18.302178Z","shell.execute_reply.started":"2023-04-21T03:22:18.289919Z","shell.execute_reply":"2023-04-21T03:22:18.300750Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# View the data","metadata":{}},{"cell_type":"code","source":"df_train_labels.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:20.925906Z","iopub.execute_input":"2023-04-21T03:22:20.926330Z","iopub.status.idle":"2023-04-21T03:22:20.940224Z","shell.execute_reply.started":"2023-04-21T03:22:20.926292Z","shell.execute_reply":"2023-04-21T03:22:20.939262Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Information about data","metadata":{}},{"cell_type":"code","source":"df_train_labels.info()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:21.599291Z","iopub.execute_input":"2023-04-21T03:22:21.599710Z","iopub.status.idle":"2023-04-21T03:22:21.614183Z","shell.execute_reply.started":"2023-04-21T03:22:21.599674Z","shell.execute_reply":"2023-04-21T03:22:21.612792Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.shape","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:21.872738Z","iopub.execute_input":"2023-04-21T03:22:21.873375Z","iopub.status.idle":"2023-04-21T03:22:21.882164Z","shell.execute_reply.started":"2023-04-21T03:22:21.873326Z","shell.execute_reply":"2023-04-21T03:22:21.880712Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.describe()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:22.179475Z","iopub.execute_input":"2023-04-21T03:22:22.180127Z","iopub.status.idle":"2023-04-21T03:22:22.203301Z","shell.execute_reply.started":"2023-04-21T03:22:22.180075Z","shell.execute_reply":"2023-04-21T03:22:22.201998Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.describe().T","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:22.431321Z","iopub.execute_input":"2023-04-21T03:22:22.431706Z","iopub.status.idle":"2023-04-21T03:22:22.454752Z","shell.execute_reply.started":"2023-04-21T03:22:22.431672Z","shell.execute_reply":"2023-04-21T03:22:22.453405Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Check columns","metadata":{}},{"cell_type":"code","source":"df_train_labels.columns","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:23.039184Z","iopub.execute_input":"2023-04-21T03:22:23.040340Z","iopub.status.idle":"2023-04-21T03:22:23.048794Z","shell.execute_reply.started":"2023-04-21T03:22:23.040285Z","shell.execute_reply":"2023-04-21T03:22:23.047484Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.value_counts()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:23.219489Z","iopub.execute_input":"2023-04-21T03:22:23.220142Z","iopub.status.idle":"2023-04-21T03:22:23.238401Z","shell.execute_reply.started":"2023-04-21T03:22:23.220073Z","shell.execute_reply":"2023-04-21T03:22:23.237029Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Unique values in data","metadata":{}},{"cell_type":"code","source":"df_train_labels.columns","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:23.935722Z","iopub.execute_input":"2023-04-21T03:22:23.936201Z","iopub.status.idle":"2023-04-21T03:22:23.944731Z","shell.execute_reply.started":"2023-04-21T03:22:23.936154Z","shell.execute_reply":"2023-04-21T03:22:23.943186Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels['dataset'].unique()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:24.040431Z","iopub.execute_input":"2023-04-21T03:22:24.041119Z","iopub.status.idle":"2023-04-21T03:22:24.048700Z","shell.execute_reply.started":"2023-04-21T03:22:24.041062Z","shell.execute_reply":"2023-04-21T03:22:24.047282Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels['scene'].unique()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:24.456442Z","iopub.execute_input":"2023-04-21T03:22:24.457060Z","iopub.status.idle":"2023-04-21T03:22:24.465446Z","shell.execute_reply.started":"2023-04-21T03:22:24.457008Z","shell.execute_reply":"2023-04-21T03:22:24.464003Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#df_train_labels['image_path'].unique()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:24.561460Z","iopub.execute_input":"2023-04-21T03:22:24.561892Z","iopub.status.idle":"2023-04-21T03:22:24.566576Z","shell.execute_reply.started":"2023-04-21T03:22:24.561851Z","shell.execute_reply":"2023-04-21T03:22:24.565430Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Find the null values","metadata":{}},{"cell_type":"code","source":"df_train_labels.duplicated().sum()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:25.173209Z","iopub.execute_input":"2023-04-21T03:22:25.174236Z","iopub.status.idle":"2023-04-21T03:22:25.184768Z","shell.execute_reply.started":"2023-04-21T03:22:25.174189Z","shell.execute_reply":"2023-04-21T03:22:25.183364Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.isnull().sum()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:25.382116Z","iopub.execute_input":"2023-04-21T03:22:25.382866Z","iopub.status.idle":"2023-04-21T03:22:25.394050Z","shell.execute_reply.started":"2023-04-21T03:22:25.382778Z","shell.execute_reply":"2023-04-21T03:22:25.392573Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels.isnull().sum().sum()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:25.677559Z","iopub.execute_input":"2023-04-21T03:22:25.678191Z","iopub.status.idle":"2023-04-21T03:22:25.688588Z","shell.execute_reply.started":"2023-04-21T03:22:25.678137Z","shell.execute_reply":"2023-04-21T03:22:25.687147Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Check datatypes","metadata":{}},{"cell_type":"code","source":"df_train_labels.dtypes","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:26.229284Z","iopub.execute_input":"2023-04-21T03:22:26.230299Z","iopub.status.idle":"2023-04-21T03:22:26.238739Z","shell.execute_reply.started":"2023-04-21T03:22:26.230247Z","shell.execute_reply":"2023-04-21T03:22:26.237599Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Check Shape","metadata":{}},{"cell_type":"code","source":"df_train_labels.shape","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:26.822297Z","iopub.execute_input":"2023-04-21T03:22:26.823522Z","iopub.status.idle":"2023-04-21T03:22:26.829949Z","shell.execute_reply.started":"2023-04-21T03:22:26.823471Z","shell.execute_reply":"2023-04-21T03:22:26.828802Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Check datatype and its columns data same type or not","metadata":{}},{"cell_type":"code","source":"df_train_labels.head(3)","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:27.799189Z","iopub.execute_input":"2023-04-21T03:22:27.799593Z","iopub.status.idle":"2023-04-21T03:22:27.812783Z","shell.execute_reply.started":"2023-04-21T03:22:27.799555Z","shell.execute_reply":"2023-04-21T03:22:27.811340Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Piechart to see how much percentage dataset are there","metadata":{}},{"cell_type":"code","source":"import seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:28.331486Z","iopub.execute_input":"2023-04-21T03:22:28.331873Z","iopub.status.idle":"2023-04-21T03:22:28.337182Z","shell.execute_reply.started":"2023-04-21T03:22:28.331840Z","shell.execute_reply":"2023-04-21T03:22:28.335916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_train_labels['dataset'].unique()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:28.593352Z","iopub.execute_input":"2023-04-21T03:22:28.593741Z","iopub.status.idle":"2023-04-21T03:22:28.601012Z","shell.execute_reply.started":"2023-04-21T03:22:28.593707Z","shell.execute_reply":"2023-04-21T03:22:28.599627Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.pie(df_train_labels['dataset'].value_counts(),startangle=90,autopct='%.3f',labels=['urban', 'heritage', 'haiper'],shadow=True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:28.897614Z","iopub.execute_input":"2023-04-21T03:22:28.898041Z","iopub.status.idle":"2023-04-21T03:22:29.060251Z","shell.execute_reply.started":"2023-04-21T03:22:28.898002Z","shell.execute_reply":"2023-04-21T03:22:29.058121Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Piechart to see how much percentage scene are there","metadata":{}},{"cell_type":"code","source":"df_train_labels['scene'].unique()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:29.444564Z","iopub.execute_input":"2023-04-21T03:22:29.445003Z","iopub.status.idle":"2023-04-21T03:22:29.453255Z","shell.execute_reply.started":"2023-04-21T03:22:29.444962Z","shell.execute_reply":"2023-04-21T03:22:29.452082Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.pie(df_train_labels['scene'].value_counts(),startangle=90,autopct='%.3f',labels=['kyiv-puppet-theater', 'dioscuri', 'cyprus', 'bike', 'chairs',\n       'fountain', 'wall'],shadow=True)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:29.703740Z","iopub.execute_input":"2023-04-21T03:22:29.704171Z","iopub.status.idle":"2023-04-21T03:22:29.925656Z","shell.execute_reply.started":"2023-04-21T03:22:29.704132Z","shell.execute_reply":"2023-04-21T03:22:29.923843Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import pandas as pd\nfrom dataprep.eda import create_report\ndf = pd.read_csv(\"/kaggle/input/image-matching-challenge-2023/train/train_labels.csv\")\ncreate_report(df)","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:25:17.257982Z","iopub.execute_input":"2023-04-21T03:25:17.258840Z","iopub.status.idle":"2023-04-21T03:25:24.880729Z","shell.execute_reply.started":"2023-04-21T03:25:17.258704Z","shell.execute_reply":"2023-04-21T03:25:24.879127Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# WORK STILL IN PROGRESS","metadata":{"execution":{"iopub.status.busy":"2023-04-21T03:22:30.019268Z","iopub.execute_input":"2023-04-21T03:22:30.019691Z","iopub.status.idle":"2023-04-21T03:22:30.024582Z","shell.execute_reply.started":"2023-04-21T03:22:30.019654Z","shell.execute_reply":"2023-04-21T03:22:30.023601Z"},"trusted":true},"execution_count":null,"outputs":[]},{"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":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}