Skip to content

Commit 5af4ca0

Browse files
committed
Download-only setup for colab.
1 parent be709fd commit 5af4ca0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

demo_test.sh

+5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ if [ ! -e $TEST_IMG ]; then
2323
wget -P $RESULT_PATH http://sceneparsing.csail.mit.edu/data/ADEChallengeData2016/images/validation/$TEST_IMG
2424
fi
2525

26+
if [ -z "$DOWNLOAD_ONLY" ]
27+
then
28+
2629
# Inference
2730
python3 -u test.py \
2831
--imgs $TEST_IMG \
2932
--cfg config/ade20k-resnet50dilated-ppm_deepsup.yaml \
3033
DIR $MODEL_PATH \
3134
TEST.result ./ \
3235
TEST.checkpoint epoch_20.pth
36+
37+
fi

notebooks/DemoSegmenter.ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"source": [
99
"%%bash\n",
1010
"!(stat -t /usr/local/lib/*/dist-packages/google/colab > /dev/null 2>&1) && exit \n",
11-
"git clone https://github.com/davidbau/semantic-segmentation-pytorch.git seg_code 2>> install.log\n",
12-
"/content/seg_code/demo_test.sh"
11+
"git clone -b tutorial https://github.com/davidbau/semantic-segmentation-pytorch.git seg_code 2>> install.log\n",
12+
"DOWNLOAD_ONLY=1 /content/seg_code/demo_test.sh"
1313
]
1414
},
1515
{
@@ -144,6 +144,7 @@
144144
}
145145
],
146146
"metadata": {
147+
"accelerator": "GPU",
147148
"kernelspec": {
148149
"display_name": "Python 3",
149150
"language": "python",

0 commit comments

Comments
 (0)