You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"source": "# Update this path to where your fastMRI knee single-coil data is stored.\n# You only need ONE .h5 file from the knee_singlecoil_val set.\n\n# --- Google Colab: mount Drive and copy data ---\nfrom google.colab import drive\n\ndrive.mount(\"/content/drive\")\n\ndrive_folder = \"/content/drive/MyDrive/fastmri_data\"\ndata_path = \"/content/fastmri_data/knee_singlecoil_val\"\nos.makedirs(data_path, exist_ok=True)\n\nfiles = [f for f in os.listdir(drive_folder) if f.endswith(\".h5\")]\nif files:\n shutil.copy(os.path.join(drive_folder, files[0]), data_path)\n print(f\"Copied {files[0]} to {data_path}\")\nelse:\n raise FileNotFoundError(\n f\"No .h5 files found in {drive_folder}\\n\"\n \"Please upload at least one .h5 file from knee_singlecoil_val.\"\n )\n\n# --- Local users: comment out the Colab block above and set your path ---\n# data_path = os.path.join(\"YOUR_DIR_HERE\", \"knee_singlecoil_val\")\n\nsample_files = sorted([f for f in os.listdir(data_path) if f.endswith(\".h5\")])\nsample_file = os.path.join(data_path, sample_files[0])\nprint(f\"Using sample file: {sample_file}\")\nprint(f\"Total .h5 files found: {len(sample_files)}\")"
136
+
"source": [
137
+
"# Update this path to where your fastMRI knee single-coil data is stored.\n",
138
+
"# You only need ONE .h5 file from the knee_singlecoil_val set.\n",
139
+
"\n",
140
+
"# --- Google Colab: mount Drive and copy data ---\n",
0 commit comments