2017-06-03

Trying that review thing

So being in university and therefore officially learning has some serious benefits. One has the possibility to do new things one never considered doing and would not even have considered doing. In this instance I'll look once again at the paper You Only Look Once: Unified, Real-Time Object Detection. This time I'll look a bit around it though. First I'll give my own impressions of the paper, then I'll look at it how it was received and what impact it had in the field. The latter I'll only brush lightly since I'm very new in the whole Machine Learning field and hence lack the experience to formulate a very solid review.

Off we go with my impression of it. I find the paper a rather complex read. Many pieces of information I had to puzzle together using the supplied figure descriptions and texts. This may well be my fault since I have not sufficient training in reading papers. A thing I should definitely be doing more often. I think the number of notes I had to add to the paper highlights the issues I had with this scavenger hunt. Having a tablet at my disposal to add notes and doodles directly onto the paper with color helped a lot.

YOLO architecture with 24 layers for a 7x7 grid with 2 bounding boxes per grid.
The information in this annotated image I found across 3 chapters.

The interesting question for this is: How would I improve on the current set. I guess I'd try to spend more time with the image alone, to add more clarity by assisting information to it. So at least you won't have just a 7x7x30 output without source (the formula for this is actually partially in a caption of another figure!)

Trying to evaluate the potential is hard when you did read this paper because you heard of some projects being done using it. I'll try nether the less. Yolo an important milestone, because it combines the whole pipeline of processes of R-CNN and its successors in one single CNN with the same functionality. Hence it can run a lot faster, albeit with more errors. Being able to run faster is an important feature of a piece of software when it is applied in a field where you have only limited resources. This is the case with embedded systems.

Yolo was used in quite a few projects. The one I think is the highlight is a Nvidia internal project called "Redtail". I managed to get my hands on some slides from a presentation held at the GPU Tech Conf 2017. In short: It's a drone capable of navigating forest paths, avoiding collisions with objects and sometimes finding such objects. For example a wounded hiker or so. Here is where Yolo comes in.

Yolo was not only base for some cool projects, but also for more research. As of today 2017-06-02 Yolo was cited by 218 papers since it's publication a bit more than a year ago.

2017-05-06

YOLO & R-CNN

In this post I'll slip a bit more in the technical details which did lead to creations such as YOLO (YOLO 9000 by now) and Faster R-CNN.

The first problem for a system taking an arbitrary input image and identify objects in it is to find regions which can have objects in them. The next step is to classify it with a convolutional neural network.

To have a less complex system than two of the current cutting edge competitors let's dive in the ancestry of these. The obvious choice is to cut off the claims of increased speed and look at R-CNN. It was presented in the Paper Rich feature hierarchies for accurate object detection and semantic segmentation. They use Selective Search for Object Recognition to suggest regions which are fed into the CNN.

First for the Selective Search. It combines the best of segmentation via bottom-up grouping and exhaustive search techniques. It accounts for all scales since objects can occur in all scales and uses multiple strategies to group the regions together as shown below. It does this whilst trying to not become a computational bottleneck.
Selective Search for Object Recognition - Fig. 2 Two examples of selective search showing the necessity of different scales. On the left we find many objects at different scales. On the right we necessarily find the objects at different scales as the girl is contained by the tv

There is a lot more to this, but this gives us a rough idea what happens.

R-CNN consists out of 2 parts. First the region proposal, then the feature extraction. Region proposal is Selective Search or an other algorithm which produces region proposals. Feature extraction starts with fitting the output of the region proposal in a 227x227 RGB image, the warping. The resulting image is then used as an input for the CNN. The CNN uses 5 convolutional layers and 2 fully connected layers and yields features. According to these features, a SVM classifies the whole region.
Rich feature hierarchies for accurate object detection and semantic segmentation - Figure 1:
R-CNN (1) takes an input image, (2) extracts around 2000 bottom-up region proposals, (3) computes features for each proposal using a large convolutional neural network (CNN), and then (4) classifies each region using class-specific linear SVMs  
As suggested above, R-CNN was improved on by Fast R-CNN which is 9x faster than R-CNN. Images are processed in roughly 0.3s. This improvement was achieved by including Spatial pyramid pooling networks (SPPnets)

To not dwindle too long on the legacy systems let's go to the edge of technology systems.
Faster R-CNN introduces the Region Proposal Network (RPN) for finding interesting regions which will then be processed.

YOLO, on the other hand, treats detection as a regression problem.
You Only Look Once: Unified, Real-Time Object Detection  Figure 2: YOLO models detection as a regression problem. It divides the image into an even grid and simultaneously predicts bounding boxes, confidence in those boxes, and class probabilities. These predictions are encoded as an S × S × (B ∗ 5 + C) tensor  
Compared to each other YOLO is faster, but has less accuracy than Faster R-CNN.

2017-04-07

Concerning knowledge sources

Being on my little quest to build some understanding of Convolutional Neural Networks I did spend some time consulting different sources. This post is not yet about the content of the papers. Rather of the structure and style of these.

First I delved into some Neural Networks since the same suggests it's relevant as well for Convolutional Neural Networks. Just to get an example what it does I found the TensorFlow playground a nice place to start. It's the combination of a bit of information provided by the text below and the opportunity to click around and see what happens.

To build up some basic understanding I looked at a few books. I really liked http://neuralnetworksanddeeplearning.com for the way it's built up. Unlike books such as Pattern Classification by R.O.Duda et al. it's at first more focused on the essentials required to understand the example made instead of some piece of knowledge illustrated by partial examples.

Being uneducated on the topic of didactics I call the two different types Example Driven and Knowledge Driven. http://neuralnetworksanddeeplearning.com is Example Driven. Put trivial: "We wanna do that, what do we need to achieve it?"
Whilst the more common approach is to go into details of that one topic you explain in the chapter and wash it down with a bunch of examples.

To make more sense of my rambling I put together a graph how I felt after reading one chapter of the respective books.


I think both approaches have their benefits. For me, the Example Driven feels more right to learn, but I feel it's fairly useless as a reference work.


I digress. Back on topic with Constitutional Neural Networks. There is a paper Kizhevsky, Alex, et al. "Imagenet classification with deep convolutional neural networks." (2012) and two blogposts from universities. One by Oliver Dürr (ZHAW) Deep learning for lazybones and one by Andray Karpathy (Stanford) cs231n Convolutional Networks.
The Paper by Alex Krizhevsky is well structured which helps a lot to find your bearings. I felt quite overwhelmed when looking at LeCun, Yann, et al. "Gradient-based learning applied to document recognition." (1998). I assume it's partially the layout. I do attribute though a stronger effect to the structuring using many subtitles in the ImageNet paper. It helps me to file the information in my mind. When focusing on the text the most noticeable difference is that LeCun addresses the reader indirectly whilst Kizhevsky's paper reads more like a friend explaining what he does whilst having a coffee together.

The two blog posts are vastly different. The one from ZHAW is application driven. It's pointed towards the reader and well boiled down to the essentials. It's a good read when you want to get something done. Like the http://neuralnetworksanddeeplearning.com book, it touches some topics and continues only with the important thing. The Stanford post is of a more educational structure. Concepts are brought up and expanded on with examples. The GIF images are especially nice and further the understanding of the topic. What strikes me as pleasant about both is the casual tone both blog posts are written in and include the reader by utilization of 'we'.


At first glance, YOLO[You Only Look Once] - Unified, Real-Time Object Detection and Fast R-CNN have the same style as Kizhevsky's paper. YOLO goes even so far to share the cut-off architecture image.

2017-03-19

Starting: A journey into Machine Learning - Convolutional Neural Networks

As of the year 2017 Machine Learning (ML) is continuing its increasing trend. Due to this I decided that it might be a good idea to have a look into what can actually be done with ML. Since ML is a fast expanding and vast topic I'll limit myself to only one aspect of ML. This aspect is Convlutional Neural Network (CNN).




CNN is, as pointed out, only a small part of ML. Like its umbrella term it is greatly growing in popularity.



I intend to start low and go from the very basic knowledge I have, mostly about image processing, to the knowledge of how to set up and run a CNN. My ultimate goal is to build up a sufficient understanding to determine in which situations and applications it's useful to use a CNN. I try to give a special focus to applications in the embedded and industrial environment.

The intention of these blog posts is to document my personal findings for myself and to maybe lighten the path of anyone following me in my footsteps.

Now the next big question is where to begin my quest. I will skip most of the history and try a different approach than what I've seen in most courses which I briefly scrolled through. I'll dive in the Wikipedia article about convolutional neural networks to get my bearings within the fast growing field of machine learning. Next step will be to set up some basic CNN using scikit-learn, just to get a bit of hands-on experience.
Helping to understand what I set up using a tutorial I'll be using a wealth of resources like the Free Online Book http://neuralnetworksanddeeplearning.com/ and the Stanford Coursenotes by Andrej Karpathy

Having done a bit of scouting ahead and been motivated by the promising things I've seen (Check out the video blow. That's some impressive stuff) to go further into the area of Region-based Convolutional Neural Networks. After this I hope to be able to understand the System YOLO - You Only Look Once, which is a real-time object detection system.