#Can logistic regression be used for image classification?

1 messages · Page 1 of 1 (latest)

modest cipher
#

can logistic regression be used for image classification?

dusty orchid
#

Logistic regression is basically just linear regression but with something like a threshold thingy at the end

#

What are you going to put inside? It definitely won't just be the pixels, because whether the 32nd pixel in the 10th row of your cat image is white makes very little difference to what kind of cat breed it is in isolation

#

I guess if you were able to compute the size of the eyes or nose or something from other models or computer vision stuff then that could make sense

#

CNNs lead image classification but they do a lot of work under the hood that you'd presumably have to do yourself with a thinner and more hand-made model (and you probably won't get as good results unless the problem is very specific because you can't do as much tedious work as state-of-the-art DNs)

#

If you could elaborate on what kind of images you're classifying and for what reason I could give a less generic response maybe

modest cipher
dusty orchid
#

I see. In that case you'll still have to hand-pick what each digit looks like and maybe produce a score for different features

#

I mean this is not the only way to do it

#

But if you don't have pattern recognition on the model's end, you'll have to decide yourself what the model is like (i.e. learn something else than the whole image class basically)

#

I'm p sure classical algorithms would have been built for this but just as an example if you're classifying 0s and 1s you could do edge detection and then pass the contour size through logistic regression

modest cipher
#

but how about the neighboring pixels in the image? I don't think logistic regression is able to hold that information

silk python
#

Can logistic regression be used for image classification?

dusty orchid
#

You won't pass the raw pixels of course as I mentioned

modest cipher
#

is the width and height only already enough?

dusty orchid
#

I mean it may not be, but this is just an example

modest cipher
#

oh

dusty orchid
#

Probably for 0s and 1s it'd be pretty accurate

#

But that's not an exceedingly hard problem

#

And even a simple CNN would outperform us easily

#

It's more about appropriateness than whether a technique 'can' be used basically

modest cipher
#

I see

dusty orchid
#

Yeah this question delved into some of the 'definition' of AI / ML / computer vision and stuff, so probably you'd like to read up on why and how ML algorithms work the way they do. It's in the introduction of most books

#

The theoretical bases of AI are very interesting and can provide insight into why things were built they way they were, which is necessary for the skill of hand-picking algorithms for new tasks

shell hornet
#

Is deep learning not just layered logistic regression with an activation function? Smaller vision models have logistic activation anyway...

dusty orchid
#

But yeah I think that's a better way to put it