5 ms·
Canny edge detection is optimal in some settings. Often, though, edge detection is in service of another goal, such as segmentation. Nowadays, computers are big
by idorosen 3y ago
Canny edge detection is optimal in some settings. Often, though, edge detection is in service of another goal, such as segmentation. Nowadays, computers are big/fast enough (GPUs) that building models that learn edge detection implicitly and do segmentation or the end task directly is feasible.
Still fun to learn about Hough transforms, canny edge detection, and all that 1990s computer vision though!
- litlogit 3y agoWhat if these filters are explicitly used as preprocessing steps when training a segmentation model? Would that at least save some epochs, if not increase accuracy?
- eurekin 3y agoI'm suspecting it could be similar to the learned vs. predefined positional embeddings in GPTs. That is, the learned version is a "warped and distorted" version of the exact predefined pattern, and yet somehow it performs a bit better, and no one knows exactly why.
- jocoda 3y agoWhat's the practical accuracy achievable using models?
- eurekin 3y agoJust a single anecdotal data point, how good the result can be: https://www.youtube.com/watch?v=Nnpm-rJfFjQ https://www.youtube.com/watch?v=Nnpm-rJfFjQ The accuracy is probably quite bad, when looked at individual manipulations, but the overall result is jaw dropping - even, if it's only a demonstration
- eurekin 3y agoTo be fair, I have no idea how I could use modern techniques instead of the Hough Transform. One use case is the speed and RPM car dials recognition. Using the Hough Transform, it's trivial to reliably detect the slope with a high degree of accuracy. Have vision models started offering better alternatives for such use cases? It's a genuine question; it's been a while since I last looked.
- chintler 3y agoYou can pretty much solve this using modern DL models. There are options depending on how accurate you want your model and how much compute you have. There is an entire spectrum of models, from something like Mask-RCNN, U-Net family upto something like Meta's SAM, which you can use without even training.
- eurekin 3y agoThanks! Would they also help with reading the exact rpm and speed values?
- sgu999 3y agoIn this kind of cases I'd probably use the Hough-based algo as ground truth to see if you can indeed fine-tune a DNN on that regression task. If it does with reasonable accuracy, then you have a baseline that could be improved in multiple ways to surpass the original. That said, there are not that many shapes of speedometer and wheels, and the view point is likely controlled, so your old school method is probably the better way ;)
- eurekin 3y agoFor the purpose of learning, would you recommend some tutorials, articles or videos that help achieve that? Accuracy aside, this would make a great learning experience! Is it better to look in the PyTorch community, or that's where some Tensorflow approaches shine? (CUDA is ok)
- sgu999 3y agoPyTorch is much nicer to play with in my opinion. Maybe start with their official tutorial, I've also heard good things about Karpathy's YouTube channel from beginners.
- TacticalCoder 3y ago> Nowadays, computers are big/fast enough (GPUs) that building models that learn edge detection implicitly and do segmentation or the end task directly is feasible. Wouldn't re-using Meta's SAM (Segment Anything Model) be sufficient here? (which is freely available and, I think, free to use?) Or do you think you need to build your own model specifically for detection bills/sheets of paper?
- idorosen 3y agoYeah, where licensing allows it, reusing existing model weights (possibly continuing to train on your specific task) is reasonable. I was just pointing out that these methods aren’t SOTA anymore.
- nomel 3y ago> Still fun to learn about Hough transforms, canny edge detection, and all that 1990s computer vision though! In my domain of metrology, this part isn't acceptable: > you will get a model that can predict the exact edges of every input image. Prediction is a nice way to limit the space I have to consider for a proper edge detection, but usually it's better to just go straight to something more deterministic.