<?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 Jules Talloen on Medium]]></title>
        <description><![CDATA[Stories by Jules Talloen on Medium]]></description>
        <link>https://medium.com/@jules.talloen?source=rss-38a400cd2a88------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mUmaUVqz0z5u-RBEdzzJAQ.png</url>
            <title>Stories by Jules Talloen on Medium</title>
            <link>https://medium.com/@jules.talloen?source=rss-38a400cd2a88------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 16:15:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jules.talloen/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[Getting started with custom NVIDIA Deepstream 6.0 pipelines in Python]]></title>
            <link>https://medium.com/ml6team/getting-started-with-custom-nvidia-deepstream-6-0-pipelines-in-python-935154dd9237?source=rss-38a400cd2a88------2</link>
            <guid isPermaLink="false">https://medium.com/p/935154dd9237</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[deepstream]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pipeline]]></category>
            <dc:creator><![CDATA[Jules Talloen]]></dc:creator>
            <pubDate>Mon, 17 Jan 2022 09:36:53 GMT</pubDate>
            <atom:updated>2022-05-21T14:51:48.326Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introducing a Python boilerplate to create custom Deepstream pipelines in just minutes.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*CKTChPukDRwiGrRjvsdpUw.png" /></figure><p>NVIDIA recently released version 6.0 of Deepstream, their streaming analytics toolkit for AI-based multi-sensor processing, video, audio and image understanding. Among the new features are improved Python bindings (you can find the release notes <a href="https://developer.nvidia.com/sites/default/files/akamai/deepstream/DeepStream_6.0_Release_Notes.pdf">here</a>). Why does this matter I hear you ask?</p><p>If you’re looking to create a standard, object detection and tracking pipeline, the <a href="https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_ref_app_deepstream.html">Deepstream reference application</a> can get you started. My colleague Victor wrote a <a href="https://blog.ml6.eu/nvidia-deepstream-quickstart-9147dd49a15d">NVIDIA Deepstream Quickstart</a> explaining how to set it up. As he mentions at the end of his blogpost, you’ll hit a wall as soon as you want to do something custom. You might think “No problem! I’ll dive into the code and use my coding skills to add some custom logic”. Unfortunately, Deepstream applications are originally written in C++. Python is still the number one programming language in the ML field and also the language of my choice. Luckily, NVIDIA offers Python bindings. With the release of Deepstream 6.0, NVIDIA made the Python bindings available on their <a href="https://github.com/NVIDIA-AI-IOT/deepstream_python_apps">Python apps repository</a>. Included in this repository are some sample Python applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jr7vZqy5E9NoQxxGK4ZyPg.png" /></figure><p>If you’re like me, you probably got a bit flustered looking at the Deepstream Python samples. It is difficult to follow along and understand the logic components of the app. Every app is basically a monolith script with various pieces of code all mixed together. In addition, all of these sample apps share a lot of functionality, and thus contain a lot of redundant code.</p><p>As a big fan of OOP (Object Oriented Programming) and DRY (Don’t Repeat Yourself), I took it upon myself to rewrite, improve and combine some of the Deepstream sample apps. The result is a <a href="https://github.com/ml6team/deepstream-python">Deepstream 6.0 Python boilerplate</a>.</p><h3>Python boilerplate</h3><p>The boilerplate repository is structured as follows:</p><pre>.<br>├── README.md<br>└── deepstream<br>    ├── Dockerfile<br>    ├── app<br>    │   ├── config.py<br>    │   ├── core.py<br>    │   ├── pipeline.py<br>    │   ├── pipelines<br>    │       ├── anonymization.py<br>    │       ├── re_identification.py<br>    │       └── segmentation.py<br>    │   └── utils<br>    ├── configs<br>    │   ├── pgies<br>    │   ├── sgies<br>    │   └── trackers<br>    ├── data<br>    │   ├── pgies<br>    │   ├── sgies<br>    │   └── videos<br>    └── run.py</pre><p>The app/ directory contains the Deepstream pipeline implementations. Deepstream configuration files are stored in the configs/ directory. Model weights, libs and sample videos can be found in the data/ directory.</p><p>Inside the app/ directory, you’ll find a pipeline.py script and a pipelines directory. The first contains a base Pipeline class, the common object detection and tracking pipeline (e.g. YOLOv4 with DeepSORT). As input, it accepts any Gstreamer supported format (e.g. RTSP stream, mp4 file…) using a <a href="https://gstreamer.freedesktop.org/documentation/playback/uridecodebin.html?gi-language=c">URI decode bin</a>. The resulting bounding boxes and tracker IDs are drawn on the video and returned as a mp4 file or new RTSP stream. Even though this allows a wide variety of applications, you typically want to add some custom logic. The next section explains one way to do this.</p><h4>Inserting custom code with Gstreamer probes</h4><p>Next to the base pipeline there are some example custom pipelines:</p><ul><li><strong>Anonymization:</strong> redacting certain detected objects</li><li><strong>Re-identification:</strong> people tracking and re-identification feature extraction with <a href="https://github.com/KaiyangZhou/deep-person-reid">OSNet</a></li><li><strong>Segmentation:</strong> semantic segmentation</li></ul><p>The pipelines overwrite some logic of the base pipeline and insert custom logic using Gstreamer probes. You can probe both metadata (e.g. bounding boxes) and data (e.g. video frames).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SBW2jAaRXsgl-6Dk1lS5nQ.png" /></figure><p>The AnonymizationPipeline is an example of a custom pipeline using both the underlying metadata and image data. The code snippet below is all you need to write to create your pipeline. The Deepstream magic happens in the _add_probes function. You first select a component of your pipeline, in this case the tiler. You then get the static pad and add a probe. The _wrap_probe function acts as an intermediate to abstract away the underlying C memory management. As a result, you can simply write a function (e.g. _anonymize ) that takes numpy frames and lists of metadata dictionaries as input.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f21f550c059382465d79db14f16de1e/href">https://medium.com/media/2f21f550c059382465d79db14f16de1e/href</a></iframe><h3>Getting started</h3><p>Because the whole Deepstream and Python bindings setup can be very cumbersome, I’ve packaged most of the requirements in a <strong>Dockerfile</strong>. You only need to install Docker, the NVIDIA container toolkit and NVIDIA driver. The compiled Python bindings and all remaining dependencies are part of the Docker image.</p><h4>Prerequisites</h4><p>On a NVIDIA capable machine, install NVIDIA driver version 470.63.01:</p><pre>sudo apt update<br>sudo apt install gcc make<br>curl -O <a href="https://us.download.nvidia.com/XFree86/Linux-x86_64/470.63.01/NVIDIA-Linux-x86_64-470.63.01.run">https://us.download.nvidia.com/XFree86/Linux-x86_64/470.63.01/NVIDIA-Linux-x86_64-470.63.01.run</a><br>chmod 755 NVIDIA-Linux-x86_64-470.63.01.run<br>sudo ./NVIDIA-Linux-x86_64-470.63.01.run</pre><p>Verify the installation with:</p><pre>nvidia-smi</pre><p>Setup Docker and the NVIDIA Container Toolkit following the <a href="https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker">NVIDIA container toolkit install guide</a>.</p><h4>Build and run the pipeline</h4><p>Clone the repository to a local directory, e.g. ~/deepstream-python:</p><pre>git clone <a href="https://github.com/ml6team/deepstream-python.git">https://github.com/ml6team/deepstream-python.git</a></pre><p>Be sure to run git lfs pull afterwards to download the files from LFS storage:</p><pre>sudo apt install git-lfs<br>cd deepstream-python<br>git lfs install<br>git lfs pull</pre><p>Build the container image by running the following command inside the deepstream/ directory (where the Dockerfile is located):</p><pre>docker build -t deepstream .</pre><p>Next, run the container with:</p><pre>docker run -it --gpus all -v ~/deepstream-python/output:/app/output deepstream python3 run.py &lt;URI&gt;</pre><p>Where URI is a file path (file://...) or RTSP URL (rtsp://...) to a video stream.</p><p>For example:</p><pre>docker run -it --gpus all -v ~/deepstream-python/output:/app/output deepstream python3 run.py &#39;file:///app/data/videos/sample_720p.h264&#39;</pre><p>The -v option mounts the output directory to the container. After the pipeline is run, deepstream-python/output will contain the results. For the base pipeline, this is a video (out.mp4) with bounding boxes drawn.</p><p>All these instructions, and more, can be found in the <a href="https://github.com/ml6team/deepstream-python#development-setup"><strong>README</strong></a> of the repository. Happy coding!</p><p><em>This blogpost was made possible by the support of </em><a href="https://www.vlaio.be/en"><em>Flanders Innovation &amp; Entrepreneurship — VLAIO</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=935154dd9237" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ml6team/getting-started-with-custom-nvidia-deepstream-6-0-pipelines-in-python-935154dd9237">Getting started with custom NVIDIA Deepstream 6.0 pipelines in Python</a> was originally published in <a href="https://medium.com/ml6team">ML6team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond frames: The new frontier in Video Analysis]]></title>
            <link>https://medium.com/ml6team/beyond-frames-the-new-frontier-in-video-analysis-f9dbcadc0740?source=rss-38a400cd2a88------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9dbcadc0740</guid>
            <category><![CDATA[action-recognition]]></category>
            <category><![CDATA[video-analysis]]></category>
            <category><![CDATA[visual-anomaly-detection]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[tracking]]></category>
            <dc:creator><![CDATA[Jules Talloen]]></dc:creator>
            <pubDate>Tue, 13 Jul 2021 14:51:47 GMT</pubDate>
            <atom:updated>2021-07-13T14:51:47.404Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLk8LlXNtIx9mem5xmF8SQ.jpeg" /><figcaption>Video analysis allows for tracking and analyzing behavior over time. ©NVIDIA Metropolis</figcaption></figure><p>With an ever increasing amount of cameras, the abundance of video material is driving a new frontier in video analysis. By leveraging the temporal dimension, video analysis models enable a vast amount of impactful use cases from retail consumer analytics to real-time sports monitoring.</p><p>At <a href="https://www.ml6.eu/">ML6</a> we’ve noticed an increased interest in <em>time-based video analysis</em>. For years, ML has been applied to videos but it typically remained limited to frame-based techniques. The use of image-based models fails to unlock the true potential of video analytics. However, the limits of what’s possible with frame-based methods is becoming ever so clear. The solution, involving the temporal dimension, unveils new information and opens the doors to a whole range of new possibilities.</p><p>Take the following frame and video for example. The frame on the left seemingly shows two people trying to fix their broken down car. Based on a single frame, it is impossible to determine whether they are truly fixing the car, or trying to steal it. Only by taking the entire context into account, you see that the two people arrive in another car, forcefully open the hood and swiftly leave, all whilst nervously looking around.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*MXaZEgav1Rx25jXhBwF-Qg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*FxvFMpxGP2oXj5BfDTkKNw.gif" /><figcaption>A sample stealing video from the UCF Crime dataset. Source: <a href="https://www.crcv.ucf.edu/projects/real-world/">https://www.crcv.ucf.edu/projects/real-world/</a></figcaption></figure><p>This blogpost gives an overview of the most important research areas in video analysis. For each of the following subfields, we present some of the most relevant use cases:</p><ul><li>Tracking and re-identification</li><li>Video recognition</li><li>Video anomaly detection</li><li>Video summarization and description</li></ul><h3>Tracking and re-identification</h3><p>Tracking is one of the most fundamental techniques in the realm of video analytics. In case of a single image, each object is unique and known. As soon as we add the time dimension, we have multiple images, or frames, of the same unique object. The goal of tracking is to associate these sightings of the same object to form a track through time. Depending on the amount of objects and viewpoints, various types of tracking exist. These will be discussed next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iople9Ax4fTDMdv4Mo4YtA.jpeg" /><figcaption>An overview of the tracking subfields.</figcaption></figure><h4>Single object tracking (SOT)</h4><p>Single object tracking (SOT), also referred to as visual object tracking (VOT), aims to follow a single object throughout a video. A bounding box of the target object in the first frame is given to the tracker. The tracker will then track this object throughout the subsequent frames. There is no need for further object detections after the initial bounding box is given. These types of trackers are called <em>detection-free:</em> they do not rely on a detector. As a result, any type of object can be tracked as there is no dependence on an object detector with a fixed set of classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1oDpJPj7au1M5d5BevGEtQ.png" /><figcaption>A single object moves throughout video frames.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*Y29R9T7KG4qIXYaWv5vC4Q.gif" /><figcaption>An example of SOT. A single can of coke is being tracked. Source: <a href="https://cv.gluon.ai/build/examples_tracking/demo_SiamRPN.html">https://cv.gluon.ai/build/examples_tracking/demo_SiamRPN.html</a></figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Animal monitoring</strong>: track an arbitrary animal without the need to train a custom object detector.</li><li><strong>Robotics</strong>: track the object currently being handled by robotic arms.</li></ul><h4>Multi-object tracking (MOT)</h4><p>As the name suggests, multi-object tracking (MOT) involves multiple objects to track. A MOT tracker is <em>detection-based</em>, it needs object detections as input and outputs a set of new bounding boxes with corresponding track identifiers. MOT trackers typically associate detections based on movement and visual appearance. They are limited to a fixed set of classes because of the dependence on both the underlying tracker and the visual appearance model. For example, a model trained to detect similar people will not perform well on vehicles because it has learned to look for discriminative features of people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*86eWVWiq4MFsyGIqvg2h-g.png" /><figcaption>Three distinct objects moving throughout video frames.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*uTQgIJM9tOnIjg2JbE5mEA.gif" /><figcaption>An example of MOT for vehicles. Each car is assigned a unique ID. The boxes of the detector and tracker are blue and red respectively.</figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>People/vehicle counting</strong>: count the number of unique people/vehicles passing through a certain area.</li><li><strong>In store retail analytics</strong>: track customers in a store and analyse behavioral patterns to optimize the store layout.</li><li><strong>Crowd management</strong>: analyse crowd movement and patterns.</li><li><strong>Traffic monitoring</strong>: monitor traffic patterns.</li><li><strong>Broadcast sports analytics</strong>: track players and analyse their movement.</li></ul><h4>Multi-target multi-camera tracking (MTMCT)</h4><p>Multi-target multi-camera tracking adds another level of complexity on top of MOT and introduces multiple cameras or viewpoints. The tracker now has a notion of depth and is able to output more accurate tracks. Unfortunately, this typically comes at the cost of computational complexity because of the additional information to be processed. At each point in time, the MTMCT tracker receives a frame from each viewpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLfdxiKltIbzWsx3gdbp8g.png" /><figcaption>Two viewpoints of the same three object moving throughout video frames.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*CVQFYyfod903K_hvHGdM7w.gif" /><figcaption>Four viewpoints of the same area, showcasing MTMCT annotations. Source: <a href="https://www.youtube.com/watch?v=dliRQ9zOFPU">https://www.youtube.com/watch?v=dliRQ9zOFPU</a></figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Sports analytics</strong>: accurate player and ball tracking in ball sport games.</li></ul><h4>Re-identification (ReID)</h4><p>Re-identification is a subfield of MTMCT, it concerns multiple objects and viewpoints but the temporal relation among the detections differs. With MTMCT, at each point in time, the tracker receives from each viewpoint a set of detections at that time. In contrast, ReID is commonly performed on detections from multiple viewpoints at multiple timestamps. Another difference with MTMCT is that ReID cameras don’t have to point at the same area. Generally, ReID viewpoints are scattered across a larger area.</p><p>Most use cases first involve MOT to track people at each viewpoint. Based on the unique people per viewpoint, a gallery of all people seen across viewpoints, is built. Given an image of a query person, ReID then aims to retrieve detections of this person from other viewpoints in the gallery. ReID thus effectively takes over where MOT stops, ands tracks across viewpoints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vkcnWcQ_c7veiusOaM_jgg.png" /><figcaption>Three frames, from three different viewpoints at three different times, containing the same object.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VaCfl86yqbPBWsLfeYf2nw.jpeg" /><figcaption>A schematic representation of re-identification. A gallery is built with people detected (and tracked) in each viewpoint. The gallery is then queried with an image to retrieve detections from the same person, from other viewpoints.</figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Person/vehicle retrieval</strong>: search for a target person or vehicle across viewpoints, in an entire camera network.</li><li><strong>Cross-camera trajectory estimation</strong>: estimate an entity’s trajectory over multiple camera viewpoints.</li><li><strong>Returning visitor detection</strong>: detect returning visitors based on their visual appearance.</li></ul><h4>End-to-end multi-task tracking</h4><p>Next to video-based techniques, image tasks can greatly benefit from temporal information. Various image-based techniques have been extended to include the temporal dimension. Instead of naively outputting information per frame, the models track objects over time and use the output of the previous frame to improve the next prediction. Examples include instance segmentation and pose estimation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*RG20ZiNApQdhiPNsLI_SjA.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*DY3pqfs14IlwDnK6qg4w2Q.gif" /><figcaption>Multi-task tracking: in addition to pose keypoints/segmentation masks, each person is tracked and assigned a unique color.</figcaption></figure><h3>Video recognition</h3><p>Video recognition is the ability to recognize entities or events in videos. Similar to image recognition, there are multiple types of ‘recognition’, depending on the information content of the outputted information. A model can classify, localize or do both. The types of recognition are discussed below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*haZc25MB3aIQHHEpeS2PrA.jpeg" /><figcaption>An overview of the video recognition subfields.</figcaption></figure><h4>Classification</h4><p>Among the most basic techniques, video classification assigns a relevant label to an entire video clip. There is no localization in space or time, thus no bounding boxes or timestamps. As a result, the video clips are commonly only a few seconds long.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mqn7Az78NQ-qCZdIVayKyA.png" /><figcaption>A video consisting of n frames is classified as “class A”.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*j9PkxPWdN3GJWRqdh5EN6w.gif" /><figcaption>Example clips of an action recognition dataset (THUMOS14). Classes include boxing, drumming, knitting… Source: <a href="http://crcv.ucf.edu/THUMOS14/home.html">http://crcv.ucf.edu/THUMOS14/home.html</a></figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Content monitoring</strong>: classify inappropriate videos containing nudity or violence for example.</li><li><strong>Automatic video categorization</strong>: automatically categorize video material into a fixed set of categories.</li></ul><h4>Temporal localization</h4><p>With temporal localization, relevant actions or entities are both classified and localized in time. It is also know as <em>frame-level detection</em>. In a single video, multiple events or entities, with their corresponding start and end time, can be detected. Temporal localization is more challenging compared to classification because the model has to predict when an action or entity starts and ends.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PU-XQdhcAn_vnDYCWlTSqA.png" /><figcaption>A group of frames of a video is classified as “class A”.</figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Automatic video cropping</strong>: crop interesting parts of a video.</li><li><strong>Content search</strong>: find a specific event in hours of video footage.</li><li><strong>Automatic clip extraction</strong>: automatically extract interesting clips from a longer video.</li><li><strong>Event counting</strong>: count the occurrence of specific events.</li></ul><h4>Detection</h4><p>Action or entity detection classifies and localizes relevant actions or entities both in time and space. Entity detection is similar to multi-object tracking, an object is detected and associated across frames. Action detection, however, detects actions that typically only exist across time. Action/entity detection is classified as <em>pixel-level detection</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ac3NKYq-zBu9Y6QFGIM-Q.png" /><figcaption>A group of frames from a video contain an action or entity of “class A”, as indicated by the bounding boxes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*XXQdsD8WQYYiDulLQoFAnw.gif" /><figcaption>The output of the SlowFast action detection model by Facebook research. Source: <a href="https://github.com/facebookresearch/SlowFast">https://github.com/facebookresearch/SlowFast</a></figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Automatic video cropping/zooming</strong>: automatically crop/zoom a video to only contain a certain entity or event.</li><li><strong>Workplace safety monitoring</strong>: detect unsafe events to reduce industrial accidents, e.g. by detecting missing protective equipment.</li></ul><h3>Video anomaly detection</h3><p>What if we want to detect events that deviate from regular behavior but we don’t have a dataset of every such event? What if you are not really interested in what type of event occurs, only that it occurs? This is were anomaly detection comes into play!</p><p>Video anomaly detection aims to detect and temporally localize anomalous events or actions in videos. Anomalous events are defined as events that signify irregular behavior. They vary from walking in the wrong direction to violent crimes. Anomaly detection models generally output a score that indicates the likelihood of an anomaly at each point in time. Consequently, there is no classification of a specific type of event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dK1gMQLRaQQx15AMn982sw.png" /><figcaption>A video with frames containing various levels of anomalous events, as indicated by the anomaly score.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*22bsInBFMMkITbqfkuzAOA.gif" /><figcaption>An example clip of an anomalous event (robbery) and the corresponding anomaly score for each frame. The red zone indicates the ground truth. Source: <a href="https://www.youtube.com/watch?v=8TKkPePFpiE">https://www.youtube.com/watch?v=8TKkPePFpiE</a></figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Smart CCTV surveillance</strong>: notify camera operators of potential anomalous events to focus their attention.</li><li><strong>Safety monitoring</strong>: detect possibly unsafe events to prevent incidents.</li></ul><h3>Video summarization and description</h3><p>To conclude, the world of video analysis is not limited to bounding boxes and class labels. Below are two less common video analysis tasks that aim to give a compact representation of a video: summarization and description.</p><h4>Summarization</h4><p>Video summarization is the process of extracting the most informative or descriptive frames from a video. In the most extreme case, only a single frame is extracted to represent the video (e.g. YouTube thumbnail).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AWhp2MLtiFmBe61Aqq-Yw.png" /><figcaption>Video summarization extracts the most important frames from a video.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHXMTy6l3NuU9zGf3SYZLA.jpeg" /><figcaption>An example of a video summarization model outputting an importance score for each frame. Source: <a href="https://www.microsoft.com/en-us/research/publication/video-summarization-learning-deep-side-semantic-embedding/">https://www.microsoft.com/en-us/research/publication/video-summarization-learning-deep-side-semantic-embedding/</a></figcaption></figure><h4>Description</h4><p>Automatic video description aims to provide a textual description, indicating what is happening in the video clip. Optionally, description models may also include a segmentation step, splitting the video into distinct chunks and providing a textual description for each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0OQALMDK1WfJQDeUHTo9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RCRWNSCXGqs3eXxBnmJ5wg.png" /><figcaption>Example output from a (grounded) video description model. Source: <a href="https://github.com/facebookresearch/grounded-video-description">https://github.com/facebookresearch/grounded-video-description</a></figcaption></figure><p><strong>Example use cases</strong></p><ul><li><strong>Automatic thumbnail selection</strong>: automatically select the most descriptive thumbnail for a video.</li><li><strong>Textual content retrieval</strong>: search videos with textual queries describing the content of the video.</li></ul><h3>Conclusion</h3><p>Video analysis enables a variety of use cases, spanning multiple domains. This blogpost is by no means an exhaustive list but rather sheds a light on the potential of the many techniques. Although video analysis has been around for a while, we’ve only recently started seeing a glimpse of its full potential. By leveraging temporal information, the true power of video emerges.</p><p>Want to find out what video analysis can do for you? <a href="https://www.ml6.eu/contact">Get in touch</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9dbcadc0740" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ml6team/beyond-frames-the-new-frontier-in-video-analysis-f9dbcadc0740">Beyond frames: The new frontier in Video Analysis</a> was originally published in <a href="https://medium.com/ml6team">ML6team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ML6 at NeurIPS 2020]]></title>
            <link>https://medium.com/ml6team/ml6-at-neurips-2020-d1536cbaf6d3?source=rss-38a400cd2a88------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1536cbaf6d3</guid>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[cool-tech]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[neurips]]></category>
            <dc:creator><![CDATA[Jules Talloen]]></dc:creator>
            <pubDate>Mon, 14 Dec 2020 17:16:59 GMT</pubDate>
            <atom:updated>2020-12-14T17:16:59.625Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NnfW_kjsyk9rmgyyqsAj0Q.jpeg" /><figcaption>Because of the ongoing pandemic, NeurIPS 2020 was held completely virtually using tools such as <a href="http://gather.town/">gather.town</a>.</figcaption></figure><p>The <a href="https://neurips.cc/"><strong>Neural Information Processing Systems</strong></a><strong> </strong>(NeurIPS)<strong> </strong>conference is a meeting that revolves around machine learning and computational neuroscience. Held every year in December, it aims to <a href="https://mitpress.mit.edu/books/series/neural-information-processing-series">develop novel computational and statistical strategies for information processing and to understand the mechanisms for information processing in the brain</a>. Each year, a selection of topics is put forward that form the basis for several workshops, poster presentations, invited talks by guest lecturers and expo sessions held by some of the industry’s biggest and most influential companies.</p><p>In this year’s edition, we — Jules Talloen and Thomas Uyttenhove, both Machine Learning Engineers at ML6 — have gotten a paper submission accepted at NeurIPS workshops. For this reason, we attended the <em>virtual</em> NeurIPS 2020 conference and documented trends and relevant topics that we encountered. This blogpost will go over <a href="#343d">ML6’s workshop contributions</a> and will give you a closer look at some of the talks and demonstrations that caught our eye. We have divided the talks into 3 main topics:</p><ul><li><a href="#1a0a">Cool Tech</a></li><li><a href="#509b">COVID-19</a></li><li><a href="#682b">Ethics, Privacy, and AI for good</a></li></ul><h3><em>ML6 Contributions</em></h3><p>For one, NeurIPS provides informal cutting edge venues for discussion of current topics in the form of smaller meetings or workshops.</p><p>In this section, we will present you the two workshops to which we contributed: <strong>Beyond Backpropagation</strong> for Jules’ paper “<em>PyTorch-Hebbian: facilitating local learning in a deep learning framework</em>” and<strong> Machine Learning for Health</strong> for Thomas’ paper on “<em>Interpretable Epilepsy Detection in Routine, Interictal EEG Data using Deep Learning</em>”.</p><h4>Beyond Backpropagation: Novel Ideas for Training Neural Architectures</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HnRfj54RFcKx9gkRuKW3A.jpeg" /></figure><blockquote>Is backpropagation the ultimate tool on the path to achieving artificial intelligence as its success and widespread adoption would suggest?</blockquote><p>Since its discovery, many have questioned the biological plausibility of backpropagation. The limitations of backpropagation have motivated people to investigate alternative learning paradigms. The <a href="https://beyondbackprop.github.io/"><strong>Beyond Backpropagation workshop</strong></a> aims to accommodate discussions towards novel ideas for training neural architectures by combining perspectives from engineering, machine learning and neuroscience.</p><p>Jules’ paper, titled “<em>PyTorch-Hebbian: facilitating local learning in a deep learning framework</em>”, introduces a novel machine learning framework for local learning, a type of learning that more closely resembles how humans learn. The deep neural networks known today have come a long way since their origins in ‘brain-inspired computing’. However, since then the understanding of the human brain has also improved. One thing that remains certain is that the human brain is far more power- and data-efficient at computing than deep learning on digital computers. Although the mysteries of the human brain are far from solved, several learning mechanisms are well known. A lot of the efficiency of learning is the result of self-organization: learning rules that work locally to adapt the network to the data it typically receives without any supervision or global reward. This type of local learning is now made much more accessible by Jules’ novel machine learning framework.</p><h4>Machine Learning for Health: <strong>Advancing Healthcare for All</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*3EFweOSzAvLmgEeJur7VQw.png" /></figure><p>The <a href="https://ml4health.github.io/"><strong>Machine Learning for Health </strong>(ML4H)</a><strong> </strong>workshop aims to bring together machine learning researchers, clinicians, and healthcare data experts for advancing healthcare-related research into cutting-edge machine learning approaches for improving patient outcomes. This year, the focus of the workshop is on how to make sure such sophisticated and powerful tools are not only accessible to highly-specialized caregivers but to healthcare workers on a global scale, thus enabling <em>healthcare for all</em>. Key topics highlighted during this year’s installment are public health, fairness, clinical practice, and epidemiology (which should come as no surprise). Additionally, a lot of attention appears to have gone into explainable machine learning.</p><p>In the context of public health and clinical practice, Thomas’ paper on “<em>Interpretable Epilepsy Detection in Routine, Interictal EEG Data using Deep Learning</em>” looks into the application of machine learning for epilepsy detection. Epilepsy is a common brain disease that affects over 50 million people worldwide, most of which in middle and low-income countries. Epileptics are three times as likely to die prematurely due to complications that arise during the infamous epileptic seizures, but proper diagnosis and treatment would allow 70% of patients to live seizure-free. Whereas the detection of seizures has been successfully “solved” using machine learning, there has been a lack of attention in discovering epilepsy when the patient is not having a seizure. By responding to this gap in epileptic research, this work proposed a machine learning approach that surpasses the successful diagnosis rate of the previous best method. Additionally, the proposed approach allows the visualization of how such diagnoses are made, such that the model’s decisions can be validated for more wide-spread adoption in clinical settings.</p><h3>Cool Tech</h3><p>In this section, we will present you the coolest tech that caught our eye during the conference. First, we will discuss three expo talks by some of NeurIPS’ biggest sponsors: <strong>Zalando Research </strong>on GAN applications for fashion generation, <strong>Apple </strong>on their newest M1-chip, and <strong>Facebook CTRL-Labs </strong>on a novel wrist sensor for immersive hand control. To end this section, we will describe an interesting, more technical, talk by <strong>Anthony M. Zador</strong> on the genetic bottleneck.</p><h4>GAN Applications in Fashion Article Design and Outfit Rendering</h4><p><em>by Zalando Research</em></p><p>When a user is looking for a particular fashion item, they would typically need to provide a textual description in order to search for it. A lot of information is lost in this modality change. The customer may not know the right fashion terms that apply to the article in mind. In order to avoid these modality changes, Zalando proposes <em>Generative Search</em>. With Generative Search, the user is presented with some example clothing images. They can combine two of these images to generate a new image that matches what they are looking for. This image is then used to search through Zalando’s database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*os36IXW8SlCKhzPsimC0MQ.jpeg" /><figcaption>The presented Proof-of-Concept of Zalando’s Fashion Renderer.</figcaption></figure><p>Additionally, Zalando demonstrated their <a href="https://research.zalando.com/welcome/mission/research-projects/fashion-renderer/"><em>Fashion Renderer</em></a>. Given some clothing images and a body pose, the tool generates a new image of a fashion model in the specified pose, wearing the given clothing items. This tool allows users to easily create their own outfits and visualize what they would look like when worn.</p><h4>Accelerated Training with ML Compute on M1-Powered Macs</h4><p><em>by Apple</em></p><figure><img alt="A brief overview of Apple’s M1-chip." src="https://cdn-images-1.medium.com/max/980/1*zG_h4O0zaE2qW48BI0oujw.jpeg" /><figcaption>Apple’s new M1-chip. (source: <a href="https://www.apple.com/newsroom/2020/11/apple-unleashes-m1/">Apple</a>)</figcaption></figure><p>Last month, <a href="https://www.apple.com/newsroom/2020/11/apple-unleashes-m1/">Apple announced their all-new M1 chip</a>: a powerful chip specifically designed for Macs. With an integrated 8-core CPU — both high efficiency and high performance cores, the M1 chip offers a low-latency yet high-bandwidth experience. Additionally, it features a powerful machine learning accelerator and high-performance 8-core GPU that offer a large leap forward in supporting machine learning solutions.</p><p>In light of these improved machine learning capabilities, Apple has released an accompanying machine learning framework with their latest installment of macOS, Big Sur. The framework, called <a href="https://machinelearning.apple.com/updates/ml-compute-training-on-mac">ML Compute</a>, provides low-level APIs for building computational graphs and defining training loops. Performance is further optimized by distributing the workload between CPU and GPU, given the available hardware.</p><p>A <a href="https://blog.tensorflow.org/2020/11/accelerating-tensorflow-performance-on-mac.html">Mac-optimized version of the popular machine learning framework TensorFlow 2.4</a> enables the training of TensorFlow graphs directly on the GPU of both M1-based and Intel-based Macs — a feat that was previously limited to Apple’s CPUs! However, a significant speed increase of 3.3x to 7.0x and power saving from 3.5x to 8x can be noted when opting for the M1-chip Macs over Intel-based Macs. These claims regarding the performance-increase offered by the new hardware and software are promising at the very least.</p><h4>Building Neural Interfaces: When Real and Artificial Neurons Meet</h4><p><em>by Facebook CTRL-Labs</em></p><p>When humans interact with technology, we tend to have a pretty high bandwidth for input. We are capable of processing enormous amounts of information. However, our output is typically limited to typing on a small screen, or keyboard at best. At Facebook CTRL-Labs, they tried to bypass these bottlenecks and built a direct Brain-Computer Interface (BCI).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHo7oaqvp1fR-sRCh-WxxA.jpeg" /><figcaption>The motor intent sensor, presented by Facebook CTRL-Labs, is worn around the wrist and predicts the current hand position.</figcaption></figure><p>They propose a non-invasive neural interface, worn around the forearm. The device contains a model that has been trained to reconstruct motor intention, what the user wants their hand to be doing. Using these intents, it is possible to determine the current hand position. The talk demonstrated how the technology can be used for immersive control in virtual reality, seamless navigation through interfaces and typing without a keyboard.</p><h4>The Genomic Bottleneck: A Lesson from Biology</h4><p><em>by Anthony M. Zador, Neuroscientist, Cold Spring Harbor Laboratory</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NdntmK0BNbg_n6NJRbaB0g.jpeg" /><figcaption>The genomic bottleneck explores how general intelligence in nature is attributed to the wiring of the brain rather than learning during life. (source: <a href="https://www.psypost.org/2020/01/neuroscience-study-uncovers-psilocybin-induced-changes-in-brain-connectivity-55308/">PsyPost</a>)</figcaption></figure><p>Throughout the years, the pursuit of general intelligence has often been inspired by how brains work in the real world. However, contrary to most machine learning approaches available today, general intelligence among animals and humans is largely due to the highly structured brain connectivity and only a small part can be attributed to clever learning algorithms. This structure is constructed based on genomic information present in the DNA of animals and humans, that is the result of thousands to millions of years of evolution. Interestingly enough, the genomic information itself is many orders of magnitude smaller than the actual complex wiring of the brain, meaning that genomes only contain compressed rules for this wiring.</p><p>In this presentation, Zador explains how his research explores this concept with what is called the genomic bottleneck algorithm. In this algorithm, a so-called G-network compresses a working solution by approximating relations in an approximated weight matrix. The network thus acts as some sort of regularizer that aims to minimize the error on data prior to learning and penalizes the network’s complexity. Using this approach, highly compressed models were still able to perform well on non-trivial problems (MNIST, CIFAR, SVHN) while enabling more rapid learning that transfers well to similar, related problems.</p><h3>COVID-19</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c7C5i3OjUdV-47qISDEM3Q.jpeg" /><figcaption>COVID-19 was one of the big topics of NeurIPS 2020. (source: <a href="https://covid-19.sciensano.be/nl">Sciensano</a>)</figcaption></figure><p>An — unsurprisingly — recurring topic was the application of AI and machine learning towards dealing with the current pandemic. Companies worldwide have responded to a call to action to all facets of research and technology regarding COVID-19. Among those were many AI companies. During NeurIPS’ expo sessions, <strong>IBM Research</strong> and <strong>BenevolentAI </strong>presented their efforts towards combating the coronavirus during the last months.</p><h4>AI against COVID-19</h4><p><em>by IBM Research</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wLpcHtGm8465D3dZ58wfw.png" /><figcaption>A <a href="https://covidresponse.res.ibm.com/">dashboard</a> for easy exploration of global measures against the COVID-19 spread. (source: <a href="https://covidresponse.res.ibm.com/">IBM Research</a>)</figcaption></figure><p>In their presentation, IBM discusses the research they have conducted since the start of the pandemic. For one, they applied natural language processing (NLP) techniques to Wikipedia pages that document the <a href="https://covidresponse.res.ibm.com/">efforts of governments worldwide towards stopping the spread of the disease</a>. As a result, they enabled comparative studies of how different countries tackled the pandemic and which measures were most effective in tackling COVID-19.</p><p>Moreover, they developed a tool called <a href="https://www.research.ibm.com/covid19/deep-search/">Deep Search</a>, that enables data-driven discovery for scalable knowledge ingestion. With optical character recognition (OCR) and NLP, text documents are transformed into machine-digestible components. These, in turn, are subjected to NLP to extract entities and relationships for the construction of a knowledge graph. Based on this graph, research ideas can automatically be supported with suitable data. A similar approach was used to analyze scientific papers and extract key insights for <a href="https://covid-19-literature-qna.mybluemix.net/?_ga=2.49835427.48085013.1607712543-1183455620.1607712542">automatic answering of COVID-related questions</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eT9G_LRuFbbGAiHsWlBOqQ.png" /><figcaption>IBM’s <a href="https://covid-19-literature-qna.mybluemix.net/?_ga=2.257245198.48085013.1607712543-1183455620.1607712542">COVID-19 Q&amp;A tool</a>. (source: <a href="https://covid-19-literature-qna.mybluemix.net/?_ga=2.257245198.48085013.1607712543-1183455620.1607712542">IBM Research</a>)</figcaption></figure><p>Lastly, they proposed a drug candidate explorer that finds suitable molecules for novel targets — such as COVID-19. Current methods for doing this often cost millions of dollars, can take over 10 years, have to comply with many constraints, and must find a needle in the haystack of more than 10⁶⁰ possible molecule configurations. Additionally, in case of COVID-19, there is very little data to base research on. As a response to these challenges, IBM’s <a href="https://covid19-mol.mybluemix.net/">CogMol</a> (COntrol Generation of MOLecules) machine learning pipeline is based on generative models trained on molecule and protein sequence embeddings to automate this process and generate unique, diverse, and chemically valid drug candidates for COVID-19.</p><h4><strong>How we leverage ML and AI to develop life-changing medicines — a case study with COVID-19</strong></h4><p><em>by BenevolentAI</em></p><p>Just like IBM Research with their <em>CogMol</em> project, BenevolentAI saw an opportunity in the current drug discovery model. On top of the high cost and development time, they also identified high risks, high inefficacy for the best-selling drugs, and many diseases that are still untreated. For this reason, BenevolentAI aims to <a href="https://www.benevolent.com/what-we-do">apply machine learning and AI to tackle the failing drug discovery and development as a whole</a>. Their proposed drug discovery pipeline consists of four components: knowledge acquisition and representation, target identification, precision medicine, and molecular design. It was this approach that also led to <a href="https://www.prnewswire.com/news-releases/fda-grants-emergency-use-authorisation-for-baricitinib-in-hospitalised-covid-19-patients-nine-months-after-initial-hypothesis-was-published-by-benevolentai-301178187.html">the discovery of the very successful <em>Olumiant Baricitinib</em> rheumatoid prescriptive drugs for treating COVID-19 patients that require supplemental oxygen</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJ9PjcBVzaRgAunOwpDQgQ.png" /><figcaption>BenevolentAI’s drug discovery pipeline successfully predicted the benefits of Olumiant Baricitinib rheumatoid prescriptive drugs for treating COVID-19 patients requiring supplemental oxygen. (source: <a href="https://www.olumiant.com/">Olumiant</a>)</figcaption></figure><p>During knowledge acquisition, NLP is performed to extract entities and textual links from text-derived data (such as proteins, genes, literature, and patents), ingested data (structured machine understandable form of biological information), and patient-level data (such as <a href="https://en.wikipedia.org/wiki/Omics">omics</a>, patents, clinical reports, and diseases). This data is then combined and embedded into a knowledge graph, allowing rapid construction of datasets for bespoke use-cases.</p><p>Disease and drug targets are then identified by finding missing relations between diseases and compounds potentially curing these diseases. Missing genes that have a high probability to resolve particular diseases are selected for more detailed studies and experiments. This methodology has already shown high performance in predicting clinical failure and success of particular genes in clinical trials.</p><p>Latent variable models (such as sparse factor analysis and auto-encoders) are further applied to differentiate between patient-specific molecular mechanisms of diseases. This enables scientists to determine the drug variants best matching the different disease variants.</p><p>Finally, AI is used to quickly and more easily explore the vast chemical space of molecules that can potentially be made into medicines.</p><h3>Ethics, Privacy, and AI for Good</h3><p>Another big topic that was frequently discussed was that of ethical AI, how privacy plays an increasingly important role in how machine learning is applied today, and how AI can be deployed for the good of the people. In this section, we will highlight these topics by means of four of the invited talks by guest lecturers:<strong> Charles Isbell</strong>’s presentation on reducing bias in machine learning approaches, the vision of <strong>Chris Bishop </strong>on further partnering machine learning and human expertise, a talk on the invisible workers of AI by <strong>Saiph Savage</strong>, and <strong>Shafi Goldwasser</strong>’s lecture on pursuing robustness, verification, and privacy.</p><h4>You Can’t Escape Hyperparameters and Latent Variables: Machine Learning as a Software Engineering Enterprise</h4><p><em>by Charles Isbell, Dean of Computing, Georgia Tech</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2_v4IdC0PqZjFeXVVrqJrw.jpeg" /><figcaption>A biased GAN attempts to reconstruct Obama’s facial features.</figcaption></figure><p>In this talk, Charles addresses the growing issue of bias in the machine learning research field. Bias stems from decisions and these decisions happen along the entire pipeline, from the data to the algorithms. We need to consider the ethical and moral consequences of these decisions. Consequently, we need to take the long view and think about the future and implications of the systems we build. Bias is all around us and hard to get rid of. The goal is to detect bias and reduce it. Even when it is the data that’s biased, it’s still up to us to build systems that can deal with that and reduce the bias.</p><p>Charles proposes several approaches to combat bias. One ‘easy’ method is to use representative data or augment the data. This is, however, not always possible. Other techniques involve a more rigorous approach to machine learning. We can take inspiration from software engineering and system modeling. Rather than trying to explain black box models, we need to build transparent models. We need to define proper objective functions that take into account moral and ethical implications. For this, we need to include people that are actually aware of these consequences. More diverse teams are needed.</p><h4>The Real AI Revolution</h4><p><em>by Chris Bishop, Lab Director, Microsoft Research Cambridge</em></p><p>While the creation of Artificial General Intelligence (AGI) would be truly revolutionary, such an achievement still seems to lie well ahead of us. Meanwhile, another profound AI revolution is already unfolding and is set to transform almost every aspect of our lives. Chris calls this the Real AI Revolution.</p><blockquote>“For the last forty years we have programmed computers; for the next forty years we will train them”.</blockquote><p>Machine learning is becoming ubiquitous; it is solving many problems that could not be solved before. Furthermore, it possesses the ability to customize solutions to each specific instance.</p><p>Chris continues his talk by addressing the need for a deep partnership between machine learning experts and those who bring domain knowledge. Today we have systems that perform very well on a broad range of applications. We now need to think about a lot more than the machine learning algorithms themselves. One of the new challenges is the partnership between machine learning and human expertise.</p><blockquote>“AI will not replace radiologists, but radiologists who do not use AI will be replaced by those who do.” — Dr. Felix Nensa</blockquote><h4>A Future of Work for the Invisible Workers in AI</h4><p><em>by Saiph Savage, Director, Human Computer Interaction Lab</em></p><p>While AI has gained unprecedented exposure as it is successfully being integrated in an increasing number of industries, much less attention goes to the human workers required to do tasks that the AI cannot do independently — think of labelling vast amounts of data, transcribing audio, categorizing content, etc. These so-called invisible workers are often underpaid and are faced with limited career growth. As such, these people represent a new underclass on a global scale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*o2L6ZRhjzeX2kP0c0UCJGQ.png" /><figcaption>AI’s invisible workers are identified as a new underclass. (source: <a href="https://en.wikipedia.org/wiki/Assembly_line">Wikimedia Commons</a>)</figcaption></figure><p>A framework called <strong>Value Sensitive Design</strong> is proposed to evolve towards a future in which these invisible workers are empowered rather than exploited. Taking into account all stakeholders’ needs, values and experiences to enable skill growth, hourly wage increases, and easier transitioning to new creative jobs for AI labor workers. By employing techniques to encourage solidarity and entrepreneurship among the invisible workers, the model was shown to drive positive social change. For a future in which AI does good, it must empower people to create change, help each other, and coordinate groups of people to produce collective action.</p><h4>Robustness, Verification, Privacy: Addressing Machine Learning Adversaries</h4><p><em>by Shafi Goldwasser, Director of the Simons Institute for the Theory of Computing</em></p><p>Recently, the field of machine learning has met a lot of skepticism and distrust. In light of these events, Shafi sheds a cryptographer’s perspective on three important aspects of machine learning: verification, privacy and robustness.</p><p>The need for <strong>verification</strong> of machine learning models is best illustrated with an example. In 2018, California legislature passed senate bill 10 to end cash bail and replace it with a risk assessment system. Based on statistics, the system decides whether a suspect should be released or detained until trial. This led to a debate regarding the fairness of the system. The opponents argument boiled down to a lack of trust in the machine learning model:</p><blockquote>The pervasive use of algorithmic risk assessment complicates or undermines many bedrock democratic values, institutional standards of accountability, and constitutional principles.</blockquote><p>Shafi poses that, in order to deal with these concerns, a computer scientist should be concerned about:</p><ul><li>Who builds the ML algorithms?</li><li>Who verifies that the ML code is correct?</li><li>How to ensure that the algorithms used are the same ones that have been verified?</li></ul><p>A second important aspect of machine learning is <strong>privacy</strong>. The power of machine learning comes from data. In turn, this data typically originates from individuals, and their privacy needs to be guaranteed. This becomes a real challenge for training at scale, which requires large datasets and data fusion. Individual-level privacy is the main barrier. You can learn a lot about an individual by looking at their “anonymized” data. Past research has already shown that it is possible to track certain information back to their identities, simply by combining data at scale.</p><p>The third and final covered topic is <strong>Robustness</strong>. A machine learning model must be robust against clever manipulations of inputs by an adversary. If not taking into consideration, such manipulations can cause misclassification and fool applications (cf. “<a href="https://blog.ml6.eu/how-to-fool-help-an-object-detector-8a15d039e693">How to help/fool an object detector</a>”). Currently the most common approach is to define a class of domain specific attacks and prove adversarial robustness e.g. robustness to rotations/translations of an image. As cryptographers consider worst case adversaries without restricting strategies, this approach does not suffice. Instead, they allow a learner to abstain/reject inputs for distributions it has not seen. However, when the learner chooses not to reject, it has to be correct. This way the model will not attempt to provide an answer to adversarial inputs.</p><h3>Closing Remarks</h3><p>You can find the official information about the conference, the complete schedule of this year’s edition, an overview of the proceedings, and more on the <a href="http://neurips.cc/">official NeurIPS website</a>.</p><p><a href="https://neurips.cc/">2020 Conference</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1536cbaf6d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ml6team/ml6-at-neurips-2020-d1536cbaf6d3">ML6 at NeurIPS 2020</a> was originally published in <a href="https://medium.com/ml6team">ML6team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ML6 Internship: Pedestrian tracking over multiple non-overlapping camera viewpoints]]></title>
            <link>https://medium.com/ml6team/ml6-internship-pedestrian-tracking-over-multiple-non-overlapping-camera-viewpoints-5b405c6df7e0?source=rss-38a400cd2a88------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b405c6df7e0</guid>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tracking]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Jules Talloen]]></dc:creator>
            <pubDate>Fri, 14 Feb 2020 08:52:57 GMT</pubDate>
            <atom:updated>2020-02-14T08:52:57.228Z</atom:updated>
            <content:encoded><![CDATA[<p>During my 8 week summer internship at ML6 I worked on a proof of concept of pedestrian tracking over multiple non-overlapping camera viewpoints*. In this post I will describe the process resulting in a demo web app deployed on Google Cloud Platform.</p><p>In the final demo it is possible to upload videos of different camera viewpoints and detect unique identities in each video. Together these unique identities form a gallery of each person seen in the whole network. It is then possible to query a certain identity within this gallery and retrieve results of the same or similar identities, seen from other cameras. The process is shown in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*994Op_ebQ2HDXu1S" /><figcaption>The pedestrian tracking over multiple non-overlapping camera viewpoints process. Source: <a href="https://arxiv.org/pdf/1610.02984.pdf">https://arxiv.org/pdf/1610.02984.pdf</a></figcaption></figure><h3>Pipeline</h3><p>Pedestrian tracking over multiple non-overlapping camera viewpoints is a combination of 3 techniques and research areas: object detection, multiple object tracking (MOT) and re-identification (ReID). In the sections below each building block will be described in more detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v0PwVhyLGqYhCeC3VYTVDg.png" /><figcaption>The pedestrian tracking building blocks.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bjdgrtwDusan2BuWu_F-IA.png" /><figcaption>The research areas involved in pedestrian tracking.</figcaption></figure><h4>Object detection</h4><p>Object detection is required to detect each person in each video frame. The model receives an image as input and returns bounding boxes accompanied with a certainty for each detected pedestrian. Many accurate pre-trained models exist. Both Faster R-CNN and YOLOv3 are two decent choices with Faster R-CNN being a bit slower but more accurate as YOLO is a single shot detector.</p><h4>Multiple object tracking</h4><p>The second building block, multiple object tracking, is crucial to build an accurate gallery of unique identities. Object detection is applied separately on each frame and has no knowledge of temporal relations between those frames. It is the tracker that has to encode this temporal information by linking detections of each object throughout the whole video. An example for pedestrians is shown in the GIF below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*tsrIS9O4n541wPWD" /><figcaption>An example of pedestrian tracking in a single video. Each identity gets assigned a unique ID (and color) for the whole duration they are visible in the video.</figcaption></figure><p>A popular and accurate tracker is <a href="https://github.com/nwojke/deep_sort">Deep SORT</a>. The tracker is a combination of 2 techniques: a Kalman filter and a visual appearance encoder. The Kalman filter predicts the position of each pedestrian in the next frame based on the detected bounding boxes in the previous frames.</p><blockquote><a href="https://en.wikipedia.org/wiki/Kalman_filter"><strong>Kalman filtering</strong></a>, also known as <strong>linear quadratic estimation</strong> (<strong>LQE</strong>), is an <a href="https://en.wikipedia.org/wiki/Algorithm">algorithm</a> that uses a series of measurements observed over time, containing <a href="https://en.wikipedia.org/wiki/Statistical_noise">statistical noise</a> and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a <a href="https://en.wikipedia.org/wiki/Joint_probability_distribution">joint probability distribution</a> over the variables for each timeframe.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBbZvPBLRgX0CC-XNv10EA.png" /><figcaption>A Kalman filter predicts the position and velocity of a subject based on previous sensor readings. Source: <a href="https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/">https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/</a></figcaption></figure><p>Almost every pedestrian will follow a regular path throughout the video. Based on this idea the Kalman filter is able to accurately predict the next position of each pedestrian, based on the previously detected bounding boxes. This next position is then used to select a detected bounding box in the next frame that most likely belongs to the path of the pedestrian.</p><p>Unfortunately a Kalman filter alone is not enough for accurate tracking. Issues such as irregular paths or occlusion cause techniques purely based on movement to fail. An example of such a case is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*5PdR3BMnQZTqMqsF" /><figcaption>The Kalman filter fails in case of irregular paths and occlusion. The pedestrians don’t follow a straight path throughout the video and some pass behind a sign rendering them invisible to the object detector for a couple of frames.</figcaption></figure><p>By adding a visual appearance encoder we can overcome the previously mentioned issues. This encoder is a convolutional neural network that extracts a feature vector from an image. In this case the image is the bounding box image of the target pedestrian. In the latent space imposed by these feature vectors, two extracted features corresponding to the same identity are likely to be closer than features from different identities. Closeness is measured using a distance metric such as cosine distance. The desired structure of the latent space is achieved through re-parametrization of the conventional softmax classifier. This enforces a cosine similarity on the representation space when trained to identify the unique identities in the training set. Now, when a pedestrian follows an irregular path or is occluded for a couple of frames, the encoder is still able to track them based on their appearance. By calculating the distances between the currently tracked pedestrians it is possible to detect which pedestrians are the same.</p><p>We are now left with one more issue: the feature extractor sometimes fails to separate the object from the background. As a consequence the feature vector contains background information causing similar, but not the same, identities with the same background to be matched. A simple fix is background subtraction. Using a KNN or MOG background subtractor we get a mask which can be fed to the feature extractor to only look at the foreground when extracting the feature vector.</p><p>To conclude, the combination of the movement and visual appearance information of pedestrians allows the Kalman filter together with the background subtractor and feature extractor to accurately track unique identities. This results in a gallery with a set of bounding box images of each identity.</p><h4>Re-identification</h4><p>The third, and final, building block is re-identification (ReID).</p><blockquote>The core issue of re-identification is to seek the occurrences of a query person (probe) from a set of person candidates (gallery), where probe and gallery are captured from different non-overlapping camera views.</blockquote><p><strong>It is important to note that only now we are combining multiple camera viewpoints.</strong> The previous 2 steps were performed in the context of a single camera viewpoint only.</p><p>Until now we have created a gallery of identities from multiple camera viewpoints. Since the tracking was performed on a per video basis, some identities will occur multiple times in the gallery, each time as seen from another camera viewpoint. The goals is to, once again, link these identities together to form a cross-camera track. If the locations of the cameras and the time at which each person was seen by the camera is known, we can estimate each person’s location on the map over time.</p><p>Similar to the visual appearance encoder for MOT, a feature vector is extracted for each identity. Again, this allows distance metrics to be used on the vector embeddings. The difference is that now we have more than one bounding box image for each identity. This allows filtering the images to remove any outliers or faulty detections but it also allows to use temporal information. With a high enough frame rate it is possible to perform gait analysis but this is out of scope for this demo.</p><p>Even though we have multiple images of each identity, re-identification is a much more challenging task due to severe appearance changes across different camera viewpoints. Differences in camera position, illumination, color balance, occlusion, resolution, body pose… make the same identities look very different.</p><p>The re-identification research area can be further divided according to various criteria: single-shot vs multi-shot, feature based vs metric based, hand crafted features vs deeply learned features, contextual vs non-contextual, end-to-end vs separate, open set vs closed set… Below are some of the milestones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hlwLvMgaPgtjSqvaAQVJeg.png" /><figcaption>Some re-identification milestones.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/0*onHXFtfeGwFMqJX4" /><figcaption>The OSNet architecture.</figcaption></figure><p>The research area is very active and diverse with dozens of papers released every year. Each claiming to achieve state of the art performance on major datasets. In May 2019 Kaiyang Zhou et al. released their <a href="https://arxiv.org/abs/1905.00953"><em>Omni-Scale Feature Learning for Person Re-Identification</em></a><em> </em>paper<em>. </em>They use multiple convolutional feature streams, each detecting features at a certain scale. These features are then combined using an unified aggregation gate to dynamically fuse the multi-scale features. This aggregation is done using input-dependent channel-wise weights. To efficiently learn spatial-channel correlations and avoid overfitting, the model uses both pointwise and depthwise convolutions. By stacking these convolutions layer-by-layer, OSNet is extremely lightweight. Despite its small size the model is able to achieve state of the art performance on six person ReID datasets.</p><p>Below is an image showing that the model is able to detect the subtle differences between visually similar identities. Both identities are wearing black shorts and a white t-shirt but the one on the left had something printed on the t-shirt. The activation maps show that the model is able to learn discriminative features to distinguish between these 2 identities. Because of the multi-scale architecture the local pattern on the t-shirt was captured but within the context of the white t-shirt as a whole. In contrast, single scale models tend to only focus on local regions and ignore the context around it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_VohU91-Gf19_mz7YxqYA.png" /><figcaption>Activation maps of the OSNet model. Each triplet contains, from left to right, the original image, the activation map of OSNet and the activation map of a single scale model.</figcaption></figure><p>Re-identification is now just a matter of computing the pairwise distances between all identities in latent space. In the case of OSNet, a simple euclidean distance metric suffices. These distances can be pre-computed so that when a re-identification request is made, only a ranking of the top matches is required.</p><h3>Next steps and other use cases</h3><p>The approach described above is missing one important bit of information: pose information. By incorporating the pose of each person and feeding this information to the model, it is possible to get much better feature representations. The model is now able to split its features over the different body parts regardless of differences in pose. This can eliminate re-identification failure due to variety in body poses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*P2FqCjQE4Y21LH43LCJSAQ.png" /><figcaption>Pose estimation.</figcaption></figure><p>On top of pose estimation there are many other interesting techniques to investigate and there is plenty of room for improvement over the coming years.</p><h3>Result</h3><p>The architecture of the final web application deployed on Google Cloud Platform is shown below. Through a browser a user can visit the frontend, request data from Cloud Storage and retrieve metadata from Firestore. The frontend is built using React with authentication and authorization from Firebase. Through the frontend the microservice API, running on Kubernetes Engine exposed through Cloud Endpoints, is invoked. The microservice calls the TensorFlow Serving container to perform object detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gu3Td1ECO45kvdM08nCrNA.png" /></figure><p>Below are some screenshots of the web frontend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WxxJzcHDtAMZgOr1tfi9MQ.png" /><figcaption>The page listing all identities together with their most representative images. It includes their assigned ID, by which camera they were seen and when they were seen.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_V-SrnRhMapY77dx7VFElA.png" /><figcaption>Selecting an identity will bring you to its detail page. Here you can perform re-identification within a certain area, within a certain time period. The top matches are shown below. In this case the person was not seen by any other cameras so similar looking people were returned (dark clothing).</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kz1dhnum8LHnZw-UVLKkjA.png" /><figcaption>In this case the person was seen by another camera so it is listed below after clicking the ‘Re-identify’ button.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbdkrWKCao2obOx6ITK2eQ.png" /><figcaption>The cameras listing page shows a list of all cameras together with their location and status.</figcaption></figure><h3>Conclusion</h3><p>With the support of many helpful people at ML6 and the ease of use of Google Cloud Platform, I managed to deploy a fully working demo in only 8 weeks. I learned a lot about pedestrian tracking through extensive research and existing expertise within ML6. Furthermore I got my first hands-on experience with Kubernetes and lots of Google Cloud services. On top of acquiring all this new knowledge I also had a great time during those 8 weeks. Everyone was very friendly and always ready to help out and there was also plenty of room for amusement and jokes.</p><h3>*Note on ethics</h3><p>At ML6, we firmly believe in the application of AI to benefit society. With “do good” as one of our core values, we are committed to building reliable, safe technology and protecting it in a sustainable way. That’s why invest in, and are committed to <a href="https://ml6.eu/trustworthy-ai-approach/">our thrustworthy AI principles</a>. This internship is highly linked to Ensuring Technical Robustness. It’s an educational project (not deployed on real data) that gives us more insight in possible risks, but also potential benefits of certain technologies. These kind of education projects are essential to help us better understand/measure the pros/cons and assess the net societal impact if similar solutions would be productionized. One of the potential benefits of this solution is that it allows for pseudonymization of video content as we can blur all people in the video and can replace it by unique identifiers of people within a single video that can potentially be linked to identifiers in other videos (rather than storing the full non-pseudonymized data as is currently the case).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b405c6df7e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ml6team/ml6-internship-pedestrian-tracking-over-multiple-non-overlapping-camera-viewpoints-5b405c6df7e0">ML6 Internship: Pedestrian tracking over multiple non-overlapping camera viewpoints</a> was originally published in <a href="https://medium.com/ml6team">ML6team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>