From 24a675a2f9ef56c189ce9f646135f2e28a457822 Mon Sep 17 00:00:00 2001 From: Samet Akcay Date: Fri, 3 Jan 2025 15:54:41 +0000 Subject: [PATCH] Update the path to dataset in notebooks Signed-off-by: Samet Akcay --- .../notebooks/000_getting_started/001_getting_started.ipynb | 4 ++-- examples/notebooks/100_datamodules/101_btech.ipynb | 2 +- examples/notebooks/100_datamodules/102_mvtec.ipynb | 2 +- examples/notebooks/100_datamodules/103_folder.ipynb | 2 +- examples/notebooks/100_datamodules/104_tiling.ipynb | 2 +- examples/notebooks/200_models/201_fastflow.ipynb | 2 +- examples/notebooks/400_openvino/401_nncf.ipynb | 2 +- examples/notebooks/600_loggers/601_mlflow_logging.ipynb | 2 +- examples/notebooks/700_metrics/701a_aupimo.ipynb | 2 +- examples/notebooks/700_metrics/701b_aupimo_advanced_i.ipynb | 2 +- examples/notebooks/700_metrics/701c_aupimo_advanced_ii.ipynb | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/notebooks/000_getting_started/001_getting_started.ipynb b/examples/notebooks/000_getting_started/001_getting_started.ipynb index 3d469e8709..60e967cdbe 100644 --- a/examples/notebooks/000_getting_started/001_getting_started.ipynb +++ b/examples/notebooks/000_getting_started/001_getting_started.ipynb @@ -124,7 +124,7 @@ "if current_directory.name == \"000_getting_started\":\n", " # On the assumption that, the notebook is located in\n", " # ~/anomalib/examples/notebooks/000_getting_started/\n", - " root_directory = current_directory.parent.parent\n", + " root_directory = current_directory.parent.parent.parent\n", "elif current_directory.name == \"anomalib\":\n", " # This means that the notebook is run from the main anomalib directory.\n", " root_directory = current_directory\n", @@ -648,7 +648,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.11.8" }, "orig_nbformat": 4 }, diff --git a/examples/notebooks/100_datamodules/101_btech.ipynb b/examples/notebooks/100_datamodules/101_btech.ipynb index cd980fc56e..ce14964b76 100644 --- a/examples/notebooks/100_datamodules/101_btech.ipynb +++ b/examples/notebooks/100_datamodules/101_btech.ipynb @@ -48,7 +48,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"BTech\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"BTech\"" ] }, { diff --git a/examples/notebooks/100_datamodules/102_mvtec.ipynb b/examples/notebooks/100_datamodules/102_mvtec.ipynb index cbc62f51dd..4fc6bbb5d6 100644 --- a/examples/notebooks/100_datamodules/102_mvtec.ipynb +++ b/examples/notebooks/100_datamodules/102_mvtec.ipynb @@ -57,7 +57,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\"" ] }, { diff --git a/examples/notebooks/100_datamodules/103_folder.ipynb b/examples/notebooks/100_datamodules/103_folder.ipynb index e40b68a858..f733dffc2e 100644 --- a/examples/notebooks/100_datamodules/103_folder.ipynb +++ b/examples/notebooks/100_datamodules/103_folder.ipynb @@ -42,7 +42,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"hazelnut_toy\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"hazelnut_toy\"" ] }, { diff --git a/examples/notebooks/100_datamodules/104_tiling.ipynb b/examples/notebooks/100_datamodules/104_tiling.ipynb index dd901c37e7..c8d39f0a1a 100644 --- a/examples/notebooks/100_datamodules/104_tiling.ipynb +++ b/examples/notebooks/100_datamodules/104_tiling.ipynb @@ -44,7 +44,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\" / \"transistor\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\" / \"transistor\"" ] }, { diff --git a/examples/notebooks/200_models/201_fastflow.ipynb b/examples/notebooks/200_models/201_fastflow.ipynb index 8b8e8bed62..4a53fd20ba 100644 --- a/examples/notebooks/200_models/201_fastflow.ipynb +++ b/examples/notebooks/200_models/201_fastflow.ipynb @@ -44,7 +44,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\"" ] }, { diff --git a/examples/notebooks/400_openvino/401_nncf.ipynb b/examples/notebooks/400_openvino/401_nncf.ipynb index efb1216d69..532aef0513 100644 --- a/examples/notebooks/400_openvino/401_nncf.ipynb +++ b/examples/notebooks/400_openvino/401_nncf.ipynb @@ -24,7 +24,7 @@ "if current_directory.name == \"400_openvino\":\n", " # On the assumption that, the notebook is located in\n", " # ~/anomalib/examples/notebooks/400_openvino/\n", - " root_directory = current_directory.parent.parent\n", + " root_directory = current_directory.parent.parent.parent\n", "elif current_directory.name == \"anomalib\":\n", " # This means that the notebook is run from the main anomalib directory.\n", " root_directory = current_directory\n", diff --git a/examples/notebooks/600_loggers/601_mlflow_logging.ipynb b/examples/notebooks/600_loggers/601_mlflow_logging.ipynb index 3588816c28..dbb274d8c5 100644 --- a/examples/notebooks/600_loggers/601_mlflow_logging.ipynb +++ b/examples/notebooks/600_loggers/601_mlflow_logging.ipynb @@ -135,7 +135,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\"" ] }, { diff --git a/examples/notebooks/700_metrics/701a_aupimo.ipynb b/examples/notebooks/700_metrics/701a_aupimo.ipynb index 1cd1423927..ddc1c92c4b 100644 --- a/examples/notebooks/700_metrics/701a_aupimo.ipynb +++ b/examples/notebooks/700_metrics/701a_aupimo.ipynb @@ -80,7 +80,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\"" ] }, { diff --git a/examples/notebooks/700_metrics/701b_aupimo_advanced_i.ipynb b/examples/notebooks/700_metrics/701b_aupimo_advanced_i.ipynb index de1137a5e9..1955c73cda 100644 --- a/examples/notebooks/700_metrics/701b_aupimo_advanced_i.ipynb +++ b/examples/notebooks/700_metrics/701b_aupimo_advanced_i.ipynb @@ -86,7 +86,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\"" ] }, { diff --git a/examples/notebooks/700_metrics/701c_aupimo_advanced_ii.ipynb b/examples/notebooks/700_metrics/701c_aupimo_advanced_ii.ipynb index c3f8419e66..aafa59c647 100644 --- a/examples/notebooks/700_metrics/701c_aupimo_advanced_ii.ipynb +++ b/examples/notebooks/700_metrics/701c_aupimo_advanced_ii.ipynb @@ -88,7 +88,7 @@ "# NOTE: Provide the path to the dataset root directory.\n", "# If the datasets is not downloaded, it will be downloaded\n", "# to this directory.\n", - "dataset_root = Path.cwd().parent.parent / \"datasets\" / \"MVTec\"" + "dataset_root = Path.cwd().parent.parent.parent / \"datasets\" / \"MVTec\"" ] }, {