forked from apache/mxnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[image-classification] default use min_random_scale=1, add data/image…
…net1k-val.sh (apache#4295)
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# This file download the imagnet-1k validation dataset and convert it into a rec | ||
# file. One need to provide the URL for the ILSVRC2012_img_val.tar, which can be | ||
# find at http://www.image-net.org/download-images | ||
# | ||
# Example usage (replace the URL with the correct one): | ||
# ./imagenet1k-val.sh http://xxxxxx/challenges/LSVRC/2012/nnoupb/ILSVRC2012_img_val.tar | ||
|
||
if [ ! -e ILSVRC2012_img_val.tar ]; then | ||
wget $1 | ||
fi | ||
mkdir -p val | ||
tar -xf ILSVRC2012_img_val.tar -C val | ||
wget http://data.mxnet.io/models/imagenet/resnet/val.lst -O imagenet1k-val.lst | ||
|
||
CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
MX_DIR=${CUR_DIR}/../../../ | ||
|
||
python ${CUR_DIR}/../../../tools/im2rec.py --resize 256 --quality 90 --num-thread 16 imagenet1k-val val/ | ||
|
||
rm -rf val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters