<?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 AIHunters on Medium]]></title>
        <description><![CDATA[Stories by AIHunters on Medium]]></description>
        <link>https://medium.com/@aihunters?source=rss-d44c41abd33c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hZPML8YgZiKGcyW9N0ex6w.png</url>
            <title>Stories by AIHunters on Medium</title>
            <link>https://medium.com/@aihunters?source=rss-d44c41abd33c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:04:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aihunters/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[How we track identical objects with the probabilistic data association approach]]></title>
            <link>https://medium.com/@aihunters/how-we-track-identical-objects-with-the-probabilistic-data-association-approach-e2b57737f51a?source=rss-d44c41abd33c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2b57737f51a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[surveillance]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[tracking]]></category>
            <dc:creator><![CDATA[AIHunters]]></dc:creator>
            <pubDate>Wed, 23 Sep 2020 15:15:42 GMT</pubDate>
            <atom:updated>2020-09-23T15:15:42.649Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro</h3><p>Since neural networks obtained their popularity, virtually any engineer rushed to Deep Learning techniques to solve the tasks set in front of public safety software. However, we see it this way: neural networks can be incomparable in terms of detection and identification, but they can’t be as effective in the analysis. It is way too hard to create dependencies inside the ‘black boxes’ of neural networks. Thus, to our mind, in tracking it’s more effective to use measurable and predictable approaches (such as probabilistic data techniques) to analyze the sequence of frames and the objects on them with their corresponding speed and position.</p><p>In this article, we do not claim to invent anything new. We gather some already existent scientific approaches and insights and create a practical realization of those approaches.</p><p>You can find the full project on <a href="https://github.com/AIHunters/AcurusTrack">GitHub</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*xpBerwWdu-xUIHm9ZS50Vg.png" /></figure><h3>About the task of tracking</h3><p>Tracking is one of the most common and important challenges in the public surveillance area. This is determined by the need to know where the objects are in each moment of the video we’re analyzing. The classical detection algorithms aren’t solving this issue.</p><p>When we apply the object detection algorithm to the first frame of the analyzed video segment, the object’s presence and position on the frame are determined, or the area of interest is just highlighted. The task of tracking, in turn, is to find the position of the selected object in subsequent frames.</p><p>The main difficulties that tracking algorithms may face are occlusions (the tracker can easily switch to another object during occlusion, or lose the object that needs to be tracked), zooming, object rotation, changing lighting, motion blur, etc. And even though the classical algorithms are aimed at solving this problem, quite often they fail to do so. This happens due to the difficulties in adaptation and configuration or those algorithms. Neural networks-based algorithms, in their turn, cope with the task of tracking better but are really hard to be interpreted and controlled.</p><p>That is why we are offering an option of the highly-interpretable tracker based on the movements’ physical realism analysis.</p><h3>Classic approaches</h3><p>Most of the available tracking algorithms consider the problem of tracking a single object in a video captured by a static camera. In the case of object tracking in a video shot on a moving camera, additional difficulties arise.</p><p>There are many tracking algorithms such as:</p><ul><li><a href="https://arxiv.org/pdf/1404.7584.pdf">trackers</a> based on correlation filters;</li><li>detection-based <a href="https://feichtenhofer.github.io/pubs/DT_iccv17.pdf">trackers</a> (used in popular dlib library);</li><li>graph-based methods (<a href="https://cs.stanford.edu/~amirz/index_files/GMCP-Tracker_ECCV12.pdf">one</a>, <a href="https://cse.sc.edu/~songwang/document/wacv13b.pdf">two</a>);</li><li>neural network-based <a href="https://openaccess.thecvf.com/content_ICCV_2017/papers/Chu_Online_Multi-Object_Tracking_ICCV_2017_paper.pdf">trackers</a> - <a href="https://arxiv.org/abs/1705.06368">one of the best</a> we’ve tried for moving cameras, occlusions, fast movement so far.</li></ul><p>For a more detailed comparison of correlation approaches and trackers based on recurrent neural networks, you can see <a href="https://www.oxagile.com/article/tracking-live-video-objects-with-a-moving-camera/">this article</a>.</p><p>Nevertheless, all the trackers mentioned above (except for neural networks-based ones) have virtually no way of coping with scaling, occlusions, objects rotation. And even if they do, they do not always show satisfactory results. Neural networks-based algorithms mostly solve the task of single object tracking, leaving objects interactions, and possible options aside.</p><h3>Problem statement</h3><p>Let’s consider the issue of tracking <em>N </em>objects in a video captured by a moving camera. Let’s name the sequence of the frames that we consider <em>F_1, …, F_N</em>. Each of these frames has the detections <em>D_1, …, D_k, k&lt;=N</em>. The task is to assign the index<em> i=1,…,N</em>, to each detection — namely, a certain <em>id</em>.</p><p>Firstly, we move from individual detections to short tracklets, preprocessing the existing metadata on the basis of some similarity metric (for example, when working with faces, it can be <em>iou — intersection over union</em> — detections on <em>k</em> and <em>k-1</em> frames, in the case of working with the body) it can be the sum of the differences in the coordinates of the corresponding parts of the body.</p><h3>Auxiliary visualization</h3><p>Before describing the algorithm that we use, let’s consider the introduced visualization, which is designed to facilitate the algorithm’s testing, debugging, and performance analysis. We want to inject time dependency into consideration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*Xm0ftIWEP0Vl4g5yrdRfXg.png" /></figure><p>To do this, we draw the coordinates of detections as follows — on the OY axis we put off the <em>y</em> coordinates of objects, and on the OX axis — the <em>x</em> coordinates, but taking into account the number of the frame that we are considering. Thus, the object with coordinates <em>(x, y)</em>, viewed on the <em>i-th</em> frame, will be displayed in the figure in the point <em>(i * img_w + x, y)</em>, where <em>img_w</em> is the image width.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-mys3-zYaJOyEe0sYdCzPg.png" /><figcaption>Examples of visualizations obtained on arbitrary videos (frame numbers are indicated on the OX axis)</figcaption></figure><p>To improve the quality of any tracking algorithms on a video shot by a moving camera, we recommend using our component for the transition to a fixed coordinate system — <a href="https://github.com/AIHunters/EvenVizion">EvenVizion</a>.</p><p>After transitioning to fixed coordinates, we are faced with the classical multitracking task. We consider the direction of <a href="http://ais.informatik.uni-freiburg.de/teaching/ws09/robotics2/pdfs/rob2-11-dataassociation.pdf">data association-based methods</a> to be especially attractive for us.</p><p>Thus, we get preliminary initialization, a view with which we will continue to work.</p><p>We got inspired by the article describing the Markov chain Monte Carlo data association. For fairly simple cases we release a slightly shorter version. But if you are interested in a full version, feel free to contact us at <a href="/service/mailto:oss@aihunters.com">oss@aihunters.com</a> for more information.</p><p><strong>The main advantages of this approach:</strong></p><ul><li>we embed knowledge about the quality of auxiliary DL components through configurable parameters;</li><li>We work with objects of arbitrary nature. We do not use identification, therefore we are not tied to persons, for example. We can work with objects that are very similar in appearance (with the presence of occlusions, classical tracking algorithms work poorly);</li><li>we use a likelihood analysis based on the physical interpretation of movement (with Kalman filter, described <a href="https://www.intechopen.com/books/introduction-and-implementations-of-the-kalman-filter/introduction-to-kalman-filter-and-its-applications">here</a> and <a href="https://towardsdatascience.com/computer-vision-for-tracking-8220759eee85">here</a>);</li><li>the ability to parallelize video processing;</li><li>the ability to use CPU after receiving metadata.</li></ul><p><strong>Thus, to summarize the sequence of steps described above:</strong></p><ul><li>Firstly, we get the detections on existing video;</li><li>Secondly, we transfer coordinates to a fixed coordinate system using the EvenVizion component;</li><li>Then we perform the preprocessing to extract objects’ metadata;</li><li>Finally, we launch the algorithm.</li></ul><h3>Use cases</h3><ul><li>Complicated multi-occlusion movement</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*o-dhYKro1c5RFb3G-E2rKQ.gif" /></figure><ul><li>Medical face masks</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*qIoZVIs6YDo2gy9UMjF4RA.gif" /></figure><ul><li>Identically-dressed people with faces fully covered</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*xgc0DrF7JEyj2kRmLelXVw.gif" /></figure><ul><li>People in identical military uniform</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*ICGXkeFOYLzW8xKSpE5fLQ.gif" /></figure><ul><li>Visitor analytics for physical locations</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*76r76eI3lBdPuBm6HsEiZw.gif" /></figure><ul><li>Feel free to suggest yours.</li></ul><h3>Possible improvements</h3><p>We reckon that these improvements may be introduced in the upcoming versions of this software:</p><ol><li>Processing of the cases of long disappearance from the frame. This project does not take into account the long-term link. Here, identification is needed, but pointwise only.</li><li>Complex types of movements processing with the Kalman filter replacement.</li></ol><h3>Outro</h3><p>We can see how the demand for computer vision-based public safety solutions is experiencing an upsurge. The main tasks for such software are detection and tracking, while tracking appears to be harder to maintain due to difficult filming conditions.</p><p>The AcurusTrack component is intended to beat this challenge and make objects multi-tracking as accurate as possible without relying solely on neural networks.</p><p>We achieve it by using our custom data association model, probabilistic AI, and a physical model of realistic object movements (inherent to an object in the real world). Furthermore, our component is open-source, and you can easily find it on <a href="https://github.com/AIHunters/AcurusTrack">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2b57737f51a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to stabilize a moving camera by fixing coordinates]]></title>
            <link>https://medium.com/@aihunters/how-to-stabilize-a-moving-camera-by-fixing-coordinates-9aaa20549b7?source=rss-d44c41abd33c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9aaa20549b7</guid>
            <dc:creator><![CDATA[AIHunters]]></dc:creator>
            <pubDate>Wed, 12 Aug 2020 15:37:44 GMT</pubDate>
            <atom:updated>2020-08-12T15:37:44.948Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi fellow Computer Vision researchers (a gentle nod to all of you). Let me introduce ourselves: An R&amp;D department at Oxagile. Young, creative, daring, immersed in computer vision-based video analysis. And this post is dedicated to our first open-source component published on GitHub.</p><p><strong>A little disclaimer</strong> (as in 2020 it can get really controversial): we use people tracking only because such business case came to our hands. Tracking can be applied to virtually any object (animals, fish, cars etc.). So please try not to shame us fro using the videos that we use just as an example. Thank you! And have a good read.</p><h3>A challenge</h3><p>The power of the Computer Vision (CV) technology is redefining the whole landscape of the Public Safety solutions market nowadays. While the traditional video monitoring systems are a common thing bordering with a necessity, the usage of artificial intelligence in this particular area is still experiencing an upsurge.</p><p>Yet there’s still much more to be said in terms of technological development.</p><p>It is a relatively common scenario in Public Safety when the video that needs to be analyzed is shot on a moving camera. For instance, body-worn cameras used by the police are constantly moving while an officer performs his/her duties. Naturally, it causes several problems with determining the relative position of objects.</p><p>Firstly, it’s not exactly clear what made an object shift — the movement of an object itself or just the camera movement. Secondly, when a scene changes due to camera rotation, different objects can obtain same coordinates even if there were static (as seen on the picture below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zM8JSqK3gVVSyqbAJy3BJw.png" /></figure><p>Here we’re not talking about the usual case where an object is constantly in the frame and changing its position gradually (because such cases are covered by classic trackers). We’re also not considering the case where the filming conditions are normal or where a camera is stationary.</p><p>If the filming conditions are bad or/and the movements are sharp, even the best trackers can fail the task. We detect an object and then lose it (e.g. people turn backs and face couldn’t be detected) — which is the exact moment when the camera shifts. It leads to assuming the person we detected before as a new person. Tracker won’t be of use here because it has lost its track while the person wasn’t in the frame.</p><p>Identification also doesn’t work as the filming conditions are bad.</p><p>We resolve these extreme cases with the EvenVizion component.</p><h3>Some Background. Homography</h3><p>To determine the position of an object, we set the main task — to create a fixed coordinate system. To solve this, it is necessary to find a transformation that will translate all coordinates of the α plane into coordinates relative to the β plane.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*6hWqlzcXgFxwwV-h9EULAQ.png" /><figcaption>Comparison of two planes</figcaption></figure><p>To describe the change in the position of an object in the α plane as compared to the β plane it is possible to use a projective transformation (homography).</p><p>Let’s consider the parameters by which this transformation is characterized and how to obtain new coordinates with its help. The projective transformation is characterized by matrix H:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*QUIfF-BKI8zAHVfRXB4hHA.png" /></figure><p>a, e — scaling in x and y respectively</p><p>b, d — shift along the axes (affect the rotation together with a and e)</p><p>c, f — offset along the axes</p><p>g, h — change of the perspective</p><p>Using this matrix, you can describe the change in the coordinates of one object between two frames, if this change is caused by camera movement. Then it is possible to get new coordinates.</p><h3>Pipeline</h3><p>So how do we get to a fixed coordinate system? To resolve this, we identified the following steps:</p><p>1. Compare two consecutive frames;</p><p>2. Find a transformation that will translate the coordinates of the object on the current frame into the coordinates relative to the point (0,0), while being projective:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*fVDY5TaP-ZsBKCoAuQ3z8g.png" /><figcaption>Projective transformation</figcaption></figure><p>Now we consider that there is a set of common points for two frames and their original coordinates, which are relative to the frame.</p><p>Here is an example of a camera movement in which objects are scaled. When searching for a transformation between two frames, you need to consider all the transformations that have occurred since the first frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJK5kBLCBwD5sbPbS2KidA.png" /><figcaption>An example of camera movement that caused objects scaling</figcaption></figure><p>We can describe the movement of the camera between all the previous pairs of consecutive frames using the homography matrices. As a result, we will receive a transformation that will translate the coordinates of the object on the current frame into the coordinates relative to the origin (0,0).</p><h3>How we match special points</h3><p>The main idea of the whole pipeline is to calculate the homography matrix using some matching points. The approaches to finding such points can be different.</p><p>By <em>special point </em>here we understand the point of an object, which will be found on another image of the same object with a high degree of probability. The correspondence between singular points is established using their descriptors.</p><p>We used <a href="https://medium.com/data-breach/introduction-to-sift-scale-invariant-feature-transform-65d7f3a72d40">SIFT </a>(Scale-invariant feature transform), <a href="https://medium.com/data-breach/introduction-to-surf-speeded-up-robust-features-c7396d6e7c4e">SURF </a>(Speeded Up Robust Features)and <a href="https://medium.com/data-breach/introduction-to-orb-oriented-fast-and-rotated-brief-4220e8ec40cf">ORB </a>(Oriented FAST and Rotated BRIEF) to find special points and their descriptors. Three types of points were used to ensure that the points cover the maximum possible area of the frame.</p><p>The result is the following matching points highlighting scheme:</p><p><strong>1.</strong> Special points and their descriptors are highlighted on the images.</p><p><strong>2.</strong> By the coincidence of descriptors, special points corresponding to each other (mentioned above matching points) are allocated.</p><p>For each descriptor we look for the two best matches using the k-nearest neighbor algorithm. Then we use Lowe’s ratio test to remove the false positives. Thus, for each point of the <strong>k-1st</strong> frame, we obtain the corresponding to it on the <strong>k-th</strong>. Using the obtained matching points, we connect two frames.</p><p>When using these algorithms to find matching points, the problem arises: some points can cling to an object. The movement of such points depends not only on the movement of the camera (static object), but also on the movement of the object itself — a person, a car etc. (moving object). Therefore, it is necessary to filter these points out.</p><p>For that, we developed the following <strong>filtering option</strong>:</p><p>· we get “dirty” matching points with coordinates, which include points on moving objects</p><p>· then we find the homography matrix which will translate the coordinates of the k-th frame into the plane of the k-1 frame.</p><p>· we apply it to the found points and obtain their new coordinates</p><p>· finally, we apply filtration of the points.</p><p>The only points left are those on stationary objects. We use them particularly when calculating the homography matrix.</p><h3>About the EvenVizion component</h3><p>We created the component which allows defining the relative position of objects and to translate the coordinates of the object relative to the frame into a fixed coordinate system (as described above). As the main point of this solution was to evaluate plane transformation using key points, we show that the task can be solved even in bad filming conditions (sharp camera movement, bad weather conditions, filming in the dark and so on).</p><p>After running the EvenVizion component script, you get 3 visualizations.</p><p>Matching points visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*rctgDEuEY3dk2W309UIFEQ.png" /></figure><p>Heatmap visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5nAIQsKjwRoX1NyUSxbCgw.png" /></figure><p>Fixed coordinate system visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWILqQmX-BocoWJYEAcDiQ.png" /></figure><p>As a result, you get a final stabilized video looking like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FAYbTwge64ZoBk3aNW7BlA.gif" /></figure><p>At this point, we’d like to welcome you to the full version of our project on <a href="https://github.com/RnD-Oxagile/EvenVizion">GitHub</a>. There’s a full pipeline there and all the additional explanations you might need for your endeavors.</p><h3>In Conclusion</h3><p>With the introduction of CV-based analysis, Video Monitoring Systems environment has been changing over the past several years. Even though R&amp;D at Oxagile has proven expertise in CV-based Public Safety solutions, the business cases that we face are ever flourishing and demanding more and more solutions to them.</p><p>The tasks of object detection and its further tracking set for video monitoring systems can be unsolvable by the usual means. The object might disappear from the frame due to the harsh filming conditions (fronting lights, nighttime, obscuring objects). In our case, the camera is moving, which adds to the difficulty of object detection and tracking. In these conditions even the best trackers are giving in.</p><p>That’s why we created the component which helps to localize a camera and stabilize it for future analysis using CV-based methods.</p><p>We at RnD Oxagile hope that our contribution to the open source society will be of value for all the researchers facing the problem of shaky camera footage. This is only the beginning of our Github story.</p><p>Join our journey!</p><blockquote><a href="https://twitter.com/RnD_Oxagile">Twitter</a></blockquote><blockquote><a href="https://www.instagram.com/rnd_oxagile/">Instagram</a></blockquote><blockquote><a href="https://github.com/RnD-Oxagile">Github</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9aaa20549b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>