Feature Extraction using pretrained CNN

6 visualizaciones (últimos 30 días)
Farhad Abedinzadeh
Farhad Abedinzadeh el 29 de Oct. de 2022
Editada: Jayanti el 27 de Ag. de 2024
Hi there.
With the help of a pre-trained CNN, can we extract a certain number of features from an image dataset?
For example by using SqueezeNet,extract only 100 features from image dataset.
My point is that while there is a layer with a defined number of units, how can we extract a desirable(100) number of features from that layer?
I know we can change the layer's detail easily, but the reassembling of the network may result in an error due to the empty weights of some layers.

Respuestas (1)

Jayanti
Jayanti el 27 de Ag. de 2024
Editada: Jayanti el 27 de Ag. de 2024
Yes, you can extract a specific number of features from an image dataset using a pre-trained CNN like SqueezeNet. But if you directly modify any layer to output a specific number of features (like 100) it can lead to issues.
Rather than changing the network architecture, you can use dimensionality reduction techniques like PCA and t-sne.
You can follow the below mentioned steps to extract the desirable features:
  1. Select any layer from CNN architecture, preferably select the last layer before MLP. Since the layer closer to the output typically captures high-level, abstract features. This layer is often considered to have learnt the "latent representation" of the input data.
  2. Now you can apply any dimensionality reduction technique to reduce the dimensions of selected layer output to your desirable output.
Hope it helps!

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by