File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
research/inception/inception/data Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,8 @@ wget "${BOUNDING_BOX_ANNOTATIONS}" -O "${BBOX_TAR_BALL}" || BASE_URL_CHANGE=1
59
59
if [ $BASE_URL_CHANGE ]; then
60
60
BASE_URL=" http://www.image-net.org/challenges/LSVRC/2012/nnoupb"
61
61
BOUNDING_BOX_ANNOTATIONS=" ${BASE_URL} /ILSVRC2012_bbox_train_v2.tar.gz"
62
- BBOX_TAR_BALL= " ${BBOX_DIR} /annotations.tar.gz "
62
+ wget " ${BOUNDING_BOX_ANNOTATIONS} " -O " ${BBOX_TAR_BALL} "
63
63
fi
64
- wget " ${BOUNDING_BOX_ANNOTATIONS} " -O " ${BBOX_TAR_BALL} "
65
64
echo " Uncompressing bounding box annotations ..."
66
65
tar xzf " ${BBOX_TAR_BALL} " -C " ${BBOX_DIR} "
67
66
Original file line number Diff line number Diff line change 49
49
from __future__ import print_function
50
50
51
51
import os
52
+ import errno
52
53
import os .path
53
54
import sys
54
55
69
70
# Make all sub-directories in the validation data dir.
70
71
for label in unique_labels :
71
72
labeled_data_dir = os .path .join (data_dir , label )
72
- os .makedirs (labeled_data_dir )
73
+ # Catch error if sub-directory exists
74
+ try :
75
+ os .makedirs (labeled_data_dir )
76
+ except OSError as e :
77
+ # Raise all errors but 'EEXIST'
78
+ if e .errno != errno .EEXIST :
79
+ raise
73
80
74
81
# Move all of the image to the appropriate sub-directory.
75
82
for i in range (len (labels )):
You can’t perform that action at this time.
0 commit comments