A Step by Step Guide of Receiver Operating Curve with Confusion Matrix

Image for post
Image for post
Photo by Myriam Jessier on Unsplash

In machine learning applications, classification algorithms are used to get a prediction on the data stream in order to label objects for further analysis. In such applications, not only the accuracy of classification algorithms is important but also the sensitivity or true positive rate (detection/recognition rate) of the algorithms. An example of a data imbalance in the training phase of a machine learning model can show the importance of both accuracy and detection rate. An arbitrary class ( e.g. car) with a large number of samples will give good accuracy because a classifier has seen many examples of this class during the training, however, the classifier will perform poorly on class (human) with a small number of samples. This means the overall recognition rate of the system will be lower. …


C++ multithreading with QT and event-based computer vision architecture

Image for post
Image for post
image source [author]

Developing OpenCV based vision applications with QT open up possibilities of different powerful features such as QT Signals & Slots [1] and Qthread [2].

In the given example [ link ], you will see

  • Qthread for worker class. The main steps are listed here
1-Create your QObjects,
2-connect your signals,
3-create your QThread,
4-move your QObjects to the QThread and
5-start the thread.
  • Signal & Slot for cv::Mat structure. The signal/slot mechanisms will ensure that thread boundary is crossed properly and safely. Important to note! Register the type cv::Mat via Q_DECLARE_METATYP at the beginning of the constructor. …


Step-by-Step Guide to include subdir and unit test for C++ projects

Image for post
Image for post
Photo by Imran Bangash on Unsplash

Often, there are requirements to get multiple data streams with GStreamer pipelines. If there are not handled properly, one could expect a blocking phenomenon as one stream is continuously streaming and not letting other pipelines to get the streams. One can handle them using thread but it could be overwhelming for some developers. In this tutorial, we are using simple QT concurrent thread to handle multiple streams in a non-blocking way. In addition to this, we will show a step-by-step procedure to build google test from source using CMake and include it in the QT project. …


From Edge AI and Cloud Computing’s Perspective

Image for post
Image for post
Photo by Photos Hobby on Unsplash

Edge AI together with Cloud computing is paving the way for the new digital era thanks to recent developments in hardware platforms, hardware accelerators, machine learning algorithms for edge devices; cloud computing for offline training, data storage and data management. Not only existing applications are foreseeing the benefits of utilizing the developments in this area but also new kinds of opportunities are emerging in different fields e.g customer insights, check brand affinity, monitor internet content, fraud detection, surveillance, autonomous driving, and predictive maintenance.

Traditional system-level architectures employ Edge and cloud computing as separate entities because of a number of challenges; limited resources on edge, reliability, latency, and security aspect associated with communication between edge and cloud computing. With respect to the system architecture, generally, two implementation strategies are employed for applications involving edge or cloud computing. We will explain it with an example application as shown in Figure-1. The application has two temperature sensors and an actuator/heat sink fan with a number of processes to handle the data. The data passes through a pipeline in order to make an intelligent decision to control the actuator. …


Coachable and Transformative Leadership Style sets Clear Goal and gives Constructive Feedback

Image for post
Image for post
Photo by Jehyun Sung on Unsplash

A good leader creates a conducive work environment, gives constructive feedback to colleagues, and leads with purpose. A good leader always remains positive and transmits positive energy. A good leader changes between different states of mind easily and releases negative energy before talking. First, we go through how a leader can create a conducive work environment by engaging his colleagues to give them the best employee experience in the organization.

Good Leader’s Things To Do

  • Say Hi, Hello to all
  • Coaches individuals for a bright future and make them skillful
  • Gives constructive feedback
  • Sometimes people could take it personal as people are connected to work so deeply, therefore one needs to motivate; feedback is not on the individual but it is related to the work. …


Edge AI Hardware Accelerators for Computer Vision and Machine Learning

Image for post
Image for post
Edge AI hardware: Google Coral, Intel Movidius NCS, Nvidia Jetson Nano, Raspberry Pi

Edge AI has gained momentum after some level of maturity of the AI training frameworks; Tensorflow, Pytorch, Caffe, Keras, OpenVINO, etc. However, a complete tool-chain, from data harvesting to model deployment and inference is still not clear as the work is still in the research phase and developments are very rapid. This, however, has not hampered the development of some exciting solutions in the area. Examples include object recognition from computer vision and speech recognition from a natural language processing perspective.

Traditional AI, Machine Learning Approach

Many of the existing AI solutions have a cloud computing or storage as an essential component of the architecture. This makes it hard for certain sectors to adopt the technology for practical use cases because of issues related to privacy, latency, reliability, and bandwidth. Edge computing while limited with resources can mitigate these issues to some extend. The argument is not mutual exclusiveness of edge and cloud computing, rather edge computing complement cloud computing. …


Good to know before moving to Sweden.

Image for post
Image for post
Höga Kusten. Image by the author

Sweden is located in northern Europe with a population of 10.23 million. It has beautiful landscape and inhabitants. The country is known for high tax rate, innovation, gender equality, digital economy. The country is also known to take a different approach to a global pandemic, COVID-19. Despite the high tax rate, society, in general, is happy because it gets back in return from the state. There could be lessons to learn from the Swedish model.

Humans always get inspiration from models, methods and frameworks that have successfully delivered results at any particular time. This while true for individual cases is also applicable to countries and organizations. While growing up in Pakistan, I often heard of 5 years-plans for economic development because it has delivered results in Malaysia and South-Korea. …


A Step by Step Guide and a Practical Example with GStreamer Pipeline using OpenCV

Image for post
Image for post
Image by the author: Colours reflect the beauty of components, OpenCV, GStreamer, Qt, CMake, Visual Studio

OpenCV is an open-source computer vision library aimed mainly at real-time systems. It is based on C++ and offers optimized code for vision processing across different platforms, Windows, Linux, FreeBSD, macOS, etc. Thanks to the active community of developers and researchers, the code is readily available for different steps of the imaging pipelines; starting from an image/video capturing, calibration, pre-processing, feature extraction, to classification. While written in C++, OpenCV has bindings for different languages such as python and Java.

GStreamer is a multimedia framework that supports different media handling components such as audio, video, recording and streaming, etc. It provides high modularity by offering a user to create different pipelines and seamlessly integrate different plugins.
While both libraries; OpenCV and GStreamer can be used standalone, however the combination of two offers greater flexibility for handling multimedia streams and data processing. …

About

Imran Bangash

Imran is a computer vision and AI enthusiast with a PhD in computer vision. Imran loves to share his experience with self-improvement, technology and travel.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store