<?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 Ignitarium on Medium]]></title>
        <description><![CDATA[Stories by Ignitarium on Medium]]></description>
        <link>https://medium.com/@Ignitarium?source=rss-7867a99c2726------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ak9xdlDhP7tcHAHHPuf1Dw.jpeg</url>
            <title>Stories by Ignitarium on Medium</title>
            <link>https://medium.com/@Ignitarium?source=rss-7867a99c2726------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 11:04:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Ignitarium/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[Navigating Over-the-Air Updates on Android Automotive OS]]></title>
            <link>https://medium.com/@Ignitarium/navigating-over-the-air-updates-on-android-automotive-os-2822bad86bc2?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/2822bad86bc2</guid>
            <category><![CDATA[automotive]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[adas-market]]></category>
            <category><![CDATA[androidautomotiveos]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Thu, 27 Feb 2025 10:57:46 GMT</pubDate>
            <atom:updated>2025-02-27T10:57:46.321Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Obo5MlZvkVZEfsDf7j9Gpw.png" /></figure><p>Authors: Shaarmila B and Adithyu Asok</p><p>From in-vehicle infotainment systems to advanced driver assistance systems (ADAS), OTA updates play a crucial role in keeping automotive software up-to-date and ensuring optimal performance.</p><p>OTA updates in automotive systems refer to remotely updating the software or firmware of vehicle components without physical intervention. They are delivered seamlessly over the air, ensuring that vehicles remain equipped with the latest features, performance enhancements, and security updates. OTA updates play a crucial role in maintaining the optimal functioning of automotive systems without requiring manual installation or user intervention.</p><p>Infotainment and driving control are the two main areas where OTA updates for automobiles are extensively being used. Infotainment updates include new features, software updates, streaming services, interface updates, updates to maps and audio enhancements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*gm5kFWFg3fCkLqUt.png" /><figcaption><em>OTA update procedure for AAOS</em></figcaption></figure><h3>Different Categories of OTA</h3><p>There are two categories based on which the OTA updates can be classified. They are:</p><ul><li>Based on the type of update they deliver and the purpose they serve in the system, the OTA updates can be classified as Software Over-the-Air (SOTA), Firmware-over-the-air (FOTA), Over-the-air service provisioning (OTASP), Over-the-air provisioning (OTAP), and Over-the-air parameter administration (OTAPA).</li><li>Based on the approach used for system updates and how they handle system partitions, the OTA updates can be classified as Non-A/B system updates and A/B (seamless) system updates.</li></ul><h4>Software Over-the-Air (SOTA) Update:</h4><p>SOTA updates focus on updating software applications within the vehicle, such as the infotainment system, navigation software, and driver assistance features. These updates offer hassle-free improvements for users, enhancing security and providing access to new features.</p><p>One important element of SOTA is the `UpdateManager` class, a utility designed to facilitate the management of app updates via OTA (Over-The-Air) mechanism. It provides functionality to check for updates, prompt users for updates, and handle the download and installation process seamlessly. The updating mechanism includes:</p><p>1. Hosting a new version of application and json file (which contains the metadata associated with the application) in cloud.</p><p>2. The application running on the device should parse json file to determine whether an update is available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/77/0*Cr62-jwp9TvYU8ez.png" /></figure><p>3. Once the user approves update, the application uses DownloadManager to download the application from cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/75/0*Iyzce5coqGOiXvVL.png" /></figure><p>4. BroadcastReceiver is used to get notified on completion of download.</p><p>5. Upon getting download completion notification, we use intent to start the installation activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/0*JK_xzDDqwoigLbaZ.png" /></figure><p>6. This will internally trigger update prompt to the user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/149/0*aj3qw_Mype3aXI79.png" /></figure><p>7. When the user starts update, the new apk will get installed, version of application has been updated from 1.0.0 to 1.0.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/147/0*ZciiEZQcViEeWY_s.png" /></figure><h4>Firmware Over-the-Air (FOTA) Updates:</h4><p>While SOTA updates have quickly become common, updates for FOTA are not as easily accomplished. FOTA updates target the firmware of vehicle components, including electronic control units (ECUs), sensors, and actuators. These updates optimize device performance, ensure compatibility with other vehicle systems, and enhance security by fixing vulnerabilities. Nevertheless, FOTA updates carry the risk of bricking devices if the update process fails, requiring careful testing and timely releases from manufacturers. The FOTA gateway, download engine, and update engine collectively form the backbone of the FOTA update infrastructure, enabling manufacturers to securely deliver firmware updates to the vehicles.</p><h4>Over-the-Air Service Provisioning (OTASP):</h4><p>OTASP enables seamless activation of new services and updates in vehicles without requiring physical SIM card replacements. While OTASP simplifies service enrolment and management, it may lead to potential service disruptions if not properly managed.</p><h4>Over-the-Air Provisioning (OTAP):</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/0*wo674hkPCb8aEbcz.png" /><figcaption><em>Block diagram for FOTA</em></figcaption></figure><p>OTAP streamlines device deployment and management in vehicles, allowing for remote configuration of vehicle settings and features. However, OTAP may pose security risks and require reliable network connectivity for successful implementation.</p><h4>Over-the-Air Parameter Administration (OTAPA):</h4><p>OTAPA facilitates dynamic administration of network parameters and configurations in vehicles, optimizing performance under various conditions. Nevertheless, OTAPA requires careful management to prevent misconfigurations that could lead to malfunctions or security vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*llbk3AFSrnHohqAIIkVTjw.png" /></figure><h4>A/B (Seamless) System Updates</h4><p>Modern automotive systems, like Android-based infotainment systems, might utilize A/B partitioning for seamless system updates. A/B system updates involve maintaining two separate system partitions on the vehicle’s storage, allowing updates to be applied to the inactive partition while the system is running. This approach ensures minimal downtime during updates and seamless switching between partitions for uninterrupted vehicle operation.</p><p>For seamless system updates, there are mainly 3 steps involved. They are:</p><p>1. Create OTA Image:</p><p>a. OTA image can be created by the default “make” tool provided by the AOSP. OTA image of complete build can be created using the following commands</p><p>• “source build/envsetup.sh”</p><p>• “lunch aosp_panther”</p><p>• “make dist DIST_DIR= dist_output” or</p><p>• “ota_from_target_files dist_output/panther-target_files.zip ota_update.zip”</p><p>b. It is not always necessary to create full OTA image, we can also create incremental OTA image to include the recent changes. Incremental updates contain only binary patches for files that have changed since the previous version, making them smaller in size. These updates are efficient because they encode only the differences between the old and new versions of files, rather than including unchanged files.</p><p>c. To build an incremental update, we need the target_files.zip files from both the previous and new builds. The build process generates an incremental update package, which is significantly smaller compared to a full update package.</p><p>• “ota_from_target_files -i PREVIOUS-panther-target_files.zip dist_output/panther-target_files.zip incremental_ota_update.zip”</p><p>2. Host OTA image in server</p><p>• The new generated OTA image can be distributed by hosting on a file server. The url field in the config Json file should be pointing to the file location.</p><p>• “url”: <a href="https://files.server/ota-1.zip">https://files.server/ota-1.zip</a></p><p>• If we want to provide a local file instead of downloading from server, we can modify the url field like</p><p>• “url”: file://path_to_ota_file.zip</p><p>• The update payload will have metadata and the data. Metadata contains the instructions to update to the new version, instruction such as writing to certain partition, hash information to verify the updating process etc. The data, contains the compressed blob or the binary.</p><p>3. Update Application</p><p>• SystemUpdaterSample (sample application by AOSP) application is a base sample application by Google, every vendor should take this as reference and implement their own OTA application with add on features.</p><p>• SystemUpdaterSample will show list of available updates on the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0QiunDtYEozjXNLi.png" /></figure><p>• User is allowed to select an update and apply it to the device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*67b8JMs69rvU-Z-G.png" /></figure><p>• The app will show the installation progress. Resetting the update requests update engine to cancel any ongoing update and revert if the update has been applied. Stopping does not revert the applied update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V69mdYUhFBuNnI9v.png" /></figure><p>.• Once the update is completed, on reboot new changes come into effect.</p><p>• To integrate the SystemUpdaterSample into the device, several steps need to be followed.</p><ol><li>The application needs to be added to the device’s configuration by including “PRODUCT_PACKAGES += SystemUpdaterSample” to the required .mk file. Additionally, permissions need to be granted by modifying the required xml file.</li><li>Further configuration involves setting “privileged: true” to Android.bp file to ensure proper functionality.</li><li>Following these configurations, the sample app needs to be built and flashed onto the device.</li><li>Download the OTA packages and push to the device’s directory.</li><li>Configuration files, like “sample.json,” must be modified accordingly and pushed to the device as well.</li><li>Finally, the sample application can be executed on the device.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/0*figtZuIM3J-NYmPn.png" /><figcaption>Sample Json config file</figcaption></figure><p>• If a new build needs to be released, the URL in the config can be modified such that it can download the latest.</p><p>• Once the installed, the update manager reads the hashes of whole partition and is compared to the expected hashes received in metadata. If the computed hashes match the expected values, it indicates a successful update with integrity and correctness.</p><h4>Non-A/B System Updates in Automotive Systems</h4><p>Non-A/B system updates are traditional methods used by automotive systems without A/B partitions, typically consisting of partitions named boot, system, vendor, user data, cache, recovery, misc. The life cycle of a non-A/B system update involves several steps, including checking for updates, downloading updates, verifying integrity, and installing updates. During the update process, vehicles may prompt users to confirm update installations, ensuring user consent before making changes to the system. Non-A/B system updates may involve some downtime during the update process, but they are essential for maintaining the security and functionality of automotive systems.</p><p>The main difference between non-A/B and A/B seamless updates lies in how they handle system updates and partitions:</p><ul><li>System Update Process: Non-A/B updates follow a traditional process where updates are applied directly to existing partitions, while A/B seamless updates involve transferring updates to a separate partition before switching over seamlessly.</li><li>Downtime: Non-A/B updates may involve some downtime during the update process, whereas A/B seamless updates minimize downtime by ensuring the device remains bootable throughout the update process.</li><li>Recovery Partition Handling: In non-A/B updates, the recovery partition may need to be re-flashed with the desired contents from the system partition after updating, while A/B seamless updates handle recovery partition updates seamlessly during the boot process.</li></ul><h3>Conclusion</h3><p>OTA updates have revolutionized the automotive industry by offering a convenient and efficient way to keep vehicle software up to date. By understanding the working process, categories, and types of OTA updates ensure the reliability, safety, and compliance of vehicles in an ever-evolving technological landscape. They are not just updates; they are critical component of automotive innovation, enhancing the driving experience and paving the way for the future of mobility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2822bad86bc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performance Evaluation Metrics of Adaptive filter Algorithms]]></title>
            <link>https://medium.com/@Ignitarium/performance-evaluation-metrics-of-adaptive-filter-algorithms-6a0360062a64?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a0360062a64</guid>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[audio-processing]]></category>
            <category><![CDATA[kalman-filter]]></category>
            <category><![CDATA[adaptive-filter]]></category>
            <category><![CDATA[performance-evaluation]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Wed, 30 Oct 2024 05:34:42 GMT</pubDate>
            <atom:updated>2024-10-30T05:34:42.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*TLYUxrlyx1NsP4YWFluqAQ.png" /></figure><p>Author: Nurjahan Chandso Momin</p><p>Performance Evaluation is important to do comparative study of different algorithms and decide which algorithm is better than others. There are two types of evaluation methods, which are Objective Evaluation and Subjective Evaluation. Objective Evaluation is quantitative evaluation based on statistical criteria, whereas Subjective Evaluation refers to evaluation setups where human subjects quantify the performance and quality of the algorithm.</p><p>This section explains the different objective and subjective methods/metrics used for evaluating the performance of the different Adaptive filter Algorithms. The different adaptive algorithms are Least Mean Square (LMS), Normalized Least Mean Square (NLMS), Recursive Least Square (RLS), Variable Least Mean Square (VLMS), Affine Projection and Kalman filter algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/0*isxEdO3UxO2xnh6r.png" /></figure><h3><strong>1.1 Objective Evaluation/Objective Metrics</strong></h3><p>1. <strong>Echo Return Loss (ERL) — </strong>Measured in dB, ERL is the ratio of receive-out and send-in power. ERL measures receive-out signal loss when it is reflected as echo within the send-in signal. According to International Telecommunications Union’s (ITU’s) specifications, the ERL of the echo path should be over 6dB. For acoustic ECs (Echo Cancellation), the ERL could be as bad as –12dB. The infinite ERL indicates the digital termination or on-hook condition.</p><p>ERL (in dB) = 10 log (Pd / Pin)</p><p>WhereP­d is the power of the received signal</p><p>Pin is the power of the input signal.</p><p>2. <strong>Echo Return Loss Enhancement (ERLE) — </strong>ERLE is one of the most important metrics commonly used to evaluate the performance of the echo cancellation algorithms<strong>. </strong>Measured in dB, it is the ratio of input desired signal power and residual error signal immediately after echo cancellation\echo suppression. It measures the amount of loss introduced by the adaptive filter alone and depends on the size of the adaptive filter and the algorithm design. Two quantities are considered with ERLE are the convergence time and near-end attenuation in EC’s. ERLE should be in the range of (45dB, -40dB).</p><p>ERLE (in dB) = 10 log (Pd / Pe)</p><p>WhereP­d is the power of the desired signal</p><p>Pe is the power of the error signal.</p><p>3. <strong>Combined</strong> <strong>Loss (ACOM)</strong> — This is the total amount of echo suppression, which includes the echo return loss, echo return loss enhancement and non-linear processing loss (if present).</p><p><em>A</em>COM = <em>A</em>ECHO + <em>A</em>CANC + <em>A</em>NLP</p><p>Where AECHO is echo return loss.</p><p>ACANC is an echo return loss enhancement.</p><p>ANLP is non-linear processing loss.</p><p>4. <strong>Near-end attenuation (NEA)</strong> — This measures how much near end signal is suppressed during cancellation process in double talk scenario.</p><p>NEA (Near End Attenuation) (in dB) = 10 log (Pafter / Pbefore)</p><p>WhereP­after is the signal before cancellation process.</p><p>Pbefore is the signal after cancellation process.</p><p>5. <strong>Mean square error (MSE) — </strong>It will be essential to evaluate the performance of adaptive filters, the purpose of the adaptive filter in EC (Echo Cancellation) is minimizing the Mean Square Error MSE (Mean Square Error). For stationary input and desired signals, minimizing the mean squared error (MSE) would result in the Wiener filter, which is said to be optimum in the mean-square sense<em>.</em></p><p>a. <strong>LMS and NLMS adaptive algorithm: The</strong> criteria of LMS and NLMS adaptive algorithm is minimum mean square of error signal.</p><p>MSE = E{e(n)2 }</p><p>Where e(n) is the error signal</p><p>b. <strong>RLS adaptive algorithm:</strong> In RLS adaptive algorithm, 2 different errors must be considered, priori estimation error Ɛ(n) is the error occur when filter coefficients were not updated, and posteriori error e(n) is the error which occur after the weight vector is updated. The RLS algorithm depends on the least mean square i.e. (LSE) not MSE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/0*FLzpHOKg1AjjPW7e.png" /></figure><p>6. <strong>Misalignment/ Mis adjustment — </strong>Measures the mismatch between the true and the estimated impulse response of the receiving room.</p><p>misalignment = || h — hest || / || h ||<br>Where || . || denotes the l2 norm of a vector and h = [h (0),.…., h(L-1)].</p><p>7. <strong>Word Accuracy Rate (WAcc) –</strong>Word Error rate is an industry standard for measuring speech recognition accuracy using the relation WAcc = 1- WER. The number of correctly recognized words from the total number of words spoken stands for WAcc.<br>Word Error Rate = (Substitutions + Insertions + Deletions) / Number of Words Spoken.</p><p>8. <strong>Signal to Noise Ratio (SNR) — </strong>Measured in dB, which is another important performance criteria of adaptive filter cancellation. SNR describes the ratio of input signal to noise signal.<br>SNR (in dB) = 10 log (S / N) <br>Where S is the signal and N is the noise signal</p><p>9. <strong>Bark distortion measure (BSD)</strong> — Loudness is related to signal intensity in a nonlinear fashion. This considers the fact that the perceived loudness varies with frequency. The BSD measure for frame k is based on the difference between the loudness spectra and is computed as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/213/0*PFoKP8_TVvsCA77t.png" /></figure><p>where</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/96/0*VurMVCZcOnEird5T.png" /></figure><p>a are the loudness spectra of the clean and enhanced signals respectively and Nb is the number of critical bands.</p><p><strong>10. Rate of Convergence — </strong>The rate of convergence is the number of adaptation cycles required for the algorithm to converge from some initial condition to its steady-state. The rate of convergence depends on the distinct factors as per the algorithm. e.g., The convergence of LMS adaptive algorithm depends on step-size, convergence of NLMS adaptive algorithm depends on variable step-size and convergence of RLS adaptive algorithm depends on the exponential weighting factor.</p><p>a. <strong>Convergence of the LMS adaptive algorithm:</strong> The convergence of LMS adaptive filter depends on 2 factors — the step-size (µ), which lie in the specific range.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/0*Pq7Ej_m7AsepztmU.png" /></figure><p>and eigenvalue spread on autocorrelation matrix <em>X(Rx).</em></p><p>Where Ymax is the largest eigenvalue of autocorrelation matrix<em> Rx.</em></p><p>b. <strong>Convergence of the NLMS adaptive algorithm: </strong>The convergence of NLMS adaptive filter depends on the normalized step-size (µ).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/156/0*jiASyi_KaFjTk4OC.png" /></figure><p>Where β is the normalized step-size with 0 &lt; β &lt; 2.</p><p>c. <strong>Convergence of RLS adaptive algorithm: </strong>The convergence of RLS algorithm is depends on the weighting factor λ, 0 &lt; λ ≤ 1.</p><p>11. <strong>Perceptual Evaluation of Speech Quality (PESQ) </strong>— PESQ is designed to analyze specific parameters of audio, including time warping, variable delays, transcoding, and noise. PESQ does not consider frequency response and loudness, two especially key factors that affect the perceived quality of a telephone terminal. Audio sharpness, call volume, background noise, variable latency/lag in the call, clipping and audio interference are considered in PESQ. PESQ returns a score from -0.5 to 4.5, with higher scores showing better audio quality.</p><p>12. <strong>Perceptual Evaluation of Audio Quality (PEAQ) — </strong>The PEAQ measurement model produces several variables based on comparison between a reference signal and the same signal processed by codec. These variables are called Model Output Variables (MOV). The Objective Difference Grade (ODG) is the FFT (Fast Fourier Transform) of the difference between the FFT of the reference file versus the FFT of the degraded file. The algorithm then uses this variable along with the Model Output Variables (MOVs) to then derive a PEAQ score. In order to calculate PEAQ from ODG, we then multiply this difference with MOVs which are signal analysis parameters for which the human ear is specifically sensitive to. This allows us to tune the ODG signal to a metric that is more closely correlated with human subjective experience.</p><p>13. <strong>Short-Time Objective Intelligibility (STOI)</strong> — Intelligibility measure which is highly correlated with the intelligibility of degraded speech signals, e.g., due to additive noise, single/multi-channel noise reduction, binary masking, and vocoded speech as in CI (Continuous Integration) simulations. STOI is an objective evaluation method of machine-driven intelligibility. STOI values range from 0 to 1. STOI may be a desirable alternative to the speech intelligibility index (SII) or the speech transmission index (STI), when you are interested in the effect of nonlinear processing to noisy speech, e.g., noise reduction, binary masking algorithms, on speech intelligibility.</p><p>14. <strong>Non-intrusive Objective Speech Quality Assessment (NISQA) — </strong>It does not require a reference clean speech audio file. It is standardized from ITU-T Rec. P.800 series. NISQA supplies a prediction of the four various speech quality dimensions, those are Noisiness, Coloration, Discontinuity, and Loudness. Used in VoIP, telecommunication network.</p><p><strong>15. Three-fold Quality Evaluation of Speech in Telecommunications</strong> (<strong>3QUEST)</strong> — This was designed to assess the background noise separately in a transmitted signal. 3QUEST returns Speech-MOS (S-MOS), Noise-MOS (N-MOS), and General-MOS (G-MOS) values. The resultant values are on a scale of 1 (bad) to 5 (excellent). G-MOS is a weighted average of the S-MOS and N-MOS. It is standardized as a <a href="https://www.itu.int/rec/T-REC-P.835">ITU-T P.835</a> recommendation. Based on our experience, 3QUEST is the most suitable objective metric for Noise Cancellation evaluations.</p><p><strong>16. Perceptual Objective Listening Quality Analysis </strong>(<strong>POLQA)</strong> — is an upgraded version of PESQ that supplies an advanced level of benchmarking accuracy and adds significant new capabilities for super-wideband (HD) and full-band speech signals. It is standardized as Recommendation <a href="https://www.itu.int/rec/T-REC-P.863">ITU-T P.863</a>. POLQA has the same MOS scoring scale as its predecessor PESQ, though it is for the same use case of evaluating quality related to codec distortions.</p><h3><strong>1.2 Subjective Evaluation</strong></h3><p>The following ITU-T (International Telecommunication Union — Telecommunication Standardization sector) standards can be used for speech, audio quality analysis: –</p><p><strong>SERIES P:</strong> Telephone Transmission Quality, Telephone Installations, Local Line Networks</p><p>1. <strong>ITU-T P.808 — Subjective evaluation of speech quality with a crowdsourcing approach — </strong>Listening-only tests including the absolute category rating (ACR), degradation category rating (DCR), comparison category rating (CCR). ACR is quality of the speech is rated on five-point scores which is MOS from 1(bad) to 5(Excellent). DCR is the test where participants listen to both reference (unprocessed) and processed speech samples and rate the quality of the processed sample on the five-point degradation category rating scale which is DMOS (degradation mean opinion score). In CCR, Listen to both the reference and processed speech samples on each trial. The order of listening is random and rate the quality on comparing both which is CMOS (comparison mean opinion score). Evaluating the subjective quality of speech in noise by SMOS (speech MOS), NMOS (background noise MOS) and MOS (overall MOS).</p><p>2. <strong>ITU-T P.831 — Subjective performance evaluation of network echo cancellers — </strong>Conversational tests, Talking-and-Listening tests, and Third-party listening tests are done based on initial convergence, diversions, background noise and impairments during single-talk/double-talk.</p><p>3. <strong>ITU-T P.832 — </strong>Subjective performance evaluation of hands-free terminals — Conversational tests, Talking-and-Listening tests, and Third-party listening tests are done based on transmission of background noise, variations of loudness, impairments caused by speech gaps and echoes, dialogue capability, speech sound quality.</p><p>4. <strong>ITU-T P.168 — Digital network echo cancellers — </strong>The Steady state residual and returned echo level test, Convergence and steady state residual and returned echo level tests, Convergence test in the presence of background noise, Performance under conditions of double talk, Double talk stability test, Leak rate test, Infinite return loss convergence test, non-divergence on narrow-band signals, Stability test are covered in the ITU-T P.168 standard.</p><p><strong>SERIES G</strong> — General Characteristics of International Telephone Connections and International Telephone Circuits</p><p>5. <strong>ITU-T G.167 — Acoustic Echo Controllers — </strong>The following different verification tests are done under ITU-T G.168. Weighted terminal coupling loss in single talk and double talk, received speech attenuation during double talk, sent speech attenuation during double talk, received speech distortion during double talk, sent speech distortion during double talk, maximum frequency shift, break-in time, Initial convergence time, recovery time after double talk, terminal coupling loss during echo path variation, recovery time after echo path variation.</p><h3><strong>1.3 Conclusion</strong></h3><p>The adaptive filter algorithm is used in many applications such as telecommunication, radar, sonar, video and audio signal processing, Image processing, noise reduction and in many biomedical applications.</p><p>In Ignitarium, adaptive filter algorithms are used for different audio processing algorithms like Ignitarium Voice Activity Detection and Acoustic echo cancellation. We have implemented the performance framework to measure the ERL, ERLE, ACOM, Misalignment, NEA, PESQ and STOI for LMS, NLMS, Affine projection and Kalman filter adaptive algorithms.</p><p>References:</p><p><em>1. </em><a href="https://www.ripublication.com/irph/ijece/ijecev5n2_06.pdf"><em>https://www.ripublication.com/irph/ijece/ijecev5n2_06.pdf</em></a><em><br>2. </em><a href="https://www.diva-portal.org/smash/get/diva2:1456739/FULLTEXT01.pdf"><em>https://www.diva-portal.org/smash/get/diva2:1456739/FULLTEXT01.pdf</em></a><em><br>3. </em><a href="https://www.ijert.org/research/performance-analysis-of-adaptive-filtering-algorithms-for-acoustic-echo-cancellation-IJERTV7IS080056.pdf"><em>https://www.ijert.org/research/performance-analysis-of-adaptive-filtering-algorithms-for-acoustic-echo-cancellation-IJERTV7IS080056.pdf</em></a><em><br>4. </em><a href="https://abrarhashmi.files.wordpress.com/2016/02/behrouz-farhang-boroujeny-adaptive-filters_-theory-and-applications-wiley-2013.pdf"><em>https://abrarhashmi.files.wordpress.com/2016/02/behrouz-farhang-boroujeny-adaptive-filters_-theory-and-applications-wiley-2013.pdf</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a0360062a64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[pybind11 — Seamless operability between C++11 and Python]]></title>
            <link>https://medium.com/@Ignitarium/pybind11-seamless-operability-between-c-11-and-python-1ea7c27d57f9?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ea7c27d57f9</guid>
            <category><![CDATA[pybind11]]></category>
            <category><![CDATA[interoperability]]></category>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Tue, 15 Oct 2024 10:55:30 GMT</pubDate>
            <atom:updated>2024-10-15T10:55:30.850Z</atom:updated>
            <content:encoded><![CDATA[<h3>pybind11 — Seamless operability between C++11 and Python</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ESA0AHRjEOPIu5HpmyCp1A.png" /></figure><h3><strong>Unlocking the Power of C++ with Python</strong></h3><p>In the ever-evolving landscape of programming languages, Python has established itself as a favorite among developers for its simplicity, readability, and extensive libraries. Moreover, we love Python.</p><p>However, there are times when the raw speed and low-level control offered by languages like C++ become essential for optimizing performance-critical code. What if you could seamlessly combine the ease of Python with the raw power of C++? This remarkable synergy is precisely where Pybind11 takes centre stage. With Pybind11, a seamless integration of Python’s user-friendly elegance with the robust might of C++ unfolds before us.</p><h3><strong>Pybind11 or Boost.Python ?</strong></h3><p><a href="https://pybind11.readthedocs.io/en/stable/">Pybind11</a> is a header-only library, meaning that you don’t need to compile a separate shared library, where as boost python has been around for a long time and may involve more complex syntax and setup.</p><p>Compared to <a href="https://www.boost.org/doc/libs/1_81_0/libs/python/doc/html/index.html">Boost</a>, pybind11 requires less boilerplate code. Its syntax is simpler and more concise. It has strong support for Python3, which is becoming the standard choice for python development.</p><p>For detailed information on using pybind11, you can refer to the<a href="https://pybind11.readthedocs.io/en/stable/index.html"> </a><a href="https://pybind11.readthedocs.io/en/stable/index.html">official documentation</a>. Here, we are focussing more on how we can effectively use Pybind11 for some AI-based applications.</p><p><strong>Topics We Will Cover</strong></p><ul><li>Getting started</li><li>Exposing C++ Class</li><li>Handling NumPy Arrays</li><li>Pybind11’s Pythonic Oasis</li><li>Common challenges in wrapping C++ APIs</li><li>Wrap-up</li></ul><h3><strong>Getting Started</strong></h3><p>Before diving into the world of pybind11, you’ll need to set up your development environment.</p><h3><strong>Installing Python 3.10 Using Conda</strong></h3><ul><li><strong>Download</strong><a href="https://docs.conda.io/en/latest/miniconda.html"><strong> </strong></a><a href="https://docs.conda.io/en/latest/miniconda.html"><strong>Miniconda</strong></a><strong> and run the installer</strong></li><li>Create Python 3.10 environment</li><li>Clone the Pybind11 repository</li></ul><p>conda create -n pybind_env python=3.10<br>git clone <a href="https://github.com/pybind/pybind11.git">https://github.com/pybind/pybind11.git</a></p><p><strong>Exposing C++ Class</strong></p><p>We’ll start by defining a C++ class using Pybind11 that encapsulates our image processing operations. Pybind11’s intuitive syntax makes it a breeze to create this bridge between Python and C++</p><p>Make sure you have OpenCV installed in your machine. If not, either build from source, or simply:</p><p>sudo apt-get install libopencv-dev</p><p><strong>Define CmakeList:</strong></p><p><strong>cmake_minimum_required</strong>(VERSION 3.10)</p><p><strong>set</strong>(PROJECT_NAME &quot;myLib&quot;)<br><strong>project</strong>(${PROJECT_NAME})<br><strong>set</strong>(CMAKE_CXX_STANDARD 20)<br><strong>set</strong>(PYBIND11_PYTHON_VERSION 3.10)<br># set(CMAKE_CXX_FLAGS &quot;-Wall -Wextra -fPIC&quot;)<br><strong>add_subdirectory</strong>(pybind11)<br><strong>find_package</strong>(OpenCV REQUIRED)<br>pybind11_add_module(${PROJECT_NAME} process.cpp)<br>target_include_directories(${PROJECT_NAME} PUBLIC<br>${OpenCV_INCLUDE_DIRS})</p><p><strong>target_link_libraries</strong>(${PROJECT_NAME} PUBLIC<br>${OpenCV_LIBS})<br>target_compile_definitions(${PROJECT_NAME}<br>PRIVATE VERSION_INFO=${EXAMPLE_VERSION_INFO})</p><p>#include &lt;pybind11/pybind11.h&gt;<br>#include &lt;pybind11/numpy.h&gt;<br>#include &lt;opencv2/opencv.hpp&gt;<br>#include &lt;iostream&gt;<br><strong>namespace</strong> py = pybind11;<br><strong>class</strong> <strong>CVutils</strong><br>{<br><strong>private</strong>:<br> std::string filename;</p><p><strong>public</strong>:<br> py::<strong>array_t</strong>&lt;<strong>uint8_t</strong>&gt; process_image(std::string &amp;filename, <strong>int</strong> width, <strong>int</strong>height)<br>{<br> cv::Mat input_image = cv::imread(filename, cv::IMREAD_COLOR);<br> // Perform image processing, such as resizing<br> cv::Mat resized_image;<br> cv::resize(input_image, resized_image, cv::Size(width, height));<br> <strong>return</strong> py::array({height, width, <strong>static_cast</strong>&lt;<strong>int</strong>&gt;(resized_image.channels())}, resized_image.data);<br>}</p><p><strong>Define a simple image utils class<br>Build</strong></p><p>mkdir build &amp;&amp; cd build<br>cmake ..<br>make</p><p>├── CMakeCache.txt<br>├── CMakeFiles<br>├── cmake_install.cmake<br>├── Makefile<br>├── myLib.cpython-310-x86_64-linux-gnu.so<br>└── pybind11</p><p><strong>Python Test Suite</strong></p><p><strong>from</strong> build.myLib <strong>import</strong> CVutils<br>cv_obj = CVutils()<br>py_list_obj = PyListInt()<br>processed_image = cv_obj.process_image(&quot;flower.jpeg&quot;, 640, 480)<br>print(&quot;Resized: &quot;, processed_image.shape)</p><p><strong>Handling NumPy Arrays</strong></p><p>A simple array addition</p><p>#include &lt;pybind11/pybind11.h&gt;<br>#include &lt;pybind11/numpy.h&gt;<br>#include &lt;opencv2/opencv.hpp&gt;<br>#include &lt;iostream&gt;<br><strong>namespace</strong> py = pybind11;<br><strong>using</strong> PyArrayFloat = py::<strong>array_t</strong>&lt;<strong>double</strong>&gt;;<br>PyArrayFloat <strong>add_arrays</strong>(PyArrayFloat input1, PyArrayFloat input2)<br>{<br> py::buffer_info buf1 = input1.request();<br> py::buffer_info buf2 = input2.request();<br> <strong>if</strong> (buf1.ndim != 1 || buf2.ndim != 1)<br> <strong>throw</strong> std::runtime_error(&quot;Number of dimensions must be one&quot;);<br> <strong>if</strong> (buf1.size != buf2.size)<br> <strong>throw</strong> std::runtime_error(&quot;Input shapes must match&quot;);<br> PyArrayFloat result = PyArrayFloat(buf1.size);<br> py::buffer_info buf3 = result.request();<br> <strong>double</strong> *ptr1 = <strong>static_cast</strong>&lt;<strong>double</strong> *&gt;(buf1.ptr);<br> <strong>double</strong> *ptr2 = <strong>static_cast</strong>&lt;<strong>double</strong> *&gt;(buf2.ptr);<br> <strong>double</strong> *ptr3 = <strong>static_cast</strong>&lt;<strong>double</strong> *&gt;(buf3.ptr);<br> <strong>for</strong> (<strong>size_t</strong> idx = 0; idx &lt; buf1.shape[0]; idx++)<br> ptr3[idx] = ptr1[idx] + ptr2[idx];<br> <strong>return</strong> result;<br>}<br>};</p><p><strong>Python Test Suite</strong></p><p><strong>import</strong> numpy <strong>as</strong> np<br><strong>from</strong> build.myLib <strong>import</strong> add_arrays</p><p>arr1 = np.array([1, 2])<br>arr2 = np.array([5, 6])<br>print(add_arrays(arr1, arr2))</p><p><strong>Pybind11’s Pythonic Oasis</strong></p><p>#include &lt;pybind11/pybind11.h&gt;<br>#include &lt;pybind11/numpy.h&gt;<br>#include &lt;opencv2/opencv.hpp&gt;<br>#include &lt;iostream&gt;</p><p><strong>namespace</strong> py = pybind11;<br><strong>using</strong> PyListInt = std::vector&lt;<strong>int64_t</strong>&gt;;<br>py::class_&lt;PyListInt&gt;(m, &quot;MyList&quot;)<br> .def(py::init&lt;&gt;())<br> .def(&quot;append&quot;, (<strong>void</strong>(PyListInt::*)(<strong>const</strong> <strong>int</strong> &amp;)) &amp; PyListInt::push_back)<br> .def(&quot;clear&quot;, (<strong>void</strong>(PyListInt::*)()) &amp; PyListInt::clear)<br> .def(&quot;pop&quot;, (<strong>void</strong>(PyListInt::*)()) &amp; PyListInt::pop_back)<br> .def(&quot;__len__&quot;, [](<strong>const</strong> PyListInt &amp;v)<br> { <strong>return</strong> v.size(); })<br> .def(&quot;__get__&quot;, [](<strong>const</strong> PyListInt &amp;v, <strong>int</strong> idx)<br> { <strong>return</strong> v[idx]; })</p><p>.def(&quot;print&quot;, [](<strong>const</strong> PyListInt &amp;l)<br> {<br> fprintf(stderr, &quot;[&quot;);<br> <strong>auto</strong> it = l.begin();<br> <strong>if</strong> (it != l.end()) {<br> fprintf(stderr, &quot;%d&quot;, *it++); <br>}<br> <strong>for</strong> (; it != l.end(); ++it) {<br> fprintf(stderr, &quot;, %d&quot;, *it);<br> }</p><p>fprintf(stderr, &quot;]\n&quot;); <br>})</p><p><strong>Python Test Suite</strong></p><p>from build.myLib <strong>import</strong> MyList<br>my_list = MyList()<br>my_list.append(1)<br>my_list.append(19)<br>my_list.print()<br>my_list.pop()<br>my_list.print()</p><h3><strong>Common challenges in wrapping C++ APIs</strong></h3><p>We might encounter several challenges which will require careful consideration and attention. These are some of the challanges you may face:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*BYT_LnRuxVYju6Pllza29w.png" /></figure><p>These challanges offer a glimpse into the intricacies of binding C++ APIs with Pybind11.</p><h3><strong>Wrap-up</strong></h3><p>The examples presented here provide a foundational understanding; this merely scratches the surface of what PyBind11 can do. From the initial steps of setting up the environment and understanding the fundamental concepts to some more useful cases like handling NumPy and OpenCV libraries, you might have gained a comprehensive understanding of how Pybind11 bridges the gap between Python and C++.</p><p>The key takeaway is that Pybind11 empowers the user to harness the strengths of both C++ and Python, enabling to create high-performance, versatile and accessible software solutions. Especially in cases like developing AI applications, game engines, data analysis tools, or any other projects that demands the best of both languages, Pybind11 is a formidable ally.</p><h3>References</h3><ol><li><a href="https://pybind11.readthedocs.io/en/stable/advanced/classes.html">https://pybind11.readthedocs.io/en/stable/advanced/classes.html</a></li><li><a href="https://www.boost.org/doc/libs/1_81_0/libs/python/doc/html/index.html">https://www.boost.org/doc/libs/1_81_0/libs/python/doc/html/index.html</a></li><li><a href="https://en.cppreference.com/w/cpp/language/reference">https://en.cppreference.com/w/cpp/language/reference</a></li><li><a href="https://chat.openai.com/chat">https://chat.openai.com/chat</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ea7c27d57f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Infrastructure Inspection Using Aerial Imaging]]></title>
            <link>https://medium.com/@Ignitarium/smart-infrastructure-inspection-using-aerial-imaging-206f3b559156?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/206f3b559156</guid>
            <category><![CDATA[model-training]]></category>
            <category><![CDATA[aerial-imaging]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[infrastructure-inspection]]></category>
            <category><![CDATA[defect-detection]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Wed, 21 Aug 2024 11:30:44 GMT</pubDate>
            <atom:updated>2024-08-21T11:30:44.544Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*HkIESfn8BUFj0fByqHE-Ww.png" /></figure><p>Civil infrastructure like roadways, bridges, tunnels, pipelines, transmission towers, residential and commercial buildings require continuous monitoring to ensure structural integrity. With aging infrastructure in advanced geographies like US, Europe and Japan, the governments are securing multibillion-dollar funds towards asset management and repairs. A large chunk of the US Infrastructure Bill of $1.2 trillion is apportioned for maintenance of infrastructure.</p><p>When it comes to technology, over the past few decades, the use of sensors and sensing systems for infrastructure asset management has increased considerably. With the growing use of computer vision sensing systems in the next few years, we will see higher levels of efficiency and returns on investment. Non-contact based sensors like camera and thermal sensors mounted on aerial vehicles like drones are eliminating the need for surveyors having to physically be present for inspection. However, in most cases, trained inspectors are still required to manually check the captured data.</p><p>With the advent of AI and deep learning-based sensing systems, there is a good opportunity to build vision inspection solutions that can ingest huge amounts of video data, do the analysis, and provide detailed reports. Data processing can happen real time at the edge (for example, AI HW on the drone) or offline (either on-premise or cloud servers) or in a hybrid mode. In a hybrid mode, the edge device would handle basic analysis (for example, identifying key parts of infrastructure) and send only the relevant data to backend servers for further detailed analysis.</p><p>The following section provides an overview of some of the infrastructure inspection solutions that Ignitarium has developed for customers in the past few years, using video data obtained from drones. In all these solutions, the data processing pipeline is similar and can be generalized as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/0*5tU5GR4im2ZT8hgA.jpg" /></figure><p>The ‘Detection Module’ is the key component that is developed using computer vision &amp; deep learning models. The process of developing the detection module is similar across different use cases and can be generalized into the following 2 main steps:</p><p><strong>Dataset preparation: </strong>Depending on the deep learning (DL) model that is selected, the amount of training dataset varies. Typically, we will need tens of thousands of images of defective parts to train a DL model. This can be a combination of real and synthetic datasets. The datasets must be labelled (objects/areas of interest to be marked using simple bounding boxes or pixel segmentation) before it can be used for model training.</p><p><strong>Model Training:</strong> A suitable DL model is chosen based on the following main parameters:</p><ul><li>Type of defect</li><li>Dataset quantity and quality</li><li>Mode of operation (real time or offline)</li></ul><p><strong>Validation &amp; Refinement:</strong> Validation of the model is done using test data as well as real world data. Based on the accuracy and speed performance, we will need to iterate with refinements on both datasets and models. An efficient way to do this is to leverage MLOps techniques, where tools &amp; frameworks are used to allow fast turnaround time and proper tracking of dataset &amp; model versions.</p><p>The below illustrates a few of the solutions developed by Ignitarium:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/188/0*PqXBLbaOP5RspgyV.png" /><figcaption><em>Mobile Tower Inspection — Missing nuts/bolts</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/0*mjumY3vtTBxxxCUf.png" /><figcaption><em>Wall Crack Detection</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/188/0*rSNuaBFyQOjpJPav.jpg" /><figcaption><em>Solar Panel Inspection</em></figcaption></figure><p>You may refer to the following articles for an indepth look at each of our deployments:</p><p><a href="https://ignitarium.com/deep-learning-based-defect-detection-in-telecom-towers/">https://ignitarium.com/deep-learning-based-defect-detection-in-telecom-towers/</a></p><p><a href="https://ignitarium.com/ai-based-surface-vegetation-encroachment-detection-around-rail-tracks/">https://ignitarium.com/ai-based-surface-vegetation-encroachment-detection- around-rail-tracks/</a></p><p><a href="https://ignitarium.com/deep-learning-based-wall-crack-detection/">https://ignitarium.com/deep-learning-based-wall-crack-detection/</a></p><p><a href="https://ignitarium.com/solar-panel-defect-detection-using-ai-techniques/">https://ignitarium.com/solar-panel-defect-detection-using-ai-techniques/</a></p><p>Ignitarium has been working in the domain of civil infrastructure maintenance using both terrestrial and aerial image analysis. With our expertise in sensor data analysis and advanced computer vision techniques, we can provide state-of-the art inspection software that can be integrated into visual sensing systems.</p><p>With successful engagements with US railroad maintenance ecosystem and active discussions with customers on inspection of mobile towers, wind turbines and more, Ignitarium is looking to bring in higher levels of automation in infrastructure inspection solutions, thereby increasing RoI for our clients. Do reach out to Ignitarium (info@ignitarium) if you want to discuss your infrastructure inspection solution development needs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=206f3b559156" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D LiDAR SLAM — Loop Closure Explained | ignitarium.com]]></title>
            <link>https://medium.com/@Ignitarium/3d-lidar-slam-loop-closure-explained-ignitarium-com-f3fac2b8860a?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3fac2b8860a</guid>
            <category><![CDATA[aml]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[3d-lidar]]></category>
            <category><![CDATA[lidar]]></category>
            <category><![CDATA[autonomous-driving]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Fri, 17 May 2024 07:27:50 GMT</pubDate>
            <atom:updated>2024-05-17T07:27:50.995Z</atom:updated>
            <content:encoded><![CDATA[<h3>3D LiDAR SLAM — Loop Closure Explained | ignitarium.com</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ctPfSzdDHy9nPCQRWJ_D6w.png" /></figure><p>Author: Ayshabi M K</p><p><strong>Introduction:</strong></p><p>Robots are all equipped with simultaneous localization and mapping (SLAM) algorithms that help them build a map of its surroundings. For SLAM to produce reliable results, loop closure detection and correction are essential. This is done by recognizing previously visited areas or objects and updating its position and map as necessary. This blog article examines the idea of loop closure in 3D LiDAR SLAM algorithms and how it affects the performance of autonomous systems.</p><p><strong>What is Loop Closure?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/0*v0sNM-FDi_u8koge.png" /><figcaption>Fig 1: Illustrative diagram showcasing a loop closure example ( <a href="https://ml-retrospectives.github.io/neurips2020/camera_ready/21.pdf">Source</a> )</figcaption></figure><p>As shown in Fig.1, the robot’s path is shown with a black line, and the subset of robot’s positions are represented by triangles. The stars indicate recognizable features that could potentially lead to loop closures.</p><p>On the right side (Fig.1), the trajectory exhibits an error that arises from the accumulation of numerous small errors in estimating the robot’s position from one pose (triangle) to the next. Since the estimation of each subsequent pose relies on the estimation of the current pose, errors in previous estimations impact future estimations. It is important to note that certain trajectory segments may appear internally accurate, like the top right section correctly estimating a 90-degree left turn. However, due to preceding errors, these segments contribute to an increasing deviation from the ground truth.</p><p>On the left side of the diagram (Fig.1), a loop is detected, and a constraint is added to the optimization problem. This constraint represents the fact that the recognized feature (star) should appear in the same position in the global frame during its initial observation and subsequent observations. As a result, loop closure helps refine the following key features:</p><p><strong>1. Localization Accuracy:</strong></p><p>Reducing pose uncertainty and improving localization accuracy by correcting accumulated errors and drift, loop closure ensures that the estimated trajectory closely aligns with the actual path.</p><p><strong>2. Map Refinement:</strong></p><p>The quality of the generated map affects the overall understanding of the environment. Loop closure aids in refining the map by aligning overlapping regions and reducing inconsistencies. By merging information from different parts of the trajectory, loop closure improves the accuracy and consistency of the map, resulting in a more faithful representation of the environment.</p><p><strong>3. Robustness to Dynamic Environments:</strong></p><p>Real-world environments are often dynamic, with objects or scenes changing over time. Loop closure helps in handling these changes by differentiating between dynamic and static parts of the scene. By recognizing loop closures, the SLAM system can update the map, accordingly, ensuring that the generated map remains relevant and consistent despite environmental variations.</p><p><strong>4. System Stability:</strong></p><p>Without loop closure, SLAM algorithms can suffer from accumulated drift and errors, leading to unstable and unreliable performance. By periodically closing loops, the SLAM algorithm maintains a coherent trajectory and map representation. This stability ensures the long-term reliability of the system, especially in extended navigation scenarios.</p><p><strong>Challenges of Loop Closure</strong></p><p>Vision-based loop closure detection is a difficult task for long-term autonomous systems because of significant changes in viewpoint and appearance. When these systems revisit a location, they encounter variations in seasons, weather, lighting conditions, and viewpoints, as well as dynamic objects. These environmental changes pose challenges for robust place recognition. LiDAR, to some extent, can address these limitations as it is less affected by light and environmental changes compared to vision sensors. LiDAR provides a 360-degree field of view, unlike vision-based methods. However, research on LiDAR-based loop detection is relatively rare, possibly due to the high cost of LiDAR sensors, which limits their widespread use. Another reason is that LiDAR point clouds only contain geometric information, whereas images contain richer details. This makes place recognition a challenging problem when using point clouds.</p><p><strong>Types of LiDAR based Loop Closure Detection</strong></p><p>LiDAR-based loop detection can be broadly categorized into histogram-based and segmentation-based methods.</p><p><em>2.1. Histograms</em></p><p>Histograms are used to extract feature values from points in a point cloud map. These values are then encoded as descriptors using either global features or selected keypoints. One specific method called the normal distribution transform (NDT) histogram is used by these techniques. The NDT histogram represents the point cloud map using a compact set of normal distributions. In a study, the NDT histogram is applied to extract structural information from LiDAR scans by dividing them into overlapping cells. NDT is calculated for each cell, and histograms are created based on instances of specific classes of NDT within range intervals. To compare the histograms, the Euclidean distance metric is used. The study demonstrates that the structural information provided by the NDT histograms enhances the accuracy of the loop detection algorithm.</p><p>Histogram-based methods are effective in addressing two main challenges: handling large changes in viewpoint by being rotation-invariant and handling noise in spatial descriptors affected by the distance from LiDAR. However, these methods have a limitation in that they cannot capture the internal structure of a scene, which can lead to less distinctiveness and potentially false loop detections.</p><p><em>2.2 Segmentation</em></p><p>Loop detection methods that employ a point-cloud-segmentation approach focus on recognizing shapes or objects within the data. These methods typically involve a preprocessing step where the scene is segmented based on prior knowledge about the locations of objects. By segmenting the point cloud, these methods can create a more accurate representation of the scene, taking into account static and dynamic objects similar to how humans perceive their environment.</p><p>One advantage of segmentation-based techniques is their ability to compress the point cloud into distinctive features, which reduces the time required for matching and lowers the chances of false matches. Various segmentation methods have been proposed, including ground segmentation, cluster-all, and Gaussian process incremental sample consensus, among others.</p><p>An example of a segmentation-based approach is SegMatch, which uses the cluster-all method to segment the point cloud and extract features such as eigenvalue-based and shape histograms. However, SegMatch relies on real-time odometry for loop detection and may not perform well when using only the LiDAR sensor. The maps generated by SegMatch can also be less accurate.</p><p>Other studies have explored similar segmentation approaches to improve the robustness of loop closure detection by reducing noise and resolution effects. These methods encode topological information of segmented objects in the point cloud descriptors. However, the performance of these approaches may suffer if the segmentation information is insufficient.</p><p>Recent research proposes an optimized LiDAR odometry and mapping algorithm integrated with SegMatch-based loop detection to enhance robustness and pose optimization. False matches are addressed by applying ground plane constraints based on RANSAC. Another approach applies a coarse-to-fine strategy for loop detection, using lines, planes, and balls as coarse estimations instead of individual feature points. This reduces processing time while still enabling effective loop closure detection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*zhSrf87GwRWj-epI.png" /><figcaption>Fig 2: Block diagram of SegMatch<strong> ( </strong><a href="http://kth.diva-portal.org/smash/get/diva2:1377823/FULLTEXT01.pdf"><strong>Source</strong></a> )</figcaption></figure><p>Overall, segmentation-based methods offer the advantage of better representing the scene and reducing the likelihood of false matches, but they also require careful segmentation and can be affected by limitations such as reliance on real-time odometry and potential degradation in map accuracy.</p><p><strong>Deep Learning Based Loop Closure Detection</strong></p><p>Recently, deep learning has been used in visual and LiDAR SLAM systems to improve truly-closed-loop detection. These deep learning-based methods are designed to be more reliable when faced with changing environmental conditions, seasonal variations, and obstacles caused by moving objects. <br>To make histogram-based loop detection methods faster and more accurate in LiDAR-based loop closing, Zaganidis et al. developed a local descriptor called NDT histogram using semantic information obtained from PointNet++. Another study implemented PointNetVLAD, which combines PointNet and NetVLAD, to create a global descriptor from 3D point cloud data. LocNet also used a deep network to generate a global representation of scan maps for place matching and loop detection.</p><p>In deep learning-assisted segment-based loop detection methods, SegMap generates segments of the environment while the robot navigates and passes them to a deep neural network to generate a signature for each segment and the loop detection is performed by comparing the segmented signatures.</p><p><strong>Conclusion</strong></p><p>As pointed out, loop closure allows the SLAM algorithm to improve the map, improve localization accuracy, and correct cumulative errors in the predicted trajectory. Loop closure is also prevalent in commercial applications such as robotics, terrestrial mapping, AR/VR, etc. where episodic memory-based spatial reconstruction is essential.</p><p>Ignitarium’s Robotics and Perception AI Software team brings expertise on enabling the software stack for Autonomous Navigation, SLAM, Localization, Path Planning and Perception, making reliable implementations a reality, hence driving up ROI for adopters in the long run.</p><p><strong>References</strong><br><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7916334/#B58-sensors-21-01243">Role of Deep Learning in Loop Closure Detection for Visual and LiDAR SLAM: A Survey</a></p><ol><li><a href="http://webdiis.unizar.es/GRPTR/pubs/2008_Williams_RSS_IDA.pdf">A comparison of loop closing techniques in monocular SLAM</a></li><li><a href="https://ml-retrospectives.github.io/neurips2020/camera_ready/21.pdf">A Brief Survey of Loop Closure Detection: A Case for Rethinking Evaluation of Intelligent Systems</a></li><li><a href="https://www.thinkautonomous.ai/blog/loop-closure/">Introduction to Loop Closure Detection in SLAM</a></li><li><a href="http://kth.diva-portal.org/smash/get/diva2:1377823/FULLTEXT01.pdf">Visual-LiDAR SLAM with loop closure</a></li><li>Video Source: <a href="https://www.youtube.com/watch?v=OV6wNr62nqQ">3D LiDAR-SLAM With Loop Closure</a> <br>In the video, observe the robot’s movements as it drives through various locations. Suddenly, it encounters a familiar place and promptly recognizes it. This triggers a significant event known as loop closure. As a result, the robot proceeds to align the newly identified location with its existing map, resulting in the comprehensive update of the entire map. This process enables the robot to enhance its spatial understanding and refine its navigation abilities.</li></ol><p><em>Originally published at </em><a href="https://ignitarium.com/3d-lidar-slam-loop-closure-explained/"><em>https://ignitarium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3fac2b8860a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D LiDAR SLAM — Graph SLAM Explained | ignitarium.com]]></title>
            <link>https://medium.com/@Ignitarium/3d-lidar-slam-graph-slam-explained-ignitarium-com-94e199d90c22?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/94e199d90c22</guid>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Fri, 10 May 2024 06:03:42 GMT</pubDate>
            <atom:updated>2024-05-10T06:03:42.703Z</atom:updated>
            <content:encoded><![CDATA[<h3>3D LiDAR SLAM — Graph SLAM Explained | ignitarium.com</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*YCwbDKpGo9T3H8wzlbX9RA.png" /></figure><p>Author: Srichitra S</p><p>Graph-based SLAM (also known as Graph SLAM) uses a graph to represent the environment and the robot’s pose estimates. It is widely used in many robotics applications like autonomous vehicles, mobile robots and unmanned aerial vehicles. This blog discusses the basics of graph SLAM, its key components, working and applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*LaEeBkALiKmkr5J2.png" /><figcaption>Fig 1: Graph SLAM illustration in 2D. The blue triangles represent robot poses, and the red diamonds the landmarks positions. The solid lines represent the robot motion and the dashed lines the robot measurements [<a href="https://repositorio.uchile.cl/bitstream/handle/2250/139093/Graphslam-algorithm-implementation-for-solving-simultaneous-localization-and-mapping.pdf?sequence=1">source</a>]</figcaption></figure><p>Key Components of Graph SLAM</p><p>Graph SLAM involves several key components, including:</p><ol><li>Graph representation: The environment and robot’s pose estimates are represented as a graph, where each node represents a pose estimate, and each edge represents a measurement or a motion estimate between two poses. The graph is a mathematical model that allows us to represent and manipulate the information from the robot’s sensors and control inputs. The nodes in the graph represent the robot’s position and orientation in the environment, and the edges represent the constraints between these poses.</li><li>Motion model: The motion model is a mathematical model that predicts the pose of the robot based on previous pose estimate and control input obtained from sensors like wheel encoders or accelerometers. The motion model takes into account robot’s kinematics and dynamics to estimate the robot’s position and orientation in the environment.</li><li>Sensor model: The sensor model is a mathematical model that predicts the expected sensor measurement given the current pose estimate and the environment’s map. The sensor model is used to evaluate the consistency between the sensor measurements and the predicted measurements. If there is a mismatch between the predicted and actual measurements, the optimization algorithm adjusts the pose estimate to reduce the error.</li><li>Optimization algorithm: The optimization algorithm estimates the robot’s pose and the environment’s map by minimizing the error between the predicted and actual measurements. The error is represented as a cost function, which is minimized using optimization techniques such as gradient descent or Gauss-Newton. The cost function is a sum of the errors between the predicted and actual measurements, and it includes terms that account for the uncertainty in the sensor measurements and the motion estimates.</li><li>Error Function: Error ei is typically the difference between the predicted and actual measurement. It is assumed that the measurement error has zero mean and is normally distributed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/0*r81TKBbW03b2_k7E.png" /></figure><p>Where, z i is the observations or predicted measurements.</p><p>The goal is to find the Find the state x* which minimizes the error given all measurements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*yj2NYlx8CuBF2q07.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/0*tWQebAyYC3T2_4Jb.png" /></figure><p>A general solution is to derive the global error function and find its nulls. Then solve the problem by iterative local linearization.</p><p>6. Solving via iterative linearization: Linearize the error terms around the current solution (or the initial guess). Approximate the error functions around an initial guess x via Taylor expansion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/0*23ve-HICqBRrHMnN.png" /></figure><p>Now compute the first derivative of the squared error function which can be set to zero and the resulting linear system can be solved. Obtain the new state and keep iterating till we obtain a new state closer to the minimum.</p><p>Intuition behind Graph SLAM</p><ul><li>Use a graph to represent the problem</li><li>Every node in the graph will correspond to a pose of the robot</li><li>Every edge between two nodes represents a spatial constraint between them</li><li>A Graph-Based SLAM builds the graph and finds a node configuration that minimizes the error due to constraints. This best configuration will ensure that the real and predicted observations are as similar as possible.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/0*qh1whLwEBNy_Mkx9.png" /><figcaption>Fig 2: Graphical explanation [<a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwjk14Sf_vj-AhVt-TgGHXVrAGM4ChAWegQIDBAB&amp;url=https%3A%2F%2Fwww.unravel.rwth-aachen.de%2Fglobal%2Fshow_document.asp%3Fid%3Daaaaaaaaabebgwr%26download%3D1&amp;usg=AOvVaw05Scz0tAdtpxkN3pi8OKYA">source</a>]</figcaption></figure><p>Algorithm Break-down</p><p>Graph SLAM algorithm involves the following steps:</p><ol><li>Map initialization: The map is initialized with some prior knowledge or assumptions about the environment. The robot’s initial pose estimate is also obtained through some means, such as GPS, odometry, or motion sensors. Map initialization is important to provide a starting point for the optimization algorithm and to reduce the uncertainty in the robot’s pose estimate.</li><li>Graph construction: The robot moves in the environment and takes sensor measurements, which are used to construct the graph. Each node in the graph represents a pose estimate, and each edge represents a measurement or a motion estimate between two poses.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/0*wYCbycUKCxqyfh-D.png" /><figcaption>Fig 3: Front end and Back end of Graph SLAM [<a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwjk14Sf_vj-AhVt-TgGHXVrAGM4ChAWegQIDBAB&amp;url=https%3A%2F%2Fwww.unravel.rwth-aachen.de%2Fglobal%2Fshow_document.asp%3Fid%3Daaaaaaaaabebgwr%26download%3D1&amp;usg=AOvVaw05Scz0tAdtpxkN3pi8OKYA">source</a>]</figcaption></figure><p>3. Loop closure detection: As the robot moves, it may revisit a previously visited location. This is known as a loop. Loop closure detection detects loops in the robot’s trajectory and adds new edges to the graph, connecting the previously visited pose with the current pose estimate. Loop closure detection is important to reduce the accumulation of errors in the robot’s pose estimate, which can cause the robot to lose track of its position in the environment.</p><p>4. Optimization: The optimization algorithm estimates the robot’s pose and the environment’s map by minimizing the error between the predicted and actual measurements. This is achieved by iteratively adjusting the pose estimates and map parameters until the error is minimized.</p><p>5. Map update: The updated map is used to improve the robot’s pose estimate and sensor measurements. This completes a single iteration of the Graph SLAM algorithm.</p><p>6. Repeat steps 2–5 until convergence: Steps 2–5 are repeated until the error is minimized, or a certain convergence criterion is met.</p><p>In a SLAM process, a pose-graph representation [shown in figure 4] is used to represent the environment and the robot’s pose estimates. Each node corresponds to a pose estimate, and adjacent poses are connected by edges that represent spatial constraints between robot poses based on measurements. The edges connecting consecutive poses, denoted as e t-1 t , model odometry measurements, while the other edges represent spatial constraints resulting from multiple observations of the same part of the environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/0*t15BIc0uHDzE07sO.png" /><figcaption>Fig 4: In a SLAM process, a pose-graph representation [<a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwjc1anjt_n-AhULS2wGHVWOBHkQFnoECAkQAQ&amp;url=http%3A%2F%2Fwww2.informatik.uni-freiburg.de%2F~stachnis%2Fpdf%2Fgrisetti10titsmag.pdf&amp;usg=AOvVaw3_l9o1dOk82MwBGeOO-eE4">source</a>]</figcaption></figure><p>Applications of Graph SLAM</p><p>Graph SLAM has numerous applications in robotics, including:</p><ol><li>Autonomous Vehicles: Graph SLAM is used in self-driving cars to accurately estimate the vehicle’s position and map the environment in real-time.</li><li>Mobile Robots: Graph SLAM is used in mobile robots to create maps of indoor environments and assist in navigation.</li><li>Unmanned Aerial Vehicles: Graph SLAM is used in UAVs for mapping and exploration of unknown environments.</li><li>Virtual Reality: Graph SLAM is used in virtual reality to map virtual environments and track the user’s movement.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*995R55YV6xNWBaBf.png" /><figcaption>Fig 5: Map obtained by HDL Graph SLAM in an indoor environment [<a href="https://github.com/koide3/hdl_graph_slam">source</a>]</figcaption></figure><p>Conclusion</p><p>In conclusion, Graph SLAM is an effective approach for simultaneous localization and mapping in robotics. It uses a graph to represent the environment and the robot’s pose estimates and optimizes the graph to estimate the robot’s pose and the environment’s map. Graph SLAM has numerous applications in robotics, including autonomous vehicles, mobile robots, and unmanned aerial vehicles. With further research and development, Graph SLAM has the potential to significantly improve the accuracy and efficiency of robotic systems.</p><p>Ignitarium’s Robotics and Perception AI Software team brings expertise on enabling the software stack for Autonomous Navigation, SLAM, Localization, Path Planning and Perception, making reliable implementations a reality, hence driving up ROI for adopters in the long run.</p><p><em>Originally published at </em><a href="https://ignitarium.com/3d-lidar-slam-graph-slam-explained/"><em>https://ignitarium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94e199d90c22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D LiDAR SLAM — Scan Matching Explained]]></title>
            <link>https://medium.com/@Ignitarium/3d-lidar-slam-scan-matching-explained-a73aaa5acd1b?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/a73aaa5acd1b</guid>
            <category><![CDATA[visualslam]]></category>
            <category><![CDATA[aml]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[lidar]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Tue, 05 Mar 2024 04:16:38 GMT</pubDate>
            <atom:updated>2024-03-05T04:16:38.173Z</atom:updated>
            <content:encoded><![CDATA[<h3>3D LiDAR SLAM — Scan Matching Explained</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*P9UOOfPfk0-0qc3Le6oaKg.png" /></figure><p>Author: Srichitra S</p><p><strong>Introduction to SLAM</strong></p><p>Simultaneous Localization and Mapping (SLAM) is a popular technique in robotics that involves building a map of an unknown environment while simultaneously localizing the robot within that environment. This process is crucial for autonomous robots to navigate and operate effectively in complex, unstructured environments.</p><p>SLAM algorithms typically use sensors such as cameras, LiDARs, and/or odometry sensors to gather data about the environment and the robot’s motion. The gathered data is then processed to estimate the robot’s position and orientation in the environment, as well as to build a map of the environment.</p><p>The components of SLAM include the following:</p><ol><li>Sensor Data: LiDAR sensor data is used to measure distances to objects and generate 3D maps of the environment.</li><li>Localization: The LiDAR SLAM algorithm estimates the robot’s pose (position and orientation) in real-time based on the LiDAR point cloud.</li><li>Mapping: The point cloud generated from the LiDAR sensor is used to generate a map of the environment. (Read more about this subject in our <a href="https://ignitarium.com/visual-slam-possibilities-challenges-and-the-future/">blog on SLAM method</a> used for Mapping based on data acquired from one or more sensors.)</li><li>Scan Matching: The LiDAR SLAM algorithm uses scan matching to align consecutive LiDAR scans and estimate the robot’s pose.</li><li>Feature Extraction: Salient features are identified from the LiDAR point cloud, which may include corners, line segments, or other geometric features.</li><li>Feature Matching: The features from the current LiDAR scan are aligned with the features from the previous LiDAR scan to estimate the robot’s pose.</li></ol><p>You can further delve into the nuances of feature upgrades, which ensures more flexible, reliable, and safe robots that can perform a variety of tasks by collaborating with humans, ensuring reduced errors and enhanced safety in high-risk environments. To know more, read our blog on cobots and safety .</p><p>This blog discusses an important component of SLAM: <em>Scan Matching</em>, which involves aligning multiple scans (e.g., point clouds from a LiDAR) to estimate the robot’s pose. Scan matching is a critical step in SLAM because it allows the robot to determine its location within the environment.</p><p>The LiDAR sensor sends out a laser beam, which reflects off the objects in the environment and returns to the sensor. The sensor measures the time it takes for the laser to return and calculates the distance to the object. By rotating the LiDAR sensor, multiple scans can be taken from different angles, generating a point cloud of the environment. The point cloud is then used to generate a map of the environment and estimate the robot’s pose.</p><p>In the feature extraction stage, salient features are identified from the LiDAR point cloud. These features may include corners, line segments, or other geometric features that can be used to identify the environment’s structure. The features are then used to generate a map of the environment, which is then matched with the current LiDAR scan to estimate the robot’s pose.</p><p>In the feature matching stage, the goal is to align the extracted features from the current LiDAR scan with the features from the previous LiDAR scan.</p><p><strong>What is Scan Matching?</strong></p><p>Scan matching is a crucial component of LiDAR SLAM, which estimates the motion pose of the current frame by analyzing the relationship between adjacent frames. It is commonly used in precise positioning and 6DOF state estimation of unmanned vehicles like aerial, ground, and aquatic.</p><p><em>Iterative Closest Point </em>(ICP) and <em>Normal Distribution Transformation</em> (NDT) are popular scan-matching algorithms that are used for local scan matching. ICP aligns two frames of point clouds based on distance judgment, while NDT uses a Gaussian distribution to model point clouds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/0*kQbu_DIo1UtOLuia.png" /><figcaption>Fig 1: Scan Matching between two laser scans <a href="https://linklab-uva.github.io/autonomousracing/assets/files/L08-Scan%20Matching.pdf">source</a></figcaption></figure><p>Additionally, feature-based matching methods are also used, where features like line-plane features, viewpoint feature histograms, fast point feature histograms, 3D neighborhood point feature histograms, and density characteristics are utilized. The LOAM scheme is a well-known method that uses corner and plane point features for feature-based scan matching.</p><p>This blog discusses in detail ICP and NDT algorithms and their variants.</p><p><strong>ICP</strong></p><p>The ICP algorithm is based on a model where there are two point clouds, a source point cloud P = {p1, p2, p3, …, pm} and a target point cloud Q = {q1, q2, q3, …, qn }, both of which are subsets of R3. The goal of the algorithm is to find a transformation matrix T that minimizes the error E(T) between P and Q. The error E(T) can be represented by the following equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*zFrSEBGAz2u0SMdS.png" /></figure><p>where <strong>R </strong>is the rotation matrix, <strong>t </strong>is the translation matrix, <strong>p </strong>is the point in the source point cloud, and <strong>q </strong>is the nearest point in the target point cloud. <strong>R</strong>, <strong>t</strong> can be solved by minimizing the above error function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/0*E17Qx0HhmpjT0u0y.png" /></figure><p>The algorithm can be written as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*y9TN3yjEfwHaQwAG.png" /><figcaption>Fig 2: ICP algorithm <a href="https://www.mdpi.com/2077-1312/11/4/840">source</a></figcaption></figure><p><strong>NDT</strong></p><p>The NDT algorithm involves two point clouds, a source point cloud P = {p1, p2, p3, …, pm} and a target point cloud Q = {q1, q2, q3, …, qn }, both of which are subsets of R3. In this algorithm, the target point cloud is divided into voxels, and the midpoints of each voxel are used to calculate the probability density function (PDF) for each voxel. The PDF is based on the distribution of points within the voxel and is used to obtain the position of a point on the target point cloud through random processing of the D-dimensional normal distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/0*cG2mUsHXnispdJTY.png" /></figure><p>where <strong>D </strong>represents the dimension, <strong>µ </strong>and <strong>Σ </strong>represent the mean vector and covariance matrix of all points in the voxel where <strong>x </strong>is located, respectively, µ and Σ are calculated by the following formulas</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/0*sDa31NzREeGF3eL8.png" /></figure><p>q i = 1,,,,k is the position coordinates of all points contained in the voxel.</p><p>After the probability density function (PDF) is calculated for each voxel in the target point cloud, the NDT algorithm obtains the pose transformation <strong>T</strong> that maximizes the overall likelihood of the transformed source point cloud in its corresponding PDF. The transformed source point cloud is obtained by applying the pose transformation <strong>T </strong>to the source point cloud P. The goal of this step is to align the transformed source point cloud with the target point cloud by maximizing their overall likelihoods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/0*nl45SwHa-9iNhqXI.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*OKZ4VAqtuMIctUIJ.png" /><figcaption>Fig 3: NDT algorithm <a href="https://www.mdpi.com/2077-1312/11/4/840">source</a></figcaption></figure><p><strong>Comparing ICP and NDT</strong></p><ol><li>Efficiency: ICP is generally faster than NDT because it involves finding the nearest neighbors of points in the two-point clouds, which can be done efficiently using spatial data structures. In contrast, NDT involves voxelization and PDF calculation, which can be computationally expensive.</li><li>Robustness: NDT is more robust to noise and outliers in the point clouds because it models the distribution of points within each voxel using a PDF. This helps to reduce the effect of noise and outliers on the alignment process. ICP, on the other hand, is more sensitive to noise and outliers because it relies on finding the nearest neighbors of points in the two point clouds.</li><li>Accuracy: NDT can provide higher accuracy than ICP because it models the distribution of points within each voxel and can therefore capture the shape of the target object more accurately. ICP, on the other hand, relies on finding the closest point in the target cloud for each point in the source cloud, which may not always capture the full shape of the target object.</li><li>Applicability: ICP is more widely applicable than NDT because it can be used with any point cloud, regardless of the density and distribution of points. NDT, however, requires the target point cloud to be voxelated, which can limit its applicability in some scenarios.</li></ol><p><strong>ICP Variants</strong></p><p>The Iterative Closest Point (ICP) algorithm is widely used for point cloud registration in robotics and computer vision. However, it has several shortcomings, including sensitivity to the initial value, high computational overhead, easily being trapped in a local optimal solution, and a lack of utilization of point cloud structure information. To address these issues, experts and scholars have proposed various improved ICP algorithms.</p><p>One such improvement is the Point-to-Line ICP (PLICP) algorithm that replaces the point-to-point distance metric with point-line distance metric.This approach improves accuracy and requires fewer iterations but is more sensitive to initial values. Another improvement is the Point-to-Plane ICP (P2PL-ICP) algorithm, which uses the distance from the point to the surface instead of the distance from the point to the point to improve the convergence speed.</p><p>The Generalized-ICP (GICP) algorithm combines P2P-ICP and P2PL-ICP into a probabilistic framework based on which point cloud matching is carried out. The covariance matrix eliminates some bad corresponding points in the solution process. GICP algorithm can effectively reduce the impact of mismatches and is one of the most effective and robust algorithms among many improved ICP algorithms.</p><p>Other improvements include ICP using invariant features (ICPIF), Multi-scale ICP (MbICP), Normal-distributions transform (NDT), Continuous-ICP (CICP), Enhanced ICP, AA-ICP (using Anderson acceleration), and Robust ICP with Sparsity Induction Norms.</p><p><strong>NDT Variants</strong></p><p>The Normal Distribution Transform (NDT) algorithm was initially developed by Biber and Strasser for 2D scan matching, which was later extended to 3D by Magnusson et al. A comparison between NDT and ICP algorithms for 3D scan matching showed that NDT is faster and converges from a wider range of initial pose estimations, but its convergent pose is unpredictable and can generate worse results than ICP in case of failure. Several modifications and extensions have been proposed to improve the efficiency, accuracy, and robustness of NDT registration, including trilinear interpolation, multi-threading, semantic labeling, variable voxel size, multi-layer-based transformation, feature extraction, and probability-based point sampling. Some of these methods have shown better performance and higher accuracy than the classical NDT algorithm in specific applications. For example, the weighted NDT method uses the static probability of each point as a weight to improve classification accuracy, while the SEO-NDT algorithm and its FPGA implementation achieve faster processing of larger point clouds in real-time. The FGO-NDT algorithm uses factor graph optimization to eliminate pose drift error and improve local structure in large scenes.</p><p><strong>Conclusion</strong></p><p>In conclusion, ICP and NDT are two widely used scan-matching algorithms for point cloud registration in the field of robotics, autonomous driving, and computer vision. While ICP is a simple and fast algorithm, it has limitations when dealing with large point clouds, noisy data, and outliers. On the other hand, NDT, which is based on the normal distribution transform, has shown itself to be more robust and accurate in these challenging scenarios. NDT also performs better than ICP in terms of convergence rate and the ability to handle a wider range of initial pose estimations.</p><p>However, NDT has some drawbacks such as unpredictable convergence poses and longer computation time. To address these issues, various modifications and improvements have been proposed, including trilinear interpolation, semantic labels, variable voxel size, multi-layer-based transformation, and factor graph optimization. These modifications have significantly enhanced the efficiency and robustness of the NDT algorithm and made it suitable for real-time applications.</p><p>In summary, both ICP and NDT have their advantages and limitations, and the choice of the algorithm depends on the specific requirements of the application.</p><p>Ignitarium’s Robotics and Perception AI Software team brings expertise on enabling the software stack for Autonomous Navigation, SLAM, Localization, Path Planning and Perception, making reliable implementations a reality, hence driving up ROI for adopters in the long run.</p><p><em>Originally published at </em><a href="https://ignitarium.com/3d-lidar-slam-scan-matching-explained/"><em>https://ignitarium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a73aaa5acd1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Perceiving the World in-’Depth’ with 3D LiDAR | ignitarium.com]]></title>
            <link>https://medium.com/@Ignitarium/perceiving-the-world-in-depth-with-3d-lidar-ignitarium-com-b29917549f3d?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/b29917549f3d</guid>
            <category><![CDATA[automotive]]></category>
            <category><![CDATA[aml]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[3d-lidar]]></category>
            <category><![CDATA[lidar]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Fri, 09 Feb 2024 12:19:39 GMT</pubDate>
            <atom:updated>2024-02-09T12:20:42.368Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*RcsnhHA1nZB7u3rCQVVoJQ.png" /></figure><p>Author: Nirmal K A</p><ol><li><strong>Introduction</strong></li></ol><p>Simultaneous Localization and Mapping (SLAM) is a technology used in robotics and autonomous systems to create maps of unknown environments while simultaneously tracking the location of the robot within that environment. Technology has revolutionized robotics, enabling robots to operate autonomously in complex and dynamic environments where accurate mapping and positioning are critical. With the <strong>advancements</strong> in sensor technology and machine learning algorithms, the possibilities of SLAM have significantly increased in recent years, leading to the development of new applications and use cases.</p><p>One of the latest and most exciting developments in SLAM technology is the use of 3D LiDAR sensors. Unlike 2D LiDAR sensors, which only provide information about the distance and angle of objects in a plane, 3D LiDAR sensors can capture the full three-dimensional structure of an environment. This offers significant advantages in SLAM applications, allowing for more accurate and detailed maps of the environment, as well as improved localization and tracking capabilities. Additionally, 3D LiDAR SLAM can better handle dynamic environments, where changes in the environment occur frequently, and traditional 2D LiDAR SLAM may struggle to keep up. The use of 3D LiDAR sensors has opened new possibilities for robotics and autonomous systems, enabling them to operate in more complex and dynamic environments with greater accuracy and efficiency.</p><p>While 3D LiDAR SLAM can solve a lot of issues in mapping a localization, it does come at a cost: The computational requirements to make it real-time. The added efficiency and performance of all 3D SLAM algorithms demands much higher computational requirements which is a very important factor in designing a robotic system. So much research has been carried out / is going on to make LiDAR SLAM more effective and efficient in terms of the computational requirements.</p><p>This blog covers some general overview about the 3D LiDAR SLAM, comparison of two popular LiDAR SLAM algorithms in terms of performance and trends in SLAM with the advancements in modern technology and solutions.</p><p><strong>2. 3D LiDAR SLAM: Basic Steps</strong></p><p>The basic pipeline for 3D LiDAR SLAM involves the following steps:</p><p><strong>Data Acquisition</strong>: In this step, the 3D LiDAR sensor is used to obtain a 3D point cloud representation of the environment.</p><p><strong>Preprocessing</strong>: The raw point cloud data obtained from the LiDAR sensor is preprocessed to remove noise and outliers. The preprocessing step involves filtering, segmentation, and registration.</p><p><strong>Feature Extraction</strong>: The preprocessed point cloud data is then used to extract features that can be used to estimate the robot’s pose and map the environment. The features can be extracted using various techniques such as key point detection, edge detection, and surface detection. This is an optional step since there are algorithms that utilize the whole point cloud information to create better maps at the expense of high computational costs.</p><p><strong>SLAM Algorithm</strong>: The extracted features are then used by the SLAM algorithm to estimate the robot’s trajectory and map the environment. The SLAM algorithm uses various techniques such as pose graph optimization, loop closure detection, and bundle adjustment.</p><p><strong>Map Optimization</strong>: The estimated map is then optimized to improve its accuracy and consistency.</p><p><strong>Localization</strong>: The optimized map is then used to localize the robot in the environment.</p><p>The steps above are a framework of the whole process involved in 3D LiDAR SLAM but not the entire pipeline. Each algorithm for 3D LiDAR SLAM implements it in its own method contributing to all or some of the blocks of the generic pipeline.</p><p><strong>3. 3D LiDAR SLAM: Growing trends and Applications</strong></p><p>Even though SLAM is primarily targeted in robotics applications and autonomous vehicles/ robots, the trend is changing and now, there are various areas of applications coming into spotlight such as 3D Mapping, Digital Twin creation etc. Along with this the algorithms are also improving with time.</p><p>So, it’s better to select an algorithm for a particular application by understanding the algorithm and the target environment.</p><p>Almost all graph-based 3D LiDAR SLAM algorithms have a process called Scan Matching or Point cloud registration. Laser scan matching is a method for achieving laser SLAM data correlation. Without which the odometry estimation and the mapping part cannot work. It is defined as a set of translation and rotation parameters, so that the aligned two-frame scanning point cloud reaches the maximum overlap. Laser scan matching is divided into three categories:</p><ul><li><strong>Point-based scan matching</strong></li><li><strong>Feature-based scan matching</strong></li><li><strong>Scan matching based on mathematical characteristics</strong></li></ul><p><strong>Point-Based Scan Matching</strong></p><p>Point based Scan Matching, also known as scan-to-scan matching is an important technique in 3D LiDAR SLAM, as it allows the algorithm to estimate the robot’s pose and map the environment in real-time using the raw point cloud data obtained from the LiDAR sensor. However, point based Scan Matching is computationally expensive and can be sensitive to noise and measurement errors in the point cloud data, making it challenging to implement in real-world applications.</p><p><strong>Feature-Based Scan Matching</strong></p><p>Feature-based scan matching methods are typically based on flexible features such as normal and curvature, as well as custom feature descriptors. An example of this is the HSM (Hough Scan Matching) method, using the Hough transform to extract line segment features and matching in the Hough domain. By using the Loam (LiDAR odometry and mapping) algorithm and its improved algorithm, the LiDAR odometer is realized by matching feature points to edge segments and planes, and accurate results have been achieved in various scenarios.</p><p>These algorithms would be faster than the scan matching based algorithms since they are working on the extracted features rather than the full point cloud data in scan matching. ( feature to feature correspondence)</p><p><strong>Scan Matching Based on Mathematical Characteristics</strong></p><p>In addition to point-based scan matching and feature-based scan matching, there are a large class of scan matching methods that use various mathematical properties to characterize scan data and frames pose changes, the most famous of which is based on Normal Distributions Transform (NDT) and its improved versions.</p><p>The main difference between point based and feature based algorithms are the following:</p><ol><li>Point based algorithms can provide much denser maps than feature based methods since the points other than feature points (lines, curves, normal, surface/ planes etc.) are discarded in feature-based SLAM.</li><li>The point-based algorithms can function better in sparse point clouds, which makes it a better choice for large scale mapping such as in outdoor environments. Here the feature-based algorithms fail/ perform poorer due to the less availability of continuous/ long term visible features in the scans.</li><li>Feature based algorithms can work great in terms of speed and are mostly Realtime performers. The computational cost is also less when compared to point-based methods</li><li>Feature based methods can work nearly as good as point based methods in defined environments such as indoors. This, added with the low computational resource requirement and real-time capabilities, makes them a better candidate for such applications over the point-based methods.</li></ol><p>The following section compares the performance of two popular LiDAR SLAM algorithms: Fast LIO2, a point-based mapping algorithm and A-LOAM, a feature-based mapping algorithm.</p><p><strong>3. SLAM Algorithm Comparison</strong></p><p><strong>A-LOAM</strong></p><p>A-LOAM (Advanced LOAM) is a LiDAR-based SLAM algorithm that uses 3D point cloud data from a LiDAR sensor to estimate the pose (position and orientation) of a robot in an environment and simultaneously build a map of the environment. A-LOAM builds upon the LOAM algorithm (LiDAR Odometry and Mapping), which is a widely used LiDAR-based SLAM algorithm.</p><p>A-LOAM uses a feature-based approach for point cloud registration and feature extraction. It extracts features such as planes, edges, and corners from the point cloud data, and uses them to estimate the motion of the robot and the relative pose between consecutive LiDAR scans.</p><p><strong>Fast LIO 2</strong></p><p><strong>FAST-LIO</strong> (Fast LiDAR-Inertial Odometry) is a computationally efficient and robust LiDAR-inertial odometry package. Here, LiDAR feature points are fused with IMU data using a tightly coupled iterated extended Kalman filter to allow robust navigation in fast-motion, noisy or cluttered environments where degeneration occurs. Fast LIO 2 generates direct odometry by matching the scans to map on Raw LiDAR points, achieving better accuracy. Also, FAST-LIO2 can support many types of LiDAR including spinning (Velodyne, Ouster) and solid-state (Livox Avia, Horizon, MID-70) LiDAR, and can be easily extended to support more LiDAR since it does not require feature extraction.</p><p>The following are the comparison results of the algorithms on HIlti Public Dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/0*Toh19ScPXLOoaKuR.png" /><figcaption>Fig 1: Absolute Pose Error Comparison</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/0*ZliricnEri2yNCVb.png" /><figcaption>Fig 2: Relative Path Error Comparison</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*nw4JFCJcksC7t5KQ.png" /><figcaption>Fig 3: Fast LIO Absolute Pose Error</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*Nmts8UIwULRa0nxB.png" /><figcaption>Fig 4: A-LOAM Absolute Pose Error</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*wb1HRFjvIsZDRMxY.gif" /><figcaption>Fig 5: A-LOAM: Sample Map <a href="https://github.com/HKUST-Aerial-Robotics/A-LOAM)">Source</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PZuUdNW-f8QS67js.png" /><figcaption>Fig 6: Fast LIO 2: Sample Map <a href="https://github.com/hku-mars/FAST_LIO">Source</a></figcaption></figure><p>Based on the above comparisons and data, both algorithms showcase some capabilities. It is to be noted that both these algorithms have no loop closure module working to correct the error. While Fast LIO works on LiDAR and IMU data, A-LOAM is working purely on LiDAR Data. Thus, selecting a clear winner is not possible, which also wasn’t the point of this comparison.</p><p>The final takeaway is that the feature-based algorithms are good for navigation in structured environments with good number of features to grab, while point based algorithms are suitable for precise mapping. The speed of operation is also a parameter to consider and it’s promising that the point base algorithms are coming close to that of the feature-based algorithms.</p><p><strong>4. The Future of autonomous Navigation (LiDAR SLAM)</strong></p><p>Technology has been growing rapidly and more and more algorithms are coming out by making use of it. From sensor fusion to advanced hardware level acceleration, SLAM algorithms are also getting benefitted from that.</p><p>From the point where a single LiDAR was used, now SLAM systems have evolved to use multiple sensors of different and same kinds and perform much faster at near-real-time speeds. The usage of cameras, Inertial measurement systems (IMU), other sensors such as radar, in SLAM has been gaining popularity and solutions requiring high accuracy can rely on sensor fusion techniques that make use of them.</p><p>The advancements in deep learning are also enhancing the way in which maps are built using 3D LiDAR. From classifying objects in maps/ point clouds to removing dynamic obstacles and finding loop closures, deep learning is also finding its place in the slam domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8Muu_jDQIp8y9tOr.png" /><figcaption>Fig 7: An example is dynamic object removal in 3d maps using classical techniques. <a href="https://www.semanticscholar.org/paper/Remove%2C-then-Revert%3A-Static-Point-cloud-Map-using-Kim-Kim/0ef63c7e64f6aea9d1ec4d28364f5ccca67c1add">Source</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*q1jOTytLIrvtujEl.png" /><figcaption>Fig 8: A deep learning base SLAM with Semantic segmentation in point cloud using ( SuMa++) <a href="https://www.youtube.com/watch?v=uo3ZuLuFAzk">Source</a></figcaption></figure><p>The world of 3D LiDAR SLAM is getting more exciting as new sensors, new applications and new possibilities are coming out every day. 3D perception is the way for most of the outdoor robotics application and with the growing complexities of the indoor scenarios, 3D LiDARs would replace 2D sensors to add more efficiency and quality to the perception capabilities of the robots. Also, the advanced hardware acceleration capabilities of new -age compute platforms would help the algorithms perform better and faster.</p><p><strong>5. Conclusion</strong></p><p>It’s interesting to see how 3D SLAM algorithms are playing a crucial role in providing safer navigation solutions for autonomous robots. Moreover, they are also proving useful in a wide range of other applications as well. While there are several methods to achieve 3D SLAM, the ones involving 3D LiDARs are found to be much more efficient than the rest. Of course, there are limitations and drawbacks to using this technology, but there are workarounds that can be employed to overcome them. With the current technology available, there are a lot of possibilities to explore, but it’s important to keep in mind that the target application is the ultimate parameter when designing a localization/mapping solution using SLAM. It’s exciting to see how advancements in 3D SLAM will continue to shape and enhance the field of robotics and other industries that use this technology.</p><p>Ignitarium is a leading player in the field of 3D LiDAR technology, and we have spent the past four years perfecting our skills in 3D mapping, localization, and perception. Our expertise in using various types of 3D LiDARs sets us apart from the competition, and we have successfully and seamlessly integrated different sensors such as LiDAR, camera, IMU, radar, and more to create a comprehensive picture of the environment. We are also experts in navigating and mapping even the most complex scenarios, including GPS-denied environments.</p><p>One of our unique strengths is our deep learning-enabled perception capabilities, which enable us to adapt to various challenging requirements in autonomous navigation for both indoor and outdoor applications. By combining 3D LiDAR and other sensors, we can deliver exceptional results for our clients.</p><p><em>Originally published at </em><a href="https://ignitarium.com/perceiving-the-world-in-depth-with-3d-lidar/"><em>https://ignitarium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b29917549f3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Horizontal scaling of Video processing applications | ignitarium.com]]></title>
            <link>https://medium.com/@Ignitarium/horizontal-scaling-of-video-processing-applications-ignitarium-com-f7a9b49e3f35?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7a9b49e3f35</guid>
            <category><![CDATA[celery]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[video-processing]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Wed, 18 Oct 2023 07:35:33 GMT</pubDate>
            <atom:updated>2023-10-18T07:35:33.322Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*O1ujUZVlEX92xuKYr5a1pQ.png" /></figure><p>Author: Vishnu Dev</p><ol><li>Introduction</li></ol><p>Video is a common data input in the field of Computer Vision &amp; Image processing. For example, in applications such as infrastructure maintenance and defect detection, video is captured from a camera source mounted on a drone or a locomotive. The captured data passes through a software pipeline where numerous operations such as image transformations, ML (Machine Learning) inference and tracking are performed.</p><p>Video processing can be seen as a sequence of operations done repeatedly for each frame. Such a serial process is easy to implement, but not practical in most cases due to low performance. To make the processing faster and to keep the accuracy high, the optimum solution is to come up with a procedure that will allow the processing steps to run simultaneously. Here, high volume video data is taken and split into a number of smaller videos called chunks and processed in parallel.</p><p>2. Celery task queue</p><p>Celery is a distributed task queue with focus on real-time processing and task scheduling. Celery systems can consist of multiple workers and brokers, which leads to horizontal scaling and high availability. Using the in-built ‘pool’ option, Celery tasks can be run asynchronously.</p><p>Documentation on Celery workers can be found</p><p>You can read more on Celery in the following 2 Ignitarium blogs:</p><ol><li><a href="https://ignitarium.com/use-of-celery-in-serverless-systems-forscaling-ai-workloads/">Use of Celery in Serverless systems for scaling AI workloads</a></li><li><a href="https://ignitarium.com/a-hands-on-guide-to-backend-performance-optimization-of-a-saas-platform-for-scalable-ai-workloads/">A Hands-on Guide to Backend Performance Optimization of a SaaS platform for scalable AI workloads.</a></li></ol><p>In the subsequent sections, we’ll describe the use of Celery to manage the processing of video chunks.</p><p>3. Chunk processing</p><p>Before deep diving, let’s have clarity on chunks, and why we need it. After all, video is a sequence of frames captured and displayed at a given frame rate (FPS). Suppose we have enough compute servers in a cluster and our pipeline is set up for running inference, one simple method is to capture images, send them to each server asynchronously and wait for results. What are we missing here? There might be a relation between the current frame and a previous frame or a set of previous frames. Sending each image to servers individually means we are losing this valuable relation. For example, for tracking applications, it’s important to rely upon previous inference results to take a decision on current inference. This is exactly why we need chunk processing.</p><p>A chunk is a minimal representation of the original video. It should have all the properties of the original input video, ensuring that the previous information is not lost while calling the inference pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pykQSFa2hDyyEhbR.png" /><figcaption>Fig 1: Illustration of dividing a video into a number of chunks</figcaption></figure><p>In the example shown in Fig 1., an input video of 90 frames is split into 3 chunks. A fixed chunk size of 30 is selected with 1 overlapping frame across chunks. Note that the first chunk will not have an initial overlapping frame. Similarly, the last chunk has 32 frames and not the ‘fixed’ chunk size of 30 frames; this is because there are no more chunks after this one. The last chunk will have a size equal to the defined fixed chunk size plus the remaining frames for that video.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/0*Ck7zfvuHuDo0S9Q-.png" /><figcaption>Fig 2: Flow Diagram</figcaption></figure><p>Fig 2. describes the overall workflow, where the input video is split into “n” number of chunks, each having a fixed chunk size.</p><p>W 1, W 2, W 3, …. W n represents different Celery workers that process these chunks.</p><p>The main components in the pipeline are:</p><ul><li>Broker: Used for storing tasks. The default Celery broker is RabbitMQ</li><li>Backend: Stores results of task executions. Preferred Celery backend is Redis</li><li>Worker: Process that runs on CPU or GPU and executes task from the task queue</li></ul><p>3.1 Concurrency factor</p><p>Concurrency refers to the number of worker processes/threads. By default, multiprocessing is used to perform concurrent execution of tasks and concurrency defaults to the number of CPUs available on the machine.</p><ul><li>Concurrency can be set to high (4–8) for a relatively faster server.</li><li>Concurrency should be lower (~1) for relatively slower servers.</li><li>These worker configurations can be done at the time of worker bring-up.</li></ul><p>3.2 Network File System (NFS)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*5an1pICIN1Bdch6y.jpg" /><figcaption>Fig 3: NFS server-client, <a href="https://zindagitech.com/a-guide-to-network-file-systems-nfs-its-configuration/">Source</a></figcaption></figure><ul><li>NFS is a distributed file system protocol which allows you to mount remote directories on a server.</li><li>Storage space is managed in a central location with writes to this central storage occurring from multiple clients.</li></ul><p>All the machines in a cluster will use NFS. The input video to be processed will be stored on the shared NFS disk and will be accessible to all servers in the cluster. Chunks from this input video will be processed by workers within the cluster with temporary chunk results being written to the NFS-mounted shared space. For example, Chunk1 might be processed by Worker 1 (running on physical server 1) while Chunk 4 might be processed by Worker 4 (running on physical server 4).</p><p>3.3 Sequential Block</p><p>The Sequential block (Fig 2.) takes the results (video and other tracking results) from each chunk and generates a combined results video. This sequential block should not become a bottleneck in the entire pipeline. So, all the computationally expensive processes are performed by the pool of workers. The Sequential block just waits for the results to be generated by the worker pool and uses their references as input and then combines them sequentially to generate a single video. Per frame annotations on a global scale (w.r.t full video) will be stored in a dictionary (global dictionary).</p><p>3.4 Overlay Block</p><p>The Overlay module operates on chunks; for each chunk, this module will set the correct index to the global dictionary in order to extract the relevant annotations for a particular frame. The extracted information (eg. unique tile id on a rail track) will be overlayed on the video in such a manner that allows playback of either the entire video with all results annotated or only selected sections of the input video with its corresponding annotations.</p><p>4. Analysis</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*tAo_hYGMi7vkDS2o.png" /><figcaption>Table 1: Analysis of running the same video with different cluster sizes &amp; different chunks.</figcaption></figure><p>Table 1 describes the observations while running the pipeline on a full-length video (1800 frames) file.</p><ul><li>Each worker has been configured with custom concurrency values</li><li>Adding more workers to the cluster improves overall FPS</li><li>Increasing the number of chunks improves overall FPS</li><li>Setting low concurrency to the slow speed workers improved overall FPS</li></ul><p>5. Summary</p><p>Designing video processing pipelines at scale requires careful planning and proper testing. Instead of processing an entire video sequentially, chunk processing has significant benefits. Queue-based asynchronous methods like Celery is one of the best choices to consider for such use cases. Celery provides advanced features like autoscale, which can be leveraged to get maximum throughput and stability. This article described chunk based parallel processing of a single input video. This method of chunk processing is of even greater relevance when multiple input videos of large frame count are to be processed maintaining high processing throughput.</p><p><em>Originally published at </em><a href="https://ignitarium.com/horizontal-scaling-of-video-processing-applications/"><em>https://ignitarium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7a9b49e3f35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A guide to a Design Engineer’s approach to Failure Mode & Effects Analysis | ignitarium.com]]></title>
            <link>https://medium.com/@Ignitarium/a-guide-to-a-design-engineers-approach-to-failure-mode-effects-analysis-ignitarium-com-edc9b54991d6?source=rss-7867a99c2726------2</link>
            <guid isPermaLink="false">https://medium.com/p/edc9b54991d6</guid>
            <category><![CDATA[functional-safety]]></category>
            <category><![CDATA[rtl-design]]></category>
            <category><![CDATA[dfmea]]></category>
            <category><![CDATA[automotive]]></category>
            <dc:creator><![CDATA[Ignitarium]]></dc:creator>
            <pubDate>Tue, 19 Sep 2023 03:55:57 GMT</pubDate>
            <atom:updated>2023-09-19T03:55:57.708Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*mI1uiIAXt4WDwIJbaoHF2A.png" /></figure><p>Author: Harshith J</p><p><strong>Introduction</strong></p><p>In the automotive industry, safety plays an immensely crucial role. All critical systems of the automobile need to pass stringent functional safety requirements. Any existing or new feature addition needs to pass various tests to confirm that it complies with high-grade user safety. Hence, there is a need for strategic analysis of functional features before launching new automobiles to the public.</p><p><strong>DFMEA</strong></p><p>Design Failure Mode &amp; Effects Analysis (DFMEA) is a systematic analysis process where the potential failures are identified and evaluated. DFMEA projects the outcomes and effects of these failures by analyzing the overall design architecture of product systems and components. It specifies how to eliminate or minimize the possible effects of design failure. Basically, DFMEA lets us know about what might go wrong, how bad the effect may be and how to prevent or mitigate the failure. DFMEA helps engineers detect failures at the earliest possible moment so they can be corrected early, without significant cost.</p><p>The main strategic flow followed is:</p><ol><li>Failure mode: Listing all potential failures by analyzing in all possible ways.</li><li>Failure effects: The resulting consequences of each potential failure are noted.</li><li>Failure causes: Various reasons which might result in the above listed potential failures are derived.</li><li>Failure severity: A number from pre-defined range is assigned based on failure severity rate.</li></ol><p>Here we follow only Failure mode and Failure causes in DFMEA flow.</p><p><strong>Requirements and Specifications</strong></p><p>Each IP has a set of Component Requirements (CR), Component Safety Requirements (CSR) and Design specifications.</p><p>Component requirements (CR): A set of features/functionalities the IP is expected to possess. Example:</p><ul><li>Timer up/down counting support</li><li>Pre-scalar support</li><li>Timer start value</li></ul><p>Component safety requirements (CSR): A set of safety features/functionalities the IP is expected to possess. Example:</p><ul><li>Timer interrupt</li><li>Timer interrupt flag freeze</li><li>Reserved register access</li></ul><p>Design Specifications: Details of IP like Definitions, references, datasheet information, block diagram, Hardware-Software information, register information, microarchitecture and RTL hierarchy with waveforms</p><p><strong>RTL study</strong></p><p>RTL study is an important pre-requisite of DFMEA. This helps in analyzing the various IP sub-modules and their functional behavior. The IP’s RTL becomes easier to understand when we go through the specification and documentation of that IP in parallel. Spec details of IP module hierarchy and the explanation of each sub-modules and their main functional features aid in better understanding of RTL. A detailed fault and structural analysis in DFMEA process is achieved by understanding each feature implementation thoroughly. Module hierarchy is shown as element branches in DFMEA. Main functionalities, CR and CSR of IP are part of DFMEA function branches.</p><p><strong>DFMEA of IP</strong></p><p>We start the DFMEA of an IP by creating a mind map of its elements and functions. A primary node with IP name is created first and branched into — Elements and Functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*UrxMsyEjyTmJxNJB.png" /><figcaption>Fig 1. Elements and function split up</figcaption></figure><p>1. The sub modules of IP are listed as elements in the order<br>a. ‘E01’<br>b. ‘E02’<br>c. ‘E03’<br>and so on. These are called child elements.<br>Each element is further split into two branches — Element and Functions.</p><p>1.1 Sub-modules of the first child element are listed as elements in the order<br> a. ‘E011’<br> b. ‘E012’<br> c. ‘E013’ and so on. These are called super child elements.</p><p>1.1.1 If there are no further sub-modules then, we end the branch with ‘None’ node.</p><p>1.1.2 Various functional behavior of the first super child element is listed as ‘E011_F1’, ‘E011_F2’ and so on. Similarly functions of second super child element should be listed as ‘E012_F1’, ‘E012_F2’ and so on, and for third super child element, functions will be ‘E013_F1’, ‘E013_F2’ and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*dh91ySYy6JRfTSql.png" /><figcaption>Fig 2. Functions of child and super child elements</figcaption></figure><p>1.1.3 Each function can have several malfunctions. Malfunctions are listed assuming that all the inputs are correct. For example, if the function is ‘Generate interrupt on time out’, then the possible malfunctions could be:<br> a. Timer interrupt not generated on timeout.<br> b. Timer interrupt generated before/after timeout.<br>Malfunctions of super child elements are listed in the format — ‘E011_F1_M1’, ‘E011_F1_M2’, ‘E011_F2_M1,’ ‘E012_F1_M1’, ‘E012_F2_M1’, ‘E013_F1_M1,’ and so on. Malfunctions of first child element are listed in the format — ‘E01_F1_M1’, ‘E01_F1_M2’, ‘E01_F2_M1,’ and so on. Complete specifying malfunctions of each function corresponding to each super children (E011, E012, E013…) of first child (E01).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/0*Ml1JdzjzW3wVXOod.png" /><figcaption>Fig 3. Child element malfunctions</figcaption></figure><p>1.2 Similarly super child elements of second child will be ‘E021’, ‘E022’ and ‘E023’ respectively. Further divide these into elements and function as mentioned for first child element. Functions of first super child of second child (E02) will be in the form ‘E021_F1’, ‘E021_F2’……’E022_F1&#39;, ‘E022_F2’, and so on. Malfunctions will be named using ‘E021_F1_M1’, ‘E021_F1_M2’…. ‘E022_F1_M1’, ‘E022_F2_M1’, ‘E023_F1_M1’….. Similarly specify malfunctions of each function corresponding to each super children (E021, E022, E023…) of second child (E02).</p><p>1.3 The same process is continued for other child elements E03, E04, and so on.</p><p>2. After completing the element details, SR, CSR and primary functions of IP are noted under Functions tab in the order — ‘E0_F1’, ‘E0_F2’, ‘E0_F3’, ‘E0_F4’… and so on. These are called top-level functions. Malfunctions of these functions are listed in the format — ‘E0_F1_M1’, ‘E0_F1_M2’, ‘E0_F2_M1’, ‘E0_F3_M1’, ‘E0_F3_M2’, ‘E0_F4_M1,’ and so on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*11g7pKY7N5sc42Qn.png" /><figcaption>Fig 4. Top level functions</figcaption></figure><p>3. The malfunctions of the super child element (E011_F1_M1), that indirectly becomes the cause of child element malfunctions, are linked downwards to those appropriate child element malfunctions (E01_F1_M1). Parallelly, the functions of child elements (E01_F1), whose malfunctions are linked as stated before, are linked upwards to the corresponding super child element functions (E011_F1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*IWjvUY363qzJe05X.png" /><figcaption>Fig 5. Linking super child malfunctions</figcaption></figure><p>4. Similarly, the malfunctions of the child element (E01_F1_M1), that indirectly becomes the cause of top-level function malfunctions, are linked downwards to those appropriate top-level function malfunctions (E0_F1_M1). And the top-level functions (E0_F1), whose malfunctions are linked as stated before, are linked upwards to the corresponding child element functions (E01_F1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*YNDcrd0m1nV9WMX4.png" /><figcaption>Fig 6. Linking child element malfunctions</figcaption></figure><p>5. This process is repeated till all the IP sub modules and their functions are analyzed as mentioned above.</p><p>A ‘groovy’ script is run by highlighting the primary IP node. This script generates a list of function tree, connected functions, connected malfunctions, unconnected functions and unconnected malfunctions. This helps in simplifying the view of connected and unconnected links. Once the DFMEA is completed, this has to be reviewed and approved by the Design Inspector.</p><p><strong>Bug fix and Sanity checks</strong></p><p>The DFMEA file is shared and explained to verification engineers. Based on the various malfunctions created, they create multiple test cases and/or assertions re-creating these negative scenarios.</p><p>For example, General Purpose Timer either counts upwards or downwards and generates an interrupt on reaching either the maximum or minimum counter value. This interrupt stays high until it is cleared by the core.</p><p>This behavior can be tested with the help of ‘gpt_timeout_intr_clr_test’. The intention of this test is to cover and verify that after the timer reaches maximum or minimum value, timer interrupt is generated. Once the timer is generated, it should remain high until it is cleared by core. Assertions also can be used to check the interrupt behavior.</p><p>This test can be used as negative test for identifying malfunctions like ‘Timer Interrupt not triggered on counter expiry’ and ‘Timer interrupt not clearable.’</p><p>They also create additional testcases to ensure that component requirements and safety requirements are met. In case if there are any discrepancies in malfunction related tests, JIRA is created and reported to designer.</p><p>If there are no such test failures, then RTL is considered to be frozen and verification engineers concentrate on completing coverage aspect.</p><p>Next activity is to close pending IP JIRAs. For design fix, discuss the proposed changes to be made before committing. Update the fix and assign to Verification Engineer/Project manager by marking the JIRA status to ‘Resolved.’</p><p>Run Lint and CDC checks to make sure the design fixes do not yield any warnings or errors. To reduce the warnings/errors, either relevant fixes are made or they are waived after discussion.</p><p><strong>V-plan Review</strong></p><p>Various assertions, system level tests, block level tests and DFMEA malfunction-based tests are created and documented as Verification plan (V-plan). Multiple assertions/tests are added to ensure verification from various aspects and improve the test coverage. A more detailed explanation is provided in the verification document.</p><p><strong>Inspection and Signoff</strong></p><p>The Design Inspector finally verifies updated DFMEA file and reviews the malfunctions based test cases result and coverage. Once the report is clear, this IP is signed off for release.</p><p><strong>PROS</strong></p><ol><li>Disciplined manner of analysis</li><li>Very handy in risk analysis especially with new feature additions.</li><li>Early detection of potential threats. Its cause and effects are also mapped.</li></ol><p><strong>CONS</strong></p><ol><li>User-dependent depth analysis.</li><li>Usually, smaller details are ignored to reduce complexity.</li><li>Continuous updating is required for every new threat detected.</li></ol><p><strong>CONCLUSION</strong></p><p>All crucial systems of the automobile need to pass stringent functional safety requirements. Any existing or new feature addition needs to pass various tests to confirm that it complies to high grade user safety. Hence, there is a need for strategic analysis of functional features before launching automobiles to the public. There are several ways to test and verify the safety functions, one among them is DFMEA. DFMEA is a continuous, structured process useful in identifying potential failures of a system. DFMEA flow contains many sub-processes, some of them are — Function and requirement identification, listing failure and its effects, assigning priority ranks based on severity, design changes reviews to mitigate failures, actions completed and completion date.</p><p><strong>REFERENCES</strong></p><p><a href="https://www.ansys.com/en-in/blog/what-is-dfmea"><em>https://www.ansys.com/en-in/blog/what-is-dfmea</em></a></p><p><em>Originally published at </em><a href="https://ignitarium.com/a-guide-to-a-design-engineers-approach-to-failure-mode-effect-analysis/"><em>https://ignitarium.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edc9b54991d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>