зеркало из https://github.com/microsoft/caffe.git
promote power_wrapper to 'detection' submodule
This commit is contained in:
Родитель
7b562d573d
Коммит
3ff61773f0
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
Classify a number of images at once, optionally using the selective
|
||||
search window proposal method.
|
||||
Do windowed detection by classifying a number of images/crops at once,
|
||||
optionally using the selective search window proposal method.
|
||||
|
||||
This implementation follows
|
||||
Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik.
|
||||
|
@ -300,7 +300,7 @@ if __name__ == "__main__":
|
|||
"images_dim", 256, "Canonical dimension of (square) images.")
|
||||
gflags.DEFINE_string(
|
||||
"images_mean_file",
|
||||
os.path.join(os.path.dirname(__file__), 'ilsvrc_2012_mean.npy'),
|
||||
os.path.join(os.path.dirname(__file__), '../imagenet/ilsvrc_2012_mean.npy'),
|
||||
"Data set image mean (numpy array).")
|
||||
FLAGS = gflags.FLAGS
|
||||
FLAGS(sys.argv)
|
|
@ -19,14 +19,14 @@
|
|||
"\n",
|
||||
" wget http://farm1.static.flickr.com/220/512450093_7717fb8ce8.jpg\n",
|
||||
" echo `pwd`/\"512450093_7717fb8ce8.jpg\" > image_cat.txt\n",
|
||||
" python power_wrapper.py --images_file=image_cat.txt --crop_mode=selective_search --model_def=<path to imagenet_deploy.prototxt> --pretrained_model=<path to alexnet_train_iter_470000> --output=selective_cat.h5\n",
|
||||
" python detector.py --images_file=image_cat.txt --crop_mode=selective_search --model_def=<path to imagenet_deploy.prototxt> --pretrained_model=<path to alexnet_train_iter_470000> --output=selective_cat.h5\n",
|
||||
" \n",
|
||||
" \n",
|
||||
"Running this outputs an HDF5 file with the filenames, selected windows, and their ImageNet scores.\n",
|
||||
"Of course, we only ran on one image, so the filenames will all be the same.\n",
|
||||
"\n",
|
||||
"In general, `power_wrapper` is most efficient when running on a lot of images: it first extracts window proposals for all of them, then batches the windows for efficient GPU processing, and then outputs the results.\n",
|
||||
"Simply list an image per line in the `images_file`, and `power_wrapper` will process all of them."
|
||||
"In general, `detector` is most efficient when running on a lot of images: it first extracts window proposals for all of them, then batches the windows for efficient GPU processing, and then outputs the results.\n",
|
||||
"Simply list an image per line in the `images_file`, and `detector` will process all of them."
|
||||
]
|
||||
},
|
||||
{
|
Загрузка…
Ссылка в новой задаче