summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2014-09-24 14:48:04 -0700
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2014-09-24 14:48:04 -0700
commit90bd50d4c09e3ba1beebfb30cb63556c28fa8c1b (patch)
tree2bdd39f981fad63519cff5e650a2b3e020c6f8ce /tools
parent2c8d946b67d5024ec56d6abc85ea53ed33df8fa4 (diff)
parent4bb198ae4431f3c24b6faf9ab3a63841a50b1ced (diff)
downloadcaffeonacl-90bd50d4c09e3ba1beebfb30cb63556c28fa8c1b.tar.gz
caffeonacl-90bd50d4c09e3ba1beebfb30cb63556c28fa8c1b.tar.bz2
caffeonacl-90bd50d4c09e3ba1beebfb30cb63556c28fa8c1b.zip
Back-merge
Fixed param order of cv::Size in cv::resize switch examples to lmdb (except for custom data loaders) fix cifar10 paths so they can be run from caffe root default backend to lmdb for image conversion and mean computation
Diffstat (limited to 'tools')
-rw-r--r--tools/compute_image_mean.cpp4
-rw-r--r--tools/convert_imageset.cpp15
2 files changed, 7 insertions, 12 deletions
diff --git a/tools/compute_image_mean.cpp b/tools/compute_image_mean.cpp
index fe3497fa..20f1ff81 100644
--- a/tools/compute_image_mean.cpp
+++ b/tools/compute_image_mean.cpp
@@ -17,12 +17,12 @@ using std::max;
int main(int argc, char** argv) {
::google::InitGoogleLogging(argv[0]);
if (argc < 3 || argc > 4) {
- LOG(ERROR) << "Usage: compute_image_mean input_leveldb output_file"
+ LOG(ERROR) << "Usage: compute_image_mean input_db output_file"
<< " db_backend[leveldb or lmdb]";
return 1;
}
- string db_backend = "leveldb";
+ string db_backend = "lmdb";
if (argc == 4) {
db_backend = string(argv[3]);
}
diff --git a/tools/convert_imageset.cpp b/tools/convert_imageset.cpp
index 1c58f3de..7e1e83d9 100644
--- a/tools/convert_imageset.cpp
+++ b/tools/convert_imageset.cpp
@@ -1,17 +1,12 @@
-// This program converts a set of images to a leveldb by storing them as Datum
-// proto buffers.
+// This program converts a set of images to a lmdb/leveldb by storing them
+// as Datum proto buffers.
// Usage:
-// convert_imageset [-g] ROOTFOLDER/ LISTFILE DB_NAME RANDOM_SHUFFLE[0 or 1]
-// [resize_height] [resize_width]
+// convert_imageset [FLAGS] ROOTFOLDER/ LISTFILE DB_NAME
+//
// where ROOTFOLDER is the root folder that holds all the images, and LISTFILE
// should be a list of files as well as their labels, in the format as
// subfolder1/file1.JPEG 7
// ....
-// if RANDOM_SHUFFLE is 1, a random shuffle will be carried out before we
-// process the file lines.
-// Optional flag -g indicates the images should be read as
-// single-channel grayscale. If omitted, grayscale images will be
-// converted to color.
#include <gflags/gflags.h>
#include <glog/logging.h>
@@ -38,7 +33,7 @@ DEFINE_bool(gray, false,
"When this option is on, treat images as grayscale ones");
DEFINE_bool(shuffle, false,
"Randomly shuffle the order of images and their labels");
-DEFINE_string(backend, "leveldb", "The backend for storing the result");
+DEFINE_string(backend, "lmdb", "The backend for storing the result");
DEFINE_int32(resize_width, 0, "Width images are resized to");
DEFINE_int32(resize_height, 0, "Height images are resized to");