From 5b7ce48c155c61696a60e09b435e25fc0a9a3a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=81=E6=B2=BB=E5=B9=B3?= Date: Mon, 24 Apr 2017 21:46:04 +0800 Subject: [PATCH 1/3] Fix path error of download.sh --- download.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.sh b/download.sh index b03e59b..84afadf 100755 --- a/download.sh +++ b/download.sh @@ -3,8 +3,8 @@ wget http://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat -P dat wget http://msvocds.blob.core.windows.net/coco2014/train2014.zip -P image/ wget http://msvocds.blob.core.windows.net/coco2014/val2014.zip -P image/ -unzip captions_train-val2014.zip -d data/ +unzip data/captions_train-val2014.zip -d data/ unzip image/train2014.zip -d image/ rm image/train2014.zip unzip image/val2014.zip -d image/ -rm image/val2014.zip \ No newline at end of file +rm image/val2014.zip From 9c9acae3bfd1c4227360bc9d7aee3132c9bbd57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=81=E6=B2=BB=E5=B9=B3?= Date: Mon, 24 Apr 2017 21:47:59 +0800 Subject: [PATCH 2/3] Fix AttributeError for resize.py --- resize.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resize.py b/resize.py index fcd3f62..a8e68a3 100644 --- a/resize.py +++ b/resize.py @@ -30,12 +30,12 @@ def main(): num_images = len(image_files) for i, image_file in enumerate(image_files): with open(os.path.join(folder, image_file), 'r+b') as f: - with Image.open(f) as image: - image = resize_image(image) - image.save(os.path.join(resized_folder, image_file), image.format) + image = Image.open(f) + image = resize_image(image) + image.save(os.path.join(resized_folder, image_file), image.format) if i % 100 == 0: print 'Resized images: %d/%d' %(i, num_images) if __name__ == '__main__': - main() \ No newline at end of file + main() From d579d6abac21bb3ac5bb4976c3583803e01927fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=81=E6=B2=BB=E5=B9=B3?= Date: Mon, 24 Apr 2017 22:45:14 +0800 Subject: [PATCH 3/3] Add required dependency for prepro.py --- requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 61d0ecd..449e252 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,4 @@ scipy scikit-image hickle Pillow - - +pandas