{"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":4104,"databundleVersionId":46661}],"dockerImageVersionId":31287,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"\n!ls /kaggle/input/competitions/diabetic-retinopathy-detection/trainLabels.csv.zip\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T18:56:09.915474Z","iopub.execute_input":"2026-03-05T18:56:09.915812Z","iopub.status.idle":"2026-03-05T18:56:10.052741Z","shell.execute_reply.started":"2026-03-05T18:56:09.91578Z","shell.execute_reply":"2026-03-05T18:56:10.051828Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import os\n\npath = \"/kaggle/input/competitions/diabetic-retinopathy-detection/trainLabels.csv.zip\"\nprint(len(os.listdir(path)))","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T18:58:20.530397Z","iopub.execute_input":"2026-03-05T18:58:20.531304Z","iopub.status.idle":"2026-03-05T18:58:20.539888Z","shell.execute_reply.started":"2026-03-05T18:58:20.531265Z","shell.execute_reply":"2026-03-05T18:58:20.538855Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!unzip /kaggle/input/competitions/diabetic-retinopathy-detection/trainLabels.csv.zip","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T18:59:22.013593Z","iopub.execute_input":"2026-03-05T18:59:22.014261Z","iopub.status.idle":"2026-03-05T18:59:22.161196Z","shell.execute_reply.started":"2026-03-05T18:59:22.01423Z","shell.execute_reply":"2026-03-05T18:59:22.160341Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import pandas as pd\n\nlabels = pd.read_csv(\"trainLabels.csv\")\n\nlabels.head()\nlabels['image'] = labels['image'].astype(str) + \".jpeg\"\n!unzip -q /kaggle/input/competitions/diabetic-retinopathy-detection/train.zip\n!ls train | head","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T19:00:47.131724Z","iopub.execute_input":"2026-03-05T19:00:47.132613Z","iopub.status.idle":"2026-03-05T19:00:47.441936Z","shell.execute_reply.started":"2026-03-05T19:00:47.132574Z","shell.execute_reply":"2026-03-05T19:00:47.441036Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/input/competitions/diabetic-retinopathy-detection/train.zip.* > train.zip","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T19:03:36.788926Z","iopub.execute_input":"2026-03-05T19:03:36.789722Z","iopub.status.idle":"2026-03-05T19:06:05.722062Z","shell.execute_reply.started":"2026-03-05T19:03:36.789686Z","shell.execute_reply":"2026-03-05T19:06:05.721062Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!rm -rf /kaggle/working/*","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T19:21:05.71519Z","iopub.execute_input":"2026-03-05T19:21:05.715502Z","iopub.status.idle":"2026-03-05T19:21:05.852379Z","shell.execute_reply.started":"2026-03-05T19:21:05.715475Z","shell.execute_reply":"2026-03-05T19:21:05.851605Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!cat /kaggle/input/competitions/diabetic-retinopathy-detection/train.zip.001 \\\n> train_small.zip\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T19:14:47.857385Z","iopub.execute_input":"2026-03-05T19:14:47.85806Z","iopub.status.idle":"2026-03-05T19:15:27.601909Z","shell.execute_reply.started":"2026-03-05T19:14:47.858025Z","shell.execute_reply":"2026-03-05T19:15:27.601046Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!unzip -q train_small.zip","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-03-05T19:20:15.903851Z","iopub.execute_input":"2026-03-05T19:20:15.90423Z","iopub.status.idle":"2026-03-05T19:20:16.042558Z","shell.execute_reply.started":"2026-03-05T19:20:15.904196Z","shell.execute_reply":"2026-03-05T19:20:16.041728Z"}},"outputs":[],"execution_count":null}]}