{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.11.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":113558,"databundleVersionId":14174843,"isSourceIdPinned":false,"sourceType":"competition"}],"dockerImageVersionId":31153,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"# **Authentic/Forgery Image Comparison**","metadata":{"execution":{"iopub.status.busy":"2025-10-24T07:57:44.77938Z","iopub.execute_input":"2025-10-24T07:57:44.780774Z","iopub.status.idle":"2025-10-24T07:58:28.039094Z","shell.execute_reply.started":"2025-10-24T07:57:44.780736Z","shell.execute_reply":"2025-10-24T07:58:28.038265Z"}}},{"cell_type":"code","source":"import os, glob, cv2, math, warnings\nwarnings.filterwarnings(\"ignore\")\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:01.446127Z","iopub.execute_input":"2025-10-27T16:44:01.446979Z","iopub.status.idle":"2025-10-27T16:44:01.451764Z","shell.execute_reply.started":"2025-10-27T16:44:01.446949Z","shell.execute_reply":"2025-10-27T16:44:01.450739Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"def show(i):\n    path='/kaggle/input/recodai-luc-scientific-image-forgery-detection'\n    img1 = mpimg.imread(f'{path}/train_images/authentic/{i}.png')\n    img2 = mpimg.imread(f'{path}/train_images/forged/{i}.png')\n    img3 = np.load(f'{path}/train_masks/{i}.npy')[0]\n    titles=['authentic','forged','mask']\n    fig, axes = plt.subplots(1, 3, figsize=(12, 4))  \n    for ax, img, title in zip(axes, [img1, img2, img3], titles):\n        ax.imshow(img)\n        ax.axis('off')\n        ax.set_title(title)\n    plt.tight_layout()\n    plt.show()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:01.453491Z","iopub.execute_input":"2025-10-27T16:44:01.453798Z","iopub.status.idle":"2025-10-27T16:44:01.469672Z","shell.execute_reply.started":"2025-10-27T16:44:01.453773Z","shell.execute_reply":"2025-10-27T16:44:01.468630Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(10)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:01.470656Z","iopub.execute_input":"2025-10-27T16:44:01.470929Z","iopub.status.idle":"2025-10-27T16:44:01.906133Z","shell.execute_reply.started":"2025-10-27T16:44:01.470899Z","shell.execute_reply":"2025-10-27T16:44:01.905178Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(62195)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:52:03.812480Z","iopub.execute_input":"2025-10-27T16:52:03.812876Z","iopub.status.idle":"2025-10-27T16:52:04.296952Z","shell.execute_reply.started":"2025-10-27T16:52:03.812847Z","shell.execute_reply":"2025-10-27T16:52:04.295957Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(10015)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:01.908090Z","iopub.execute_input":"2025-10-27T16:44:01.908464Z","iopub.status.idle":"2025-10-27T16:44:03.208776Z","shell.execute_reply.started":"2025-10-27T16:44:01.908433Z","shell.execute_reply":"2025-10-27T16:44:03.207781Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(1008)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:03.209777Z","iopub.execute_input":"2025-10-27T16:44:03.210042Z","iopub.status.idle":"2025-10-27T16:44:03.455234Z","shell.execute_reply.started":"2025-10-27T16:44:03.210022Z","shell.execute_reply":"2025-10-27T16:44:03.454254Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(10138)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:03.456256Z","iopub.execute_input":"2025-10-27T16:44:03.456536Z","iopub.status.idle":"2025-10-27T16:44:08.890609Z","shell.execute_reply.started":"2025-10-27T16:44:03.456514Z","shell.execute_reply":"2025-10-27T16:44:08.889725Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(10070)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:08.891885Z","iopub.execute_input":"2025-10-27T16:44:08.892187Z","iopub.status.idle":"2025-10-27T16:44:09.289331Z","shell.execute_reply.started":"2025-10-27T16:44:08.892156Z","shell.execute_reply":"2025-10-27T16:44:09.288277Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(10602)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:44:09.291344Z","iopub.execute_input":"2025-10-27T16:44:09.291668Z","iopub.status.idle":"2025-10-27T16:44:09.660562Z","shell.execute_reply.started":"2025-10-27T16:44:09.291642Z","shell.execute_reply":"2025-10-27T16:44:09.659543Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"show(10296)","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2025-10-27T16:45:18.460197Z","iopub.execute_input":"2025-10-27T16:45:18.460557Z","iopub.status.idle":"2025-10-27T16:45:18.864102Z","shell.execute_reply.started":"2025-10-27T16:45:18.460533Z","shell.execute_reply":"2025-10-27T16:45:18.863245Z"}},"outputs":[],"execution_count":null}]}