Skip to content

Commit

Permalink
Download-only setup for colab.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbau committed Jul 3, 2020
1 parent be709fd commit 5af4ca0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions demo_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ if [ ! -e $TEST_IMG ]; then
wget -P $RESULT_PATH http://sceneparsing.csail.mit.edu/data/ADEChallengeData2016/images/validation/$TEST_IMG
fi

if [ -z "$DOWNLOAD_ONLY" ]
then

# Inference
python3 -u test.py \
--imgs $TEST_IMG \
--cfg config/ade20k-resnet50dilated-ppm_deepsup.yaml \
DIR $MODEL_PATH \
TEST.result ./ \
TEST.checkpoint epoch_20.pth

fi
5 changes: 3 additions & 2 deletions notebooks/DemoSegmenter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"source": [
"%%bash\n",
"!(stat -t /usr/local/lib/*/dist-packages/google/colab > /dev/null 2>&1) && exit \n",
"git clone https://github.com/davidbau/semantic-segmentation-pytorch.git seg_code 2>> install.log\n",
"/content/seg_code/demo_test.sh"
"git clone -b tutorial https://github.com/davidbau/semantic-segmentation-pytorch.git seg_code 2>> install.log\n",
"DOWNLOAD_ONLY=1 /content/seg_code/demo_test.sh"
]
},
{
Expand Down Expand Up @@ -144,6 +144,7 @@
}
],
"metadata": {
"accelerator": "GPU",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
Expand Down

0 comments on commit 5af4ca0

Please sign in to comment.