{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceType":"competition","sourceId":14774,"databundleVersionId":875431},{"sourceType":"competition","sourceId":4104,"databundleVersionId":46661},{"sourceType":"datasetVersion","sourceId":14872810,"datasetId":9514685,"databundleVersionId":15735105},{"sourceType":"datasetVersion","sourceId":14873751,"datasetId":9515254,"databundleVersionId":15736156}],"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# PHASE 1 Imports  # ","metadata":{}},{"cell_type":"code","source":"# EyePACS dataset (training)\nTRAIN_DIR = \"/kaggle/input/diabetic-retinopathy-detection/train_images\"\nTRAIN_CSV = \"/kaggle/input/diabetic-retinopathy-detection/trainLabels.csv\"\n# APTOS dataset (external testing)\nAPTOS_DIR = \"/kaggle/input/aptos2019-blindness-detection/train_images\"\nAPTOS_CSV = \"/kaggle/input/aptos2019-blindness-detection/train.csv\"","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-26T09:36:47.410195Z","iopub.execute_input":"2026-03-26T09:36:47.41049Z","iopub.status.idle":"2026-03-26T09:36:47.414656Z","shell.execute_reply.started":"2026-03-26T09:36:47.410467Z","shell.execute_reply":"2026-03-26T09:36:47.413955Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"df = pd.read_csv(TRAIN_CSV)\n\n# Rename columns for consistency\ndf.columns = ['id_code', 'diagnosis']\n\n# Add file extension (.jpeg)\ndf['id_code'] = df['id_code'].apply(lambda x: x + \".jpeg\")\n\nprint(\"Total Images:\", len(df))\nprint(df.head())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-26T09:36:47.630493Z","iopub.execute_input":"2026-03-26T09:36:47.630926Z","iopub.status.idle":"2026-03-26T09:36:47.641513Z","shell.execute_reply.started":"2026-03-26T09:36:47.630897Z","shell.execute_reply":"2026-03-26T09:36:47.640413Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"","metadata":{"trusted":true},"outputs":[],"execution_count":null}]}