3 ms·
I use OpenCV for blur detection and camera shake detection on mobile devices, to qualify the image before handing it along to an AI model to extract data. I can
by pbowyer 3y ago
I use OpenCV for blur detection and camera shake detection on mobile devices, to qualify the image before handing it along to an AI model to extract data. I can't think that 2 extra neural networks would be faster at this task than OpenCV is, even if they might be better given how subjective blur is.
- DonHopkins 3y agoAnd motion detection that runs on the camera itself, to decide whether or not to send the video stream to the expensive GPU servers in the cloud. https://www.axis.com/developer-community/open-source/acap https://www.axis.com/developer-community/open-source/acap ACAP Computer Vision SDK examples ACAP version 4 example applications that provide developers with the tools and knowledge to build their own solutions based on the ACAP Computer Vision SDK. The open source examples are focused on video analytics applications. Giving AI/ML developers the chance to experience the smooth and smart develop environment that ACAP provide, showing how the powerful capacity of Axis devices provides unlimited possibilities for developers to build new AI/ML applications. Being one of the most active repositories we have, you can find examples written in C++ and Python performing interesting features that varies from object detection, QR decoder, and image capture, using popular open source ML libraries such as OpenCV. https://github.com/AxisCommunications/acap-computer-vision-sdk-examples https://github.com/AxisCommunications/acap-computer-vision-s...
- albertzeyer 3y agoHow does it do the blur detection? I assume it's also just a convolutional kernel applied on the image in some way. So it would do just exactly the same as a tiny neural network with one convolutional layer. Thus, they would be exactly the same speed, if they would use the same underlying native kernels. However, the native kernels in TF/PyTorch/etc are more heavily optimized than OpenCV, thus I assume that OpenCV would actually be slower here. And also more complicated, as you need to mix two big frameworks.
- filterfiber 3y agoRealistically I think you'll often want both depending on what you're doing. Especially for things like blur detection, what's your acceptable specificity, acceptable/scale of performance, where you're running the algorithm (on device vs cloud). I'm not an expert at all but most image processing network I've seen generally involve at least a few plus a few other layers. I don't think you can get away with a single convolution, at least not that well. OpenCV you could use Laplacian variance which looks like it's just a single line of code. > cv2.Laplacian(image, cv2.CV_64F).var() Many of the NN implementations look like their finetuned off google's ViT checkpoints. I really can't imagine these are faster (at least not without spending extra on GPU/TPU's) than Laplacian variance but I could be wrong. And I assume you might be able to get better evaluation performance from a finetuned NN but depending on what you're doing, that's a ton of work compared to opencv. https://pyimagesearch.com/2015/09/07/blur-detection-with-opencv/ https://pyimagesearch.com/2015/09/07/blur-detection-with-ope... https://sh-tsang.medium.com/review-bdnet-blur-detection-convolutional-neural-network-blur-detection-9150bedd0546 https://sh-tsang.medium.com/review-bdnet-blur-detection-conv...