Article | February 20, 2020
The Python programming language has been topping virtually every tech trend list for the past two years, so it was no surprise to see it earn another "most popular" ranking in O'Reilly's annual analysis of the most-used topics and the top search terms from its online learning platform. But the reason for Python's latest blue ribbon is worth noting: according to O'Reilly, it was demand among data scientists and artificial intelligence (AI) and machine learning (ML) engineers.
Article | February 20, 2020
In the area of computer intelligence where we have robotics, machine learning, artificial intelligence, etc. There is a new game-changing concept that is so profound that industries are already finding a use for it and it is paying off. This new concept is called Intelligent Automation (IA).
Discussions with heads of global organizations as well as research, and experience of experts show that IA is establishing itself as a future key driver of competitive relevance and enterprise efficiency. This is why IA experts are convinced the concept can provide solutions to several urgent issues in the world right now such as improving our planet, education, and life-saving measures. The impact of IA is becoming more prevalent, and that saw the concept selected by Gartner as the number one tech trend in 2020.
What is IA?
The concept of Intelligent Automation otherwise known as Hyper automation leverages the new-gen software-based automation, which blends technologies and methodologies to implement business processes on automation for knowledge workers. This is achieved through IA imitating the skills used by knowledge workers to execute their work. All these are done to attain a business outcome via purposeful redesigning of automation carried out with little or no human oversight. The end game is cost reduction, which improves process speed, optimization of decision outcomes, improved process resilience, and improved quality and compliance. In the end, businesses and organizations will see an increase in revenues and enhanced employee and customer satisfaction.
Who are the knowledge workers?
Who are the knowledge workers that IA is purposefully designed for? For starters, knowledge workers' main currency is the knowledge they possess. We have examples like pharmacists, designers, programmers, architects, lawyers, physicians, engineers, public accountants, scientists. Any worker that has to “think for a living” is considered a knowledge worker. This type of worker is mainly domiciled in the service industries. A knowledge worker is information-based compared to manual labor that is material-based and mainly domiciled in the manufacturing industries.
Where does IA feature here? We already know the importance of industrial automation to the manufacturing process. We can consider IA the “white collar” version of industrial automation. IA can be used to supplement the job of a knowledge worker such as call center agents, financial controllers, etc.
Let us break down what IA does specifically for a knowledge worker. Imagine IA as a digital worker created to imitate the activities of a knowledge worker to deliver the same outcome as a human would. It mimics all the human business processes, which is a succession of tasks by reproducing the human capabilities of reading, speaking, learning, hearing, seeing, acting, and reacting to produce the same business processes as a knowledge worker.
The synergy between IA and humans
IA creates a synergy by merging the software-based workforce with the human workforce. On the task spectrum, IA shoulders a load of executing tedious, low value, and monotonous tasks like processing and digitizing paper invoices, reconciling data, etc. IA equips a worker with what we can call superhuman abilities like the ability to generate insights from millions of analysed data done in just a few minutes. That is on a human level is virtually impossible to do.
The uniqueness of IA
How is it that a concept so recent that its name was only created in 2017 by IEEE has witnessed a rapid expansion and is expected to have a lasting impact on us? We believe the answer lies in its unique features, which are listed below:
The IA pools together new technologies, most of which are recently developed in the last decade.
The application of several IA functionalities is universal. They are applicable across several business functions like finance, sales, etc., and industries such as retail, banking, among others.
IA programs are scalable. Once developed, scaling can be carried out immediately and infinitely at no added cost.
Its availability is unmatched; IA can deliver 24/7.
IA is economically viable and reliable. It gives the same results based on settings repeatedly at a reasonable cost. In less than a year, the program will normally generate payback on the initial investment.
AI and IA, two sides of the same coin?
Here comes the inevitable question. Is Intelligent Automation (IA) any different from Artificial Intelligence (AI)? Are they not just two sides of the same coin? Well, in the world of computer intelligence, laying down the differences between robotics, AI, IA, among others is a very complicated process.
The line between is so blurry that they can sometimes overlap due to the continuous evolution, emergence, and convergence of these concepts. However, that is not to say there are no areas where there are clear demarcations.
For the purpose of clarity, a few key anchor points are drawn using the analysis of the survey of the opinions of more than 200 IA experts as well as our experience in IA. These are the main anchor points:
AI and IA –Since IA has to do with the automation of knowledge work that is the area where AI and IA interrelate. That means IA comprises all use cases of AI in all industries excluding industries like fundamental research, arts, gaming, or any other that is not information-based.
For robotics –physical robotics utilized in the manufacturing industries are not classified as part of IA. It only covers software-based robots.
Lastly, under workflow, business process management, and cloud; only programs or platforms that exhibit a form of intelligence fall under the class of IA. Programs that have limited capabilities to process end-to-end tasks and offer little insight into business processes are not included.
The unfolding potential of IA
The adoption rate of this phenomenon is already significant to the extent that a recent survey of world business leaders shows that 86% of them believe they must implement IA in the next five years to stay competitive. According to a survey by Gartner, 42% of CEOs have embarked on the digital transformation process already with 56% reporting gains from the application.
Due to the uniqueness of IA, in the next five year, experts believe that it is very likely to reach a sophistication and adoption level that took more than 200 year for industrial automation to achieve. A Deloitte survey already indicated that the adoption rate for IA is more than 50% and the rate is predicted to jump to over 70% in two years. If it continues at this rate, we could see a near-global adoption level achieved in the next five years. Despite being a new concept, IA is progressing very rapidly in terms of capabilities.
Article | February 20, 2020
A few weeks ago, I created a Tensorflow model that would take an image of a street, break it down into regions, and - using a convolutional neural network - highlight areas of the image that contained vehicles, like cars and trucks.
I called it an image classification AI, but what I had really created was an object detection and location program, following a typical convolutional method that has been used for decades - as far back as the seventies.
By cutting up my input image into regions and passing each one into the network to get class predictions, I had created an algorithm that roughly locates classified objects. Other people have created programs that perform this operation frame by frame on real time video, allowing computer programs to draw boxes around recognised objects, understand what they are and track their motion through space.
In this article, I’ll give an interesting introduction to object detection in real-time video. I’ll explain why this kind of artificial intelligence is important, how it works, and how you can implement your own system with Yolo V3. From there, you can build a huge variety of real time object tracking programs, and I’ve included links to further material too.
Importance of real-time object detection
Object detection, location and classification has really become a massive field in machine learning in the past decade, with GPUs and faster computers appearing on the market, which has allowed more computationally expensive deep learning nets to run heavy operations. Real time object detection in video is one such AI, and it has been used for a wide variety of purposes over the past few years.
In surveillance, convolutional models have been trained on human facial data to recognise and identify faces. An AI can then analyse each frame of a video and locate recognised faces, classifying them with remarkable precision.
Real-time object detection has also been used to measure traffic levels on heavily frequented streets. AIs can identify cars and count the number of vehicles in a scene, and then track that number over time, providing crucial information about congested roads.
In wildlife, with enough training data a model can learn to spot and classify types of animals. For example, a great example was done with tracking racoons through a webcam, here. All you need is enough training images to build your own custom model, and such artificial intelligence programs are actively being used all around the world.
Background to Yolo V3
Until about ten years ago, the technology required to perform real-time object tracking was not available to the general public. Fortunately for us, in 2021 there are many machine learning libraries available and practically anyone can get started with these amazing programs.
Arguably the best object detection algorithms for amateurs - and often even professionals - is You Only Look Once, or YOLO. This collection of algorithms and datasets was created in the 2000s and became incredibly popular thanks to its impressive accuracy and speed, which lends it easily to live computer vision.
My method for object detection and recognition I mentioned at the start of this article happens to be a fairly established technique. Traditional object recognition would split up each frame of a video into “regions”, flatten them into strings of pixel values, and pass them through a deep learning neural network one by one. The algorithm would then output a 0 to 1 value indicating the chance that the specific region has a recognized object - or rather, a part of a recognized object - within its bounds.
Finally, the algorithm would output all the regions that were above a particular “certainty” threshold, and then it would compile adjacent regions into bounding boxes around recognized objects. Fairly straightforward, but when it comes down to the details, this algorithm isn’t exactly the best.
Yolo V3 uses a different method to identify objects in real time video, and it’s this algorithm that gives it its desirable balance between speed and accuracy - allowing it to fairly accurately detect objects and draw bounding boxes around them at about thirty frames per second.
Darknet-53 is Yolo’s latest Fully Convolutional Network, or FCN, and is packed with over a hundred convolutional layers. While traditional methods pass one region at a time through the algorithm, Darknet-53 takes the entire frame, flattening it before running the pixel values through 106 layers. They systematically split the image down into separate regions, predicting probability values for each one, before assembling connected regions to create “bounding boxes” around recognized objects.
Luckily for us there’s a really easy way we can implement YoloV3 in real time video simply with our webcams; effectively this program can be run on pretty much any computer with a webcam. You should note however that the library does prefer a fast computer to run at a good framerate. If you have a GPU it’s definitely worth using it!
The way we’ll use YoloV3 is through a library called ImageAI. This library provides a ton of machine learning resources for image and video recognition, including YoloV3, meaning all we have to do is download the pre-trained weights for the standard YoloV3 model and set it to work with ImageAI. You can download the YoloV3 model here. Place this in your working directory.
We’ll start with our imports as follows:
import numpy as np
from imageai import Detection
Of course, if you don’t have ImageAI, you can get it using “pip install imageai” on your command line or Python console, like normal. CV2 will be used to access your webcam and grab frames from it, so make sure any webcam settings on your device are set to default so access is allowed.
Next, we need to load the deep learning model. This is a pre-trained, pre-weighted Keras model that can classify objects into about a hundred different categories and draw accurate bounding boxes around them. As mentioned before, it uses the Darknet model. Let’s load it in:
modelpath = "path/yolo.h5"
yolo = Detection.ObjectDetection()
All we’re doing here is creating a model and loading in the Keras h5 file to get it started with the pre-built network - fairly self-explanatory.
Then, we’ll use CV2 to access the webcam as a camera object and define its parameters so we can get those frames that are needed for object detection:
cam = cv2.VideoCapture(0)
You’ll need to set the 0 in cv2.VideCapture(0) to 1 if you’re using a front webcam, or if your webcam isn’t showing up with 0 as the setting. Great, so we have imported everything, loaded in our model and set up a camera object with CV2. We now need to create a run loop:
ret, img = cam.read()
This will allow us to get the next immediate frame from the webcam as an image. Our program doesn’t run at a set framerate; it’ll go as fast as your processor/camera will allow.
Next, we need to get an output image with bounding boxes drawn around the detected and classified objects, and it’ll also be handy to get some print-out lines of what the model is seeing:
img, preds = yolo.detectCustomObjectsFromImage(input_image=img,
As you can see, we’re just using the model to predict the objects and output an annotated image. You can play around with the minimum_percentage_probability to see what margin of confidence you want the model to classify objects with, and if you want to see the confidence percentages on the screen, set display_percentage_probability to True.
To wrap the loop up, we’ll just show the annotated images, and close the program if the user wants to exit:
if (cv2.waitKey(1) & 0xFF == ord("q")) or (cv2.waitKey(1)==27):
Last thing we need to do outside the loop is to shut the camera object;
And that’s it! It’s really that simple to use real time object detection in video. If you run the program, you’ll see a window open that displays annotated frames from your webcam, with bounding boxes displayed around classified objects.
Obviously we’re using a pre-built model, but many applications make use of YoloV3’s standard classification network, and there are plenty of options with ImageAI to train the model on custom datasets so it can recognize objects outside of the standard categories. Thus, you’re not sacrificing much by using ImageAI.
Good luck with your projects if you choose to use this code!
Yolo V3 is a great algorithm for object detection that can detect a multitude of objects with impressive speed and accuracy, making it ideal for video feeds as we showed on the examples aboves.
Yolo v3 is important but it’s true power comes when combined with other algorithms that can help it process information faster, or even increasing the number of detected objects. Similar algorithms to these are used today in the industry and have been perfected over the years.
Today self-driving cars for example will use techniques similar to those described in this article, together with lane recognition algorithms and bird view to map the surroundings of a car and pass that information to the pilot system, which then will decide the best course of action.
Article | February 20, 2020
When preparing data, I often go through many different approaches to reach a level of quality of data that can provide accurate results. In this article, I describe how unsupervised ML can help in data preparation for machine learning projects and how it helps to get more accurate business insights.What’s Wrong with Traditional Data Preparation Approaches?For accurate predictions, the data must not only be properly labeled, de-deputed, broad, consistent, etc. The point is that the machine learning model should process the “right” data. It is not entirely clear what are the criteria of the “right” data.