Question

I was learning about image recognition on the Orange Software and I saw that I can feed my image database into a CNN(they call image embedding) that has as output a feature map of the image and then I can feed that feature map into models like Logistic/Linear Regression. And that is my objective, compare those models, but I want to do it without Orange.

I am thinking about using VGG16 as my CNN and extract the feature map from it. After that I want to plug those Linear/Logistic Regression to predict my image. Does that work at all? Is it possible?

(Using python and a proper labeled image database. Also I don't want to use the CNN alone, I really would like to use those 'simpler' models consuming the feature map)

Was it helpful?

Solution

What you're explaining is basically almost every CNN model where you basically have a fully connected layer at the end of the convolutions and that is equivalent to having a linear/logistic regression at the end (given there's only one output)

The only difference between all of those is whether there's an activation function or not, and if you are trying to build a classifier then you would definitely want an activation function to map the output values to a probability value between 0 and 1.

Example:

enter image description here

That "Fully Connected" layer is just basically a Linear/Logistic regression (10 of them actually since we have 10 outputs in this example) and a softmax applied to the output values to scale them all between 0/1 and ensure the sum is exactly 1.

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top