{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.12.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[],"dockerImageVersionId":28755,"isInternetEnabled":false,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"!7z x /kaggle/input/competitions/cifar-10/train.7z","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-10T18:21:19.935246Z","iopub.execute_input":"2026-07-10T18:21:19.935502Z","iopub.status.idle":"2026-07-10T18:27:45.353513Z","shell.execute_reply.started":"2026-07-10T18:21:19.935479Z","shell.execute_reply":"2026-07-10T18:27:45.352823Z"},"collapsed":true,"jupyter":{"outputs_hidden":true}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!pip install timm","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-10T18:35:31.554487Z","iopub.execute_input":"2026-07-10T18:35:31.554733Z","iopub.status.idle":"2026-07-10T18:35:35.951532Z","shell.execute_reply.started":"2026-07-10T18:35:31.554712Z","shell.execute_reply":"2026-07-10T18:35:35.950869Z"},"collapsed":true,"jupyter":{"outputs_hidden":true}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport random\nfrom PIL import Image\n\nimgs = random.sample(os.listdir(\"/kaggle/working/train\"), 25)\n\nfig, axes = plt.subplots(5, 5)\nfor ax, img in zip(axes.flat, imgs):\n    plot = mpimg.imread(\"/kaggle/working/train/\"+img)\n    ax.imshow(plot)\n    ax.axis('off')\nres = set()\nfor img in os.listdir(\"/kaggle/working/train\"):\n    with Image.open(\"/kaggle/working/train/\"+img) as src:\n        res.add((src.format, src.size, src.mode))\nprint(res)\n        \n\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-10T19:27:08.529278Z","iopub.execute_input":"2026-07-10T19:27:08.529539Z","iopub.status.idle":"2026-07-10T19:27:10.465481Z","shell.execute_reply.started":"2026-07-10T19:27:08.529513Z","shell.execute_reply":"2026-07-10T19:27:10.464874Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"import timm\ntimm.list_models('*vit*', pretrained=True)\ntimm.create_model('convit_base.fb_in1k', pretrained=True).pretrained_cfg","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-10T18:38:24.698970Z","iopub.execute_input":"2026-07-10T18:38:24.699337Z","iopub.status.idle":"2026-07-10T18:38:38.302103Z","shell.execute_reply.started":"2026-07-10T18:38:24.699319Z","shell.execute_reply":"2026-07-10T18:38:38.301539Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"from PIL import Image\n\nwith Image.open(\"example.jpg\") as img:\n    print(img.format, img.size, img.mode)  # Output example: JPEG (1920, 1080) RGB\n    img.show()\n","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-10T19:11:58.507963Z","iopub.execute_input":"2026-07-10T19:11:58.508194Z","iopub.status.idle":"2026-07-10T19:11:58.512049Z","shell.execute_reply.started":"2026-07-10T19:11:58.508175Z","shell.execute_reply":"2026-07-10T19:11:58.511024Z"}},"outputs":[],"execution_count":null}]}