From b47d02d68c308672751be29742fcef02a86e2f02 Mon Sep 17 00:00:00 2001 From: Eric Mintun <eric.mintun@gmail.com> Date: Wed, 5 Apr 2023 06:13:09 -0700 Subject: [PATCH] Fix broken links in notebook Colab setup. --- notebooks/automatic_mask_generator_example.ipynb | 8 ++++---- notebooks/onnx_model_example.ipynb | 8 ++++---- notebooks/predictor_example.ipynb | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/notebooks/automatic_mask_generator_example.ipynb b/notebooks/automatic_mask_generator_example.ipynb index c007a8c..261323d 100644 --- a/notebooks/automatic_mask_generator_example.ipynb +++ b/notebooks/automatic_mask_generator_example.ipynb @@ -74,7 +74,7 @@ "id": "47e5a78f", "metadata": {}, "source": [ - "If running locally using jupyter, first install `segment_anything` in your environment using the [installation instructions](https://github.com/facebookresearch/segment-anything#installation) in the repository. If running from Google collab, set `using_collab=True` below and run the cell." + "If running locally using jupyter, first install `segment_anything` in your environment using the [installation instructions](https://github.com/facebookresearch/segment-anything#installation) in the repository. If running from Google Colab, set `using_collab=True` below and run the cell. In Colab, be sure to select 'GPU' under 'Edit'->'Notebook Settings'->'Hardware accelerator'." ] }, { @@ -84,7 +84,7 @@ "metadata": {}, "outputs": [], "source": [ - "using_collab = False" + "using_colab = False" ] }, { @@ -94,7 +94,7 @@ "metadata": {}, "outputs": [], "source": [ - "if using_collab:\n", + "if using_colab:\n", " import torch\n", " import torchvision\n", " print(\"PyTorch version:\", torch.__version__)\n", @@ -105,7 +105,7 @@ " !{sys.executable} -m pip install 'git+https://github.com/facebookresearch/segment-anything.git'\n", " \n", " !mkdir images\n", - " !wget -P images https://github.com/facebookresearch/segment-anything/blob/main/notebooks/images/dog.jpg\n", + " !wget -P images https://raw.githubusercontent.com/facebookresearch/segment-anything/main/notebooks/images/dog.jpg\n", " \n", " !wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth" ] diff --git a/notebooks/onnx_model_example.ipynb b/notebooks/onnx_model_example.ipynb index 999ff64..155dd27 100644 --- a/notebooks/onnx_model_example.ipynb +++ b/notebooks/onnx_model_example.ipynb @@ -72,7 +72,7 @@ "id": "109a5cc2", "metadata": {}, "source": [ - "If running locally using jupyter, first install `segment_anything` in your environment using the [installation instructions](https://github.com/facebookresearch/segment-anything#installation) in the repository. The latest stable versions of PyTorch and ONNX are recommended for this notebook. If running from Google collab, set `using_collab=True` below and run the cell." + "If running locally using jupyter, first install `segment_anything` in your environment using the [installation instructions](https://github.com/facebookresearch/segment-anything#installation) in the repository. The latest stable versions of PyTorch and ONNX are recommended for this notebook. If running from Google Colab, set `using_collab=True` below and run the cell. In Colab, be sure to select 'GPU' under 'Edit'->'Notebook Settings'->'Hardware accelerator'." ] }, { @@ -82,7 +82,7 @@ "metadata": {}, "outputs": [], "source": [ - "using_collab = False" + "using_colab = False" ] }, { @@ -92,7 +92,7 @@ "metadata": {}, "outputs": [], "source": [ - "if using_collab:\n", + "if using_colab:\n", " import torch\n", " import torchvision\n", " print(\"PyTorch version:\", torch.__version__)\n", @@ -103,7 +103,7 @@ " !{sys.executable} -m pip install 'git+https://github.com/facebookresearch/segment-anything.git'\n", " \n", " !mkdir images\n", - " !wget -P images https://github.com/facebookresearch/segment-anything/blob/main/notebooks/images/truck.jpg\n", + " !wget -P images https://raw.githubusercontent.com/facebookresearch/segment-anything/main/notebooks/images/truck.jpg\n", " \n", " !wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth" ] diff --git a/notebooks/predictor_example.ipynb b/notebooks/predictor_example.ipynb index 8171bb6..8374c4d 100644 --- a/notebooks/predictor_example.ipynb +++ b/notebooks/predictor_example.ipynb @@ -74,17 +74,17 @@ "id": "07fabfee", "metadata": {}, "source": [ - "If running locally using jupyter, first install `segment_anything` in your environment using the [installation instructions](https://github.com/facebookresearch/segment-anything#installation) in the repository. If running from Google collab, set `using_collab=True` below and run the cell." + "If running locally using jupyter, first install `segment_anything` in your environment using the [installation instructions](https://github.com/facebookresearch/segment-anything#installation) in the repository. If running from Google Colab, set `using_collab=True` below and run the cell. In Colab, be sure to select 'GPU' under 'Edit'->'Notebook Settings'->'Hardware accelerator'." ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "id": "5ea65efc", "metadata": {}, "outputs": [], "source": [ - "using_collab = False" + "using_colab = False" ] }, { @@ -94,7 +94,7 @@ "metadata": {}, "outputs": [], "source": [ - "if using_collab:\n", + "if using_colab:\n", " import torch\n", " import torchvision\n", " print(\"PyTorch version:\", torch.__version__)\n", @@ -105,8 +105,8 @@ " !{sys.executable} -m pip install 'git+https://github.com/facebookresearch/segment-anything.git'\n", " \n", " !mkdir images\n", - " !wget -P images https://github.com/facebookresearch/segment-anything/blob/main/notebooks/images/truck.jpg\n", - " !wget -P images https://github.com/facebookresearch/segment-anything/blob/main/notebooks/images/groceries.jpg\n", + " !wget -P images https://raw.githubusercontent.com/facebookresearch/segment-anything/main/notebooks/images/truck.jpg\n", + " !wget -P images https://raw.githubusercontent.com/facebookresearch/segment-anything/main/notebooks/images/groceries.jpg\n", " \n", " !wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth" ]