<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sebastià Ramon on Medium]]></title>
        <description><![CDATA[Stories by Sebastià Ramon on Medium]]></description>
        <link>https://medium.com/@sebastiramon?source=rss-30dff64c53e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*dBuSnsMoEExaFQz0.</url>
            <title>Stories by Sebastià Ramon on Medium</title>
            <link>https://medium.com/@sebastiramon?source=rss-30dff64c53e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:26:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sebastiramon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Finding Bridges and Screen Wipers]]></title>
            <link>https://medium.com/@sebastiramon/finding-bridges-and-screen-wipers-48f36a05ab90?source=rss-30dff64c53e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f36a05ab90</guid>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Sebastià Ramon]]></dc:creator>
            <pubDate>Sat, 30 Sep 2017 23:45:30 GMT</pubDate>
            <atom:updated>2017-09-30T23:45:30.905Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Learning image processing and machine learning in two months can be totally worth it</em></p><p>Last summer I was proposed to attend a computer vision hackathon in Moscow. So, I joined a team of fantastic colleagues from Polytechnic University of Catalonia who made this experience unforgettable. All of us had almost no previous experience on computer vision problems. The fact that we achieved the best position for non-Russian universities in the competition is then superb.</p><p>The purpose of the challenge was to find five events in videos of 10 seconds of duration. All the videos were filmed from a car’s windshield and recorded scenes of everyday traffic. The events were the following: passing down a bridge, entering or exiting a city, crossing a road bump, finding if screen wipers were operating and passing a zebra crossing. However, in this post I will discuss the solution we adopted for the bridges and screen wipers, since it is the part I was in charge of.</p><p>Do not panic if you are not an expert in computer vision. This post can be perfectly understood, because the focus is on the ideas used to solved the problem and not in the little details of implementation.</p><p><strong>Bridge</strong></p><p>The first approach I took to discern videos with and without bridges was to ask myself what makes the bridge event so unique. And I thought that the changes in brightness were greatly characterising this event. Thus, I converted each frame of the video to grayscale colour space and plotted the arithmetic mean of the pixels’ value against the evolution of time. The result obtained was a plot like this one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*T1q9Ek-hRVMyb5rhbIdUqg.png" /></figure><p>As you can see, what differentiates the bridge is a shape that looks like a heartbeat in an electrocardiogram. This shape is a succession of steep gradients and screen wipers also tend to cause high slopes, so they can be confused with bridges. Since they act really fast, to remove them, the brightness data can be only recorded each 3 frames. Nevertheless, the results obtained with this approach were not even reaching the 40% of accuracy in the validation set.</p><p>The next iteration was to realise that not all the zones in the frame were important to study the crossing of a bridge. In fact, only the top portion of the image was of interest to discover bridges. So I cropped the frame, just to show the top part of the videos. In this case, the gradients obtained were much steeper than before, and now, events that also caused important gradients, like screen wipers, were even more attenuated. With this little modification, the accuracy jumped over 70%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*awd0_wMjwGoa9VSpDuQE7g.png" /></figure><p>With all the work done at that moment, it was the right point for me to take a break and I went to have some sleep. A funny incident happened when I was awakened by my roommate when he came to sleep. I do not know if I was dreaming something special, but I had just discovered how to solve the screen wipers event, and in less than an hour I had the solution for the problem. Our team provisionally ended first in the ranking table for the validation set. Awesome!</p><p><strong>Screen wipers</strong></p><p>The main idea for the screen wipers problem was to place a cropped window spanning the whole image vertically, but only being a little portion wide and centred in the image. Then, the solution of the problem was also to find high differences of gradients, but in this case, the most important part was to define that these differences should happen within 3 frames because of the high velocity of screen wipers. So, when I uploaded the solution in the validation platform we obtained an accuracy above 80% immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6z9dlRdUbaHr0WTtZb959A.png" /></figure><p><strong>Final modifications</strong></p><p>A colleague joined me to increment the accuracy of both events. However, we were only able to improve the bridge solution. The final touches came from discovering that the accuracy of 70% in the bridge problem, was because of a false positive. What happened in fact was that the classifier confused a bridge with a screen wiper. So, we discarded all the bridge events that happened with a screen wiper functioning. With this, we obtained an accuracy of 80% for the bridge and 85% for the screen wipers.</p><p>I spent the last part of the competition trying to solve the city enter and city exit. I made some progress, being able to find many signals for entering the city, but I was not able to distinguish the valid ones from background noise. I realised that this part needed convolutional neural networks to be solved efficiently, but we did not have the computing resources available at the moment, and we were not allowed to use external resources like cloud computing platforms. So we decided not to present this event in the final solution.</p><p><strong>Conclusion</strong></p><p>To sum up, I am really satisfied with VisionHack. Not because of the valuable result we obtained, but because of the fantastic people I met. I want to remark the labour of all the volunteers, who were really excellent and helped us in any trouble we suffered. Moreover, I want to stress the effort that my colleagues made in the competition. From my point of view, they solved two events that were more difficult to solve when coming from a non computer vision background and what they did is incredible. For instance, for the zebra crossing they obtained the 6th best solution in the competition. So I appreciate a lot the work they did. Finally, if you want to discover more about VisionHack, you can check its website on <a href="http://visionhack.misis.ru/">http://visionhack.misis.ru</a> and the final results on <a href="http://visiontest.misis.ru/results?tour=2&amp;phase=2">http://visiontest.misis.ru/results?tour=2&amp;phase=2</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f36a05ab90" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>