{"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 cv2\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","scrolled":true,"execution":{"iopub.status.busy":"2023-04-07T05:35:50.866905Z","iopub.execute_input":"2023-04-07T05:35:50.867632Z","iopub.status.idle":"2023-04-07T05:35:51.114587Z","shell.execute_reply.started":"2023-04-07T05:35:50.867574Z","shell.execute_reply":"2023-04-07T05:35:51.113048Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# Check the shape of an image \nimg_path = '/kaggle/input/ibiohash-2023-fgvc10/iBioHash_Gallery/Gallery/1000033607566.jpg'\nimg = cv2.imread(img_path)\nprint(img.shape)","metadata":{"execution":{"iopub.status.busy":"2023-04-07T05:36:12.298594Z","iopub.execute_input":"2023-04-07T05:36:12.299103Z","iopub.status.idle":"2023-04-07T05:36:12.347014Z","shell.execute_reply.started":"2023-04-07T05:36:12.299060Z","shell.execute_reply":"2023-04-07T05:36:12.345942Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"gallery_dir = '/kaggle/input/ibiohash-2023-fgvc10/iBioHash_Gallery/Gallery/'\nquery_dir = '/kaggle/input/ibiohash-2023-fgvc10/iBioHash_Query/Query'\ngallery_imgs = []\ngallery_img_shapes = []","metadata":{"execution":{"iopub.status.busy":"2023-04-07T06:09:27.221447Z","iopub.execute_input":"2023-04-07T06:09:27.221974Z","iopub.status.idle":"2023-04-07T06:09:27.228810Z","shell.execute_reply.started":"2023-04-07T06:09:27.221936Z","shell.execute_reply":"2023-04-07T06:09:27.227217Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for path in os.listdir(gallery_dir):\n    img_path = os.path.join(gallery_dir, path)\n    img = cv2.imread(img_path)\n    \n    width, height = img.shape[1], img.shape[0]\n    gallery_img_shapes.append((width, height))\nunique_gallery_shapes = list(set(img_shapes))","metadata":{"execution":{"iopub.status.busy":"2023-04-07T06:09:53.919276Z","iopub.execute_input":"2023-04-07T06:09:53.919753Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}