Clear Filters
Clear Filters

How to speed up feature extraction task using GoogleNet?

18 views (last 30 days)
I have some queries related to the speed of pretrained networks used for feature extraction.
Query 1:
I am using pre-trained network Googlenet (installed from MATLAB Add-Ons) for feature extraction from images. Right now, I am able to extract features from 5 frames in one second. If I do not have option to enhance the computational power of my machine (on which I am performing feature extraction), how can I increase the speed of feature extraction using the same network (means how can I be able to extract features from, say 20 or 30 frames per second).
Query 2:
What are the different factors that determine the speed of pre-trained networks for feature extraction? Can anyone please elaborate this one?
If my queries are not clear, feel free to comment.

Accepted Answer

Sai Pavan
Sai Pavan on 27 May 2024 at 3:58
Hello Navneet,
I understand that you have some queries regarding the speed of pretrained neural networks used for feature extraction from images.
Query 1: To increase the speed of feature extraction from images using Googlenet without upgrading the machine's computational power, one can consider the following strategies:
  • Batch Processing: Instead of processing images one by one, group them into batches. Neural networks, including Googlenet, can process batches of images more efficiently than individual images due to better utilization of underlying hardware resources.
  • Optimize Image Size: Ensure the images are resized to the minimal dimensions required by Googlenet (224x224 pixels as input) before processing. Reducing the size of the images can significantly decrease the computation required for feature extraction.
  • Precision Reduction: Use lower precision arithmetic, such as 16-bit floating points (FP16) instead of 32-bit (FP32). This can reduce the computational load and memory usage, potentially speeding up the feature extraction without a significant loss in accuracy.
  • Parallel Processing: If your machine has multiple cores or a GPU, make sure MATLAB is configured to utilize these resources fully. MATLAB supports Parallel Computing and GPU acceleration for many operations, which can significantly speed up the processing of neural networks.
Query 2: There are several factors that influence the speed of feature extraction using pre-trained networks. These include:
  • Hardware Resources: The CPU/GPU capabilities, memory bandwidth, and disk I/O speed can significantly affect processing time.
  • Network Architecture: The complexity of the network, including the number of layers, parameters, and operations required to process an image, directly impacts the speed.
  • Image Size and Batch Size: Larger images require more computation for feature extraction. Similarly, the batch size can affect speed; larger batches can be more efficient on GPUs but require more memory.
  • Precision of Computation: Using lower precision (e.g., FP16 vs. FP32) can speed up computations at the cost of a slight decrease in accuracy.
  • Parallelization and Optimization: The extent to which the computation is parallelized (across CPU cores or GPU threads) and optimized for the specific hardware architecture can greatly influence speed.
Hope it helps!

More Answers (0)


Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!