Skip to content

Commit e231583

Browse files
jere357MeowZheng
andauthored
fixed a couple of issues that made the notebook not work in colab (open-mmlab#1460)
* fixed a couple of issues that made the notebook not work in colab i fixed a couple of issues that made the notebook not work in colab 1. it downloaded incompatible versions of pytorch and cuda + the conda command doesnt do anything in colab since there is no conda in colab idk w y wanna do about that - The commit of 2 days ago only changes the conda command version and not the pip command which is used while isntaling mcvv 2. /demo.png doesnt exist in colab so i added a wget to download some cityscapes photo from the internet and run inference on that photo 3. i think it would be optimal to have 2 notebooks. 1 for running locally when cloning your git branch and one to run in google colab. * Update demo/MMSegmentation_Tutorial.ipynb * Update demo/MMSegmentation_Tutorial.ipynb * Update demo/MMSegmentation_Tutorial.ipynb * Update demo/MMSegmentation_Tutorial.ipynb * Update demo/MMSegmentation_Tutorial.ipynb Co-authored-by: Miao Zheng <[email protected]>
1 parent 2aed0de commit e231583

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

demo/MMSegmentation_Tutorial.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"# Install PyTorch\n",
7070
"!conda install pytorch=1.10.0 torchvision cudatoolkit=11.1 -c pytorch\n",
7171
"# Install MMCV\n",
72-
"!pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6/index.html"
72+
"!pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.10/index.html"
7373
]
7474
},
7575
{
@@ -156,8 +156,8 @@
156156
},
157157
"outputs": [],
158158
"source": [
159-
"config_file = '../configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py'\n",
160-
"checkpoint_file = '../checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth'"
159+
"config_file = 'configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py'\n",
160+
"checkpoint_file = 'checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth'"
161161
]
162162
},
163163
{
@@ -185,7 +185,7 @@
185185
"outputs": [],
186186
"source": [
187187
"# test a single image\n",
188-
"img = './demo.png'\n",
188+
"img = 'demo/demo.png'\n",
189189
"result = inference_segmentor(model, img)"
190190
]
191191
},

0 commit comments

Comments
 (0)