You want to continuously detect an object but your object detection algorithm fails to do so in some frames. The easiest way to solve the issue is neither training the detector with more data nor using a fancier detection algorithm. Clone this code and read the post to see how adding a good tracker will […]
In the previous post, we learned how to load a pre-trained model in libtorch and classify images with them. But real-world applications often include objects which are not necessarily inside ImageNet dataset. We need a network to classify our custom targets. In this tutorial, we will use transfer learning to fine-tune Resnet18 for face mask […]
Deep learning has revolutionized computer vision. There are thousands of Python code snippets to start but few ones in C++. If you like C++ like me and want to deploy your models in edge, then this series of posts are for you. As a gentle introduction, I will explain how to use libtorch to do […]
Raspberry Pi boards are getting more and more widespread. But when it comes to real-time video streaming, you may find yourself lost in a bunch of long-reptile shell commands! In this post, I will give you some crystal clear instructions to receive a low-latency stream from a CSI or USB camera. They key to achieve […]
In the previous post, I explained the idea behind cascade classifiers. In this post, I will give you some clear instructions to easily train an accurate custom object detector using my C++ toolbox. We will see how easily we can accelerate this accurate detector by 20%. Stay tuned :)
Cascade classifier is an old algorithm which was originally proposed for real-time face detection on CPUs. In this post, I will cover it’s nice and powerful idea, and then in the next post give you some clear instructions to easily train an accurate custom object detector using my C++ toolbox.
Multicore processing was a paradigm shift in computer science. The move was such big that today its really hard to find single-core CPUs even on low power SBCs. Computer vision algorithms, from simple pixel manipulations to the more complex tasks like classification with deep neural networks, have the potential to run parallel on multi cores. […]
Single Instruction Multiple Data (SIMD), also known as vectorization, is a powerful technique for accelerating computer vision algorithms. In this post, I will explain the concept and then introduce an easy way to use it inside your codes. We will see how we can benefit from SIMD to further reduce the runtime of the Gaussian-blur […]
The future of computer vision and machine learning is toward edge devices. This is why C++ matters. Following my previous post on simple and general tips to optimize C++ codes, I decided to explain further tips that are specified for implementing computer vision algorithms.
The first time I heard its name was 3 years ago in a robotic course. It seemed to be a big complex stuff for me which I tried to escape as much as I could. Soon after building the first ROS application, my interest increased in such a way that I like to ROS-ify almost […]
QR codes can store different types of data. Recently, I was involved in a project that a robot had to detect and decode pre-installed QR codes to refine its position. This post explains how I got 10 FPS performance on a Raspberry Pi Zero.
My master thesis was to design and implement a camera-based system for localization of a six-wheeled robot. The computer was a Raspberry Pi 3 which took me a lot of effort to achieve a reasonable performance. This post explains how I got 8-10 FPS localization on KITTI dataset.
When I was coding in Matlab, there were some techniques to boost the execution time. Predefining the matrix size, using vectorization and importing C codes via Matlab Executable (.MEX) files were some of the well-known solutions. Similar solutions exist for Python codes. But the story is somewhat different with C++. This comes from the fact […]
Almost 30% of accidents are due to carelessness to forward vehicle. Over the recent years, manufacturers have tried to develop Advanced Driving Assistance Systems (ADAS) to reduce this rate. Such systems may work based on different sensors in which camera is one of the most desired one due to its low cost and size.
Early diagnosis of cervical cancer plays an important role in reducing cancer rate and related mortality. Pap smear screening test introduced by Dr. Georges Papanicolaou in 1940s is by far the most effective way of detecting this cancer. It tries to detect pre-cancerous changes in cervical cells based on color and shape properties of cell […]
When it comes to embedded computer vision, fractions of code acceleration are regarded as a huge success for programmers. Today, I’ll explain how to build a customized OpenCV for Raspberry Pi as one of the most famous single board computers. By following these simple tips, you’ll experience a 2-3x faster OpenCV on your board.
Raspberry Pis and Nvidia Jetson series are popular single-board computers for computer vision tasks. The standard way to use these boards is to attach USB mouse and keyboard with HDMI screen. But there are many cases where these devices are not available. This post explains how to use your laptop’s screen, mouse and keyboard to […]