Skip to main content

Posts

Showing posts with the label keras

How to detect an object in real time using keras-yolo3?

Another post starts with you beautiful people! In the past few months I was working on a complex object detection and recognition problem. My client is from a leading winery industry and they had an existing system built on  vgg19   and  keras-retinanet . This system was built to help client in their sales forecasting. The problem with current system was it was inaccurate- it did not detect most of the wine bottles and brands, it did not give the result in real time. You can imagine how this bad model can affect the business! To solve the existing issues I tried a lot of things- changing hyperparameters, increasing the datasets, different  keras applications  but it was not giving me satisfactory result. May be I was not doing it right but I had put a lot of time and efforts with it. Then while doing R&D, I read  this fantastic blog  and I came to know about a state of the art and real time object detection system-  YOLO . You Only Look...

How to use Keras for Computer Vision- Part 3

Another post starts with you beautiful people! I hope you have enjoyed my  last post   about  image data augmentation  and now you are comfortable with increasing the size of your small training dataset. Today's post is going to be interesting because we are going to learn how to handle color images and examples of using convolution with keras. Let's starts our learning- In our first post of this series we have seen that typically an image can be stored in 3-dimensional format- one is for height, one is for width and one is for channels. Colored images have three channels- red,blue,green components. A deep learning network requires that image data should be provided as a 3-D arrays. There are 2 ways to represent the image data as a 3-D array. First way is known as ' channel last ' and second way is known as ' channel first '. In 'channel last', last channel represents the color channels while in 'channel first', first channel represents t...

How to use Keras for Computer Vision- Part 2

Another post starts with you beautiful people! I hope you have enjoyed my  last post   and now you have become familiar with image loading, manipulation and saving in deep learning. If you have not read my last post then I recommend you to read the  first part   of this series. In this second part of my post we will learn about one of the most important technique used for a small image training dataset- Image   Data Augmentation ! 1. What is Image Data Augmentation? Image Data Augmentation is a technique to expand the size of a training dataset. This technique can create modified versions of images which helps when we have a small dataset. Image shifting, flipping and zooming are some examples of this technique. Keras provides ImageDataGenerator class for this purpose. 2. How to use this technique? We will learn different uses of this technique one by one by applying on an image- A. How to shift an image? Shifting an image means we are moving all ...

How to use Keras for Computer Vision- Part 1

Another post starts with you beautiful people! Today we are going to enter into the Computer Vision (CV) field with this first post. With this and further coming posts, we will learn how to use Deep Learning for CV. We will cover following three key concepts with Python code in this post- 1. What is CV? 2. How to load and manipulate image using Keras? 3. How to scale your image using Keras? Let's starts our learning- 1. What is CV?  Computer Vision or CV is a sub-field of Machine Learning and Artificial Intelligence, focused on the problem of helping computers to see. The goal of CV is to understand the content of digital images. CV has a wide variety of tasks- Object Classification Object Identification Object Verification Object Detection Object Segmentation Object Recognition 2. How to load and manipulate image using Keras? A. Loading an image using Keras api is very easy. Keras provides load_img() function for loading an image. Before moving...

How to use Redis in Windows along with your keras Rest API?

Another post starts with you beautiful people! It was quite overwhelming to see almost 10,000 views on my last post where we learned to build a simple  Keras + Deep Learning Rest API . That post is quite important if you want to deploy your model as a Rest API in development environment so that you can easily demonstrate it to your tester team or business team. One drawback with this approach is that it was intended for single threaded use only with no concurrent requests but in production environment your model will be used by many users at the same time so it is important to efficiently batch process incoming inference requests. Many thanks to  Adrian   who has shared his knowledge to use  Redis   to solve this problem and make our simple keras Rest Api scalable. If you are macos/linux user then you can follow  Adrian's post   but if you are a Windows user like me then you must follow this post because officially Redis does not support Wind...