Reputation: 3930
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?
Upvotes: 1
Views: 1702
Reputation: 370
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().
Upvotes: 0
Reputation: 742
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
Upvotes: 2