Commit d9c54f87 authored by Ross Girshick's avatar Ross Girshick

update scripts; create cache dir if needed

parent c5d213de
......@@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd $DIR
FILE=fast_rcnn_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/fast_rcnn_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/$FILE
CHECKSUM=5f7dde9f5376e18c8e065338cc5df3f7
if [ -f $FILE ]; then
......
......@@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd $DIR
FILE=imagenet_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/imagenet_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/$FILE
CHECKSUM=8b1d4b9da0593fc70ef403284f810adc
if [ -f $FILE ]; then
......
......@@ -4,8 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd $DIR
FILE=selective_search_data.tgz
URL=http://www.cs.berkeley.edu/~rbg/r-cnn-release1-selective-search.tgz
CHECKSUM=6cf6df219c1e514f64482f11d00bd0b4
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/$FILE
CHECKSUM=7078c1db87a7851b31966b96774cd9b9
if [ -f $FILE ]; then
echo "File already exists. Checking md5..."
......@@ -23,7 +23,7 @@ if [ -f $FILE ]; then
fi
fi
echo "Downloading precomputed selective search boxes (1.8G)..."
echo "Downloading precomputed selective search boxes (0.5G)..."
wget $URL -O $FILE
......
......@@ -6,6 +6,7 @@
# --------------------------------------------------------
import os
import os.path as osp
import PIL
from utils.cython_bbox import bbox_overlaps
import numpy as np
......@@ -64,7 +65,10 @@ class imdb(object):
@property
def cache_path(self):
return os.path.join(datasets.ROOT_DIR, 'data', 'cache')
cache_path = osp.abspath(osp.join(datasets.ROOT_DIR, 'data', 'cache'))
if not os.path.exists(cache_path):
os.makedirs(cache_path)
return cache_path
@property
def num_images(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment