3 ms·
Digits/MNIST is a very, very bad dataset for CV demos because it's too easy and like done here, you can do a logistic regression on raw pixel values and get suf
by minimaxir 3y ago
Digits/MNIST is a very, very bad dataset for CV demos because it's too easy and like done here, you can do a logistic regression on raw pixel values and get sufficiently good results. That's also the reason why Fashion MNIST was created, to give ML demos some difficulty: https://github.com/zalandoresearch/fashion-mnist https://github.com/zalandoresearch/fashion-mnist
For more typical image classification problems, you can get >90% of the way for image classification on any arbitrary image dataset and with much less code by using CLIPVision image embeddings as a model input to your classification algorithm of choice.
- melenaboija 3y agoI doubt this is meant to give an example for real applications but to give some foundations on machine learning and computer vision.
- minimaxir 3y agoThe title touts OpenCV, but OpenCV isn't doing much here other than unnecessarily complicating things (which is bad for newbies) and doesn't show off OpenCV's unique capabilities. In the final code sample, OpenCV is a) loading the image, which could be done with PIL and b) training the model, when the demo imports sklearn which has its own battle-tested logistic regression implementation. There's a lot of useful things that can be done with machine learning and computer vision, but this article is a bad demo of it that won't work on any other real-world dataset and is out-of-date with more modern CV approaches. Their previous article is a good explanation of the math behind logistic regression, though: https://machinelearningmastery.com/logistic-regression-in-opencv/ https://machinelearningmastery.com/logistic-regression-in-op...
- melenaboija 3y agoI am not judging the article what I am saying is that I doubt the audience is someone that needs to classify images with numbers.
- markisus 3y agoIn fact, a neural net is “just” a stack of logistic regressions if you only use sigmoid activations.
- aydyn 3y agoThere are lots of datasets where applying multiclass LR makes sense. Image classification isn't it.
- MOARDONGZPLZ 3y agoSeconded; I’ve used MNIST with more classic algos and it’s very easy to reach 99% without any modern techniques.