Extracting Features from VGG

放肆的年华 提交于 2019-12-13 01:15:09

问题


I want to extract features from images in MS COCO dataset using a fine-tuned VGG-19 network.

However, it takes about 6~7 seconds per image, roughly 2 hours per 1k images. (even longer for other fine-tuned models)

There are 120k images in MS COCO dataset, so it'll take at least 10 days.

Is there any way that I can speed up the feature extraction process?


回答1:


Well, this is not just a command. First you must check whether your GPU is powerful enough to wrestle with deep CNNs. Knowing your GPU model can answer this question.

Second, you have to compile and build Caffe framework with CUDA and GPU-enabled (CPU_Only disabled) in the Makefile.config (or CMakeLists.txt).

Passing all required steps (installing Nvidia Driver, installing CUDA and etc.) you can build caffe for GPU-use. Then by passing the GPU_Device_ID in your command-line you can benefit from speed provided by them.

Follow this link for building Caffe using GPU.

Hope it helps




回答2:


This ipython notebook example explains the steps to extract features out of any caffe model really well: https://github.com/BVLC/caffe/blob/master/examples/00-classification.ipynb

In pycaffe, you can set gpu mode simply by using caffe.set_mode_gpu().



来源:https://stackoverflow.com/questions/33208282/extracting-features-from-vgg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!