Categories
Misc

Latest Releases and Resources: Feb. 11-18

Join the robotics deep dive with Jetson Developer Day at GTC; sign up for one of 45 full-day developer workshops at GTC.

Our weekly roundup covers the most recent software updates, learning resources, events, and notable news. 


Events

Take a Robotics Deep Dive with Jetson Developer Day at GTC

NVIDIA Jetson Developer Day is led by world-renowned experts in robotics, edge AI, and deep learning. This one-day event, at the start of GTC on Monday, March 21, gives a unique deep-dive into building next-gen AI-powered applications and autonomous machines.

Whether you are new to the Jetson platform or an advanced user, you will be among the first to hear about the latest hardware and software developments for robotics, computer vision, deep learning, and more. Attendees will learn about the newest addition to the NVIDIA Jetson family, AGX Orin. It’s the ideal solution for deploying AI at the edge for advanced robotics and autonomous machines in fields such as manufacturing, logistics, retail, agriculture, and beyond.

You are also invited to join the special developer breakout session at the end of the day. Interact directly with the Jetson product team and get answers to all your questions.

Register online: Jetson Developer Day at GTC


Workshops 

Get Hands-on DLI Training at GTC with Early-Bird Pricing

The Deep Learning Institute (DLI) is hosting 45 full-day workshops for developers at GTC.

The workshops are available in multiple languages and time zones, and participants can earn a DLI certificate of competency upon completion. Workshop topics include deep learning, cybersecurity, recommender systems, NLP, and more.

Early bird pricing for full-day workshops are just $99 until Feb. 28, 2022. The regular workshop rate is $149. The 2-hour DLI sessions are free with registration.

Learn more: Hands-on DLI Training at GTC


Categories
Misc

Autonomous AI Outraces Gran Turismo World Champs

The newly announced AI racer, Gran Turismo Sophy, uses deep reinforcement learning to beat human Gran Turismo Sport drivers in real-time competitions.

Gran Turismo (GT) Sport competitors are facing a new, AI-supercharged contender thanks to the latest collaborative effort from Sony AI, Sony Interactive Entertainment (SIE), and Polyphony Digital Inc., the developers behind GT Sport. 

The autonomous AI racing agent, known as Gran Turismo Sophy (GT Sophy), recently beat the world’s best drivers in GT Sport. Published in Nature, the work introduces a novel deep reinforcement-learning platform used to create GT Sophy and could spur new AI-powered experiences for players across the globe.

“Sony’s purpose is to ‘fill the world with emotion, through the power of creativity and technology,’ and Gran Turismo Sophy is a perfect embodiment of this,” Kenichiro Yoshida, Chairman, President and CEO, of Sony Group Corporation said in a press release.

“This group collaboration in which we have built a game AI for gamers is truly unique to Sony as a creative entertainment company. It signals a significant leap in the advancement of AI while also offering enhanced experiences to GT fans around the world.”

Smart gaming

AI is not new to gaming. In 2017, the Alpha Zero program from DeepMind made news when it learned to play and conquer chess, shogi (Japanese chess), and Go using deep reinforcement learning (deep RL.) 

An offset of machine learning, deep RL in basic terms uses a computational RL agent to make decisions by trial and error to solve a problem. With the introduction of deep learning into the algorithm, the agent makes decisions from very large datasets and decides on actions to reach its goal efficiently.

The Alpha Zero program used an algorithm where an untrained neural network played millions of games against itself, adjusting play based on its outcome.

Racing AI, however, poses more complicated inference needs with innumerable variables from different cars, tracks, drivers, weather, and opponents. As one of the most realistic driving simulators, GT Sport uses authentic race car and track dimensions, reproducing racing environments by also accounting for factors such as air resistance and tire friction.  

Reinforcing good behavior

Creating a racing agent capable of adjusting to real-time factors, the team trained GT Sophy on three specific skills—race car control, racing tactics, and racing etiquette using a newly developed deep RL algorithm. According to the project’s website, the algorithm uses the latest in reinforcement-learning techniques, to train a racing agent with rewards or penalties based on its actions.

“One of the advantages of using deep RL to develop a racing agent is that it eliminates the need for engineers to program how and when to execute the skills needed to win the race—as long as it is exposed to the right conditions, the agent learns to do the right thing by trial and error,” the researchers write in the study.

The team custom-built a web-based Distributed, Asynchronous Rollouts and Training (DART) platform to train GT Sophy on PlayStation 4 consoles using SIE’s worldwide cloud infrastructure researchers then used DART for collecting training data and evaluating versions of the agent.

Using this system, the researchers specify an experiment, run it automatically, and view data in a web browser. Each experiment uses a single trainer on a compute node with the cuDNN-accelerated TensorFlow deep learning framework and an NVIDIA V100 GPU, or half of an NVIDIA A100 GPU coupled with around eight vCPUs and 55 GiB of memory.  

“The system allows Sony AI’s research team to seamlessly run hundreds of simultaneous experiments while they explore techniques that would take GT Sophy to the next level,” according to the project’s website.

Supercharged GT Sophy 

In 2021, four of the world’s best GT Sport drivers competed against GT Sophy in two separate events. These competitions featured three racecourses, and four GT Sophy agents and cars. In its debut, GT Sophy excelled in timed trials but didn’t perform as well when challenging racers on the same track. 

The team made improvements based on the results of the first race, upgrading the training regime, increasing network size, adjusting features and rewards, and enhancing the opponents. 

The result led to a racing agent that could pass a human driver around a sharp corner, handle crowded starts, make slingshot passes out of the slipstream, and executive defensive maneuvers. The agent did this all while abiding by the subtle sportsmanship considerations human drivers understand and practice. It also bested top human drivers in timed trials and in an FIA-Certified Gran Turismo championship series. 

The paper reports that GT Sophy learns to get around a track in just a few hours. In about 2 days, it can beat about 95% of human players. Give it 10 to 12 days, about 45,00 driving hours, and GT Sophy equals or exceeds the top drivers in the world.  

With its racing prowess, the aim of GT Sophy is to make GT Sport more enjoyable, competitive, and educational. Some of the experts that competed against GT Sophy reported learning new approaches to turns and driving techniques.

The researchers also see the potential for deep RL to improve real-world applications of systems such as collaborative robotics, drones, or autonomous vehicles. 

The approximate Python code is available in the supplementary information section of the study.

Read the paper in Nature. >>
Read more. >>

Categories
Misc

What Is Edge AI and How Does It Work?

Recent strides in the efficacy of AI, the adoption of IoT devices and the power of edge computing have come together to unlock the power of edge AI. This has opened new opportunities for edge AI that were previously unimaginable — from helping radiologists identify pathologies in the hospital, to driving cars down the freeway, Read article >

The post What Is Edge AI and How Does It Work? appeared first on The Official NVIDIA Blog.

Categories
Misc

Three Approaches to Encoding Time Information as Features for ML Models

Learn the easier way to encode time-related Information by using dummy variables, cyclical coding with sine/cosine information, and radial basis functions.

Imagine you have just started a new data science project. The goal is to build a model predicting Y, the target variable. You have already received some data from the stakeholders/data engineers, did a thorough EDA, and selected some variables you believe are relevant for the problem at hand. Then you finally built your first model. The score is acceptable, but you believe you can do much better. What do you do?

There are many ways in which you could follow up. One possibility would be to increase the complexity of the machine-learning model you have used. Alternatively, you can try to come up with some more meaningful features and continue to use the current model (at least for the time being).

For many projects, both enterprise data scientists and participants of data science competitions like Kaggle agree that it is the latter – identifying more meaningful features from the data – that can often make the most improvement to model accuracy for the least amount of effort.

You are effectively shifting the complexity from the model to the features. The features do not have to be very complex. But, ideally, we find features that have a strong yet simple relationship with the target variable.

Many data science projects contain some information about the passage of time. And this is not restricted to time series forecasting problems. For example, you can often find such features in traditional regression or classification tasks. This article investigates how to create meaningful features using date-related information. We present three approaches, but we need some preparation first.

Setup and data

For this article, we mostly use very well-known Python packages as well as relying on a relatively unknown one, scikit-lego, which is a library containing numerous useful functionalities that are expanding scikit-learn’s capabilities. We import the required libraries as follows:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from datetime import date
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import FunctionTransformer
from sklearn.metrics import mean_absolute_error
from sklego.preprocessing import RepeatingBasisFunction

To keep things simple, we generate the data ourselves. In this example, we work with an artificial time series. We initiate by creating an empty DataFrame with an index spanning four calendar years (we use the pd.date_range). Then, we create two columns:

  • day_nr – a numeric index representing the passage of time
  • day_of_year – the ordinal day of the year

Lastly, we have to create the time series itself. To do so, we combine two transformed sine curves and some random noise. The code used for generating the data is based on the code included in scikit-lego’s documentation.

# for reproducibility
np.random.seed(42)

# generate the DataFrame with dates
range_of_dates = pd.date_range(start="2017-01-01",
                           	End="2020-12-30")
X = pd.DataFrame(index=range_of_dates)

# create a sequence of day numbers
X["day_nr"] = range(len(X))
X["day_of_year"] = X.index.day_of_year

# generate the components of the target
signal_1 = 3 + 4 * np.sin(X["day_nr"] / 365 * 2 * np.pi)
signal_2 = 3 * np.sin(X["day_nr"] / 365 * 4 * np.pi + 365/2)
noise = np.random.normal(0, 0.85, len(X))

# combine them to get the target series
y = signal_1 + signal_2 + noise

# plot
y.plot(figsize=(16,4), title="Generated time series");
A plot depicting the generated time series with cyclical patterns.
Figure 1: Generated time series.

Then, we create a new DataFrame, in which we store the generated time series. This DataFrame will be used for comparison of the models’ performance using the different approaches to feature engineering.

results_df = y.to_frame()
results_df.columns = ["actuals"]

Creating time-related features

In this section, we describe the three considered approaches to generating time-related features.

Before we dive right into it, we should define an evaluation framework. Our simulated data contains observations from a period of four years. We will use the first 3 years of generated data as the training set and we will evaluate on the fourth year. We will use the Mean Absolute Error (MAE) as the evaluation metric.

Below we define a variable that will serve us for cutting off the two sets:

TRAIN_END = 3 * 365

Approach #1: dummy variables

We start with something that you are most likely already familiar with, at least to some degree. The easiest way to encode time-related information is to use dummy variables (also known as one-hot encoding). Let’s look at an example.

X_1 = pd.DataFrame(
	data=pd.get_dummies(X.index.month, drop_first=True, prefix="month")
)
X_1.index = X.index
X_1

Below, you can see the output of our operation.

A DataFrame with dummy features created based on the month. There are 11 features, as we dropped one to avoid multicollinearity.
Table 1: DataFrame with month dummies.

First, we extracted the information about the month (encoded as an integer in the range of 1 to 12) from the DatetimeIndex. Then, we used the pd.get_dummies function to create the dummy variables. Each column contains information on whether the observation (row) comes from the given month or not.

As you might have noticed, we have dropped one level and only have 11 columns now. We have done that in order to avoid the infamous dummy variable trap (perfect multicollinearity), which can be an issue when working with linear models.

In our example, we used the dummy variable approach to capture the month in which the observation was recorded. However, this same approach could be used to indicate a range of other information from the DatetimeIndex. For example, the day/week/quarter of the year, a flag whether a given day is a weekend, the first/last day of a period, and much, much more. You can find a list containing all the possible features we can extract from the pandas documentation index, available at pandas.pydata.org.

Bonus tip: This is outside of the scope of this simple exercise, but in real-life scenarios, we can also use information about special days (think national holidays, Christmas, Black Friday, and so on) to create features. holidays is a nice Python library containing past and future information about special days per country.

As described in the introduction, the goal of feature engineering is to shift complexity from the model side to the feature side. That is why we will use one of the simplest ML models – linear regression – to see how well we can fit the time series using only the created dummies.

model_1 = LinearRegression().fit(X_1.iloc[:TRAIN_END],
                             	y.iloc[:TRAIN_END])

results_df["model_1"] = model_1.predict(X_1)
results_df[["actuals", "model_1"]].plot(figsize=(16,4),
                                    	title="Fit using month dummies")
plt.axvline(date(2020, 1, 1), c="m", linestyle="--");
The plot depicts the original time series together with the fit obtained using the dummy variables.
Figure 2: Fit using month dummies. The vertical line separates the training and test sets.

We can see that the fitted line already follows the time series quite well, though it is a bit jagged (step-like) – caused by the discontinuity of the dummy features. And that is what we will try to solve with the next two approaches.

But before proceeding it might be worth mentioning that when using non-linear models such as decision trees (or ensembles of thereof), we do not explicitly encode features such as month number or day of the year as dummies. Those models are capable of learning non-monotonic relationships between ordinal input features and the target.

Approach #2: cyclical encoding with sine/cosine transformation

As we have seen preceding, the fitted line resembles steps. That is because each dummy is treated separately with no continuity. However, there is a clear cyclical continuity present with variables such as time. What does that mean?

Imagine we are working with energy consumption data. When we include the information about the month of the observed consumption, it makes sense there is a stronger connection between two consecutive months. Using this logic, the connection between December and January and between January and February is strong. In comparison, the connection between January and July is not that strong. The same applies to other time-related information as well.

So how can we incorporate this knowledge into feature engineering? Trigonometric functions come to the rescue. We can use the following sine/cosine transformations to encode the cyclical time feature into two features.

def sin_transformer(period):
	return FunctionTransformer(lambda x: np.sin(x / period * 2 * np.pi))

def cos_transformer(period):
	return FunctionTransformer(lambda x: np.cos(x / period * 2 * np.pi))

In the snippet below, we copy the initial DataFrame, add the column with month numbers, and then encode both the month and day_of_year columns using the sine/cosine transformations. Then, we plot both pairs of curves.

X_2 = X.copy()
X_2["month"] = X_2.index.month

X_2["month_sin"] = sin_transformer(12).fit_transform(X_2)["month"]
X_2["month_cos"] = cos_transformer(12).fit_transform(X_2)["month"]

X_2["day_sin"] = sin_transformer(365).fit_transform(X_2)["day_of_year"]
X_2["day_cos"] = cos_transformer(365).fit_transform(X_2)["day_of_year"]

fig, ax = plt.subplots(2, 1, sharex=True, figsize=(16,8))
X_2[["month_sin", "month_cos"]].plot(ax=ax[0])
X_2[["day_sin", "day_cos"]].plot(ax=ax[1])
plt.suptitle("Cyclical encoding with sine/cosine transformation");
The plot depicts the features created using sine/cosine transformations. There are two cyclical curves for each of the considered frequencies: monthly and daily. The daily curves are much smoother.
Figure 3: Sine/cosine transformation based on monthly and daily frequencies.

There are two insights we can draw from the transformed data, which is plotted in Figure 3. The first is that we can easily see that the curves are step-wise when using the months for encoding but when using daily frequency, the curves are much smoother; Secondly, we can also see why we must use two curves instead of one. Due to the repetitive nature of the curves, if you drew a straight horizontal line through the plot for a single year, you would cross the curve in two places. This would not be enough for the model to understand the observation’s time point. But with the two curves, there is no such issue, and a user can identify every single time point. This is clearly visible when we plot the values of the sine/cosine functions on a scatter plot. In Figure 4 we can see the circular pattern, with no overlapping values.

 A scatter plot of the sine and cosine transformations. The points form a circular pattern.
Figure 4: A scatter plot of the sine and cosine transformations.

Let’s fit the same linear regression model using only the newly created features coming from the daily frequency.

X_2_daily = X_2[["day_sin", "day_cos"]]

model_2 = LinearRegression().fit(X_2_daily.iloc[:TRAIN_END],
                             	y.iloc[:TRAIN_END])

results_df["model_2"] = model_2.predict(X_2_daily)
results_df[["actuals", "model_2"]].plot(figsize=(16,4),
                                    	title="Fit using sine/cosine features")
plt.axvline(date(2020, 1, 1), c="m", linestyle="--");
The plot depicts the original time series together with the fit obtained using sine/cosine transformations as features.
Figure 5: Fit using sine/cosine transformations. The vertical line separates the training and test sets.

Figure 5 shows that the model is able to pick up the general trend of the data, identifying periods with higher and lower values. However, it appears that the magnitude of the predictions is less accurate, and at a glance, this fit appears worse than the one achieved using dummy variables (Figure 2).

Before we discuss the third feature engineering technique, it is worth mentioning that there is a serious drawback of this approach, which is apparent when using tree-based models. By design, the tree-based models make a split based on a single feature at the time. And as we have mentioned before, the sine/cosine features should be considered simultaneously in order to properly identify the time points within a period.

Approach #3: radial basis functions

The last approach uses radial basis functions. We will not go into much detail on what they actually are, but you can read a bit more on the topic here. Essentially, we again want to solve the issue we encountered with the first approach, that is, that there is a continuity to our time features.

We use the handy scikit-lego library, which offers the RepeatingBasisFunction class, and specify the following parameters:

  • The number of basis functions we want to create (we chose 12).
  • Which column to use for indexing the RBFs. In our case, that is the column containing information on which day of the year the given observation comes from.
  • The range of the input – in our case, the range is from 1 to 365. 
  • What to do with the remaining columns of the DataFrame we will use for fitting the estimator. ”drop” will only keep the created RBF features, ”passthrough” will keep both the old and new features.
rbf = RepeatingBasisFunction(n_periods=12,
                         	column="day_of_year",
                         	input_range=(1,365),
                         	remainder="drop")
rbf.fit(X)
X_3 = pd.DataFrame(index=X.index,
               	data=rbf.transform(X))

X_3.plot(subplots=True, figsize=(14, 8),
     	sharex=True, title="Radial Basis Functions",
     	legend=False);
 The plot depicts the 12 curves created using the radial basis functions. Each curve contains information about how close we are to a certain day of the year.
Figure 6: 12 radial basis functions.

Figure 6 shows the 12 radial basis functions that we have created using the day number as input. Each curve contains information about how close we are to a certain day of the year (because we chose that column). For example, the first curve measures distance from January 1, so it peaks on the first day of every year and decreases symmetrically as we move away from that date.

By design, the basis functions are equally spaced over the input range. We chose 12 as we wanted the RBFs to resemble months. This way, each function shows approximately (because of the months’ unequal length) the distance to the first day of the month.

Similar to the previous approaches, let’s fit the linear regression model using the 12 RBF features.

model_3 = LinearRegression().fit(X_3.iloc[:TRAIN_END],
                             	y.iloc[:TRAIN_END])

results_df["model_3"] = model_3.predict(X_3)
results_df[["actuals", "model_3"]].plot(figsize=(16,4),
                                    	title="Fit using RBF features")
plt.axvline(date(2020, 1, 1), c="m", linestyle="--");
The plot depicts the original time series together with the fit obtained using the RBF features.
Figure 7: Fit using radial basis functions. The vertical line separates the training and test sets.

Figure 7 shows that the model is able to accurately capture the real data when using the RBF features. 

There are two key parameters that we can tune when using radial basis functions:

  • the number of the radial basis functions,
  • the shape of the bell curves – it can be modified with the width argument of RepeatingBasisFunction.

One method for tuning these parameter values would be to use grid search to identify the optimal values for a given data set.

Final comparison

We can execute the following snippet to generate a numeric comparison of different approaches to encoding time-related information.

results_df.plot(title="Comparison of fits using different time-based features",
            	figsize=(16,4),
            	color = ["c", "k", "b", "r"])
plt.axvline(date(2020, 1, 1), c="m", linestyle="--");
The plot depicts the original time series together with the fits obtained using the three approaches to generating features from time data.
Figure 8: Comparison of the models’ fits obtained using different time-based features. The vertical line separates the training and test sets.

Figure 8 illustrates that the radial basis functions resulted in the closest fit from the considered approaches. The sine/cosine features allowed the model to pick up the main patterns but were not enough to capture the dynamics of the series entirely.

Using the snippet below, we calculate the Mean Absolute Error for each of the models, over both training and test sets. We expect the scores to be very similar between training and test sets, as the generated series is almost perfectly cyclical – the only difference between the years is the random component.

Naturally, that would not be the case in a real-life situation, in which we would encounter much more variability between the same periods over time. However, in such cases, we would also use many other features (for example, some measure of trend or the passage of time) to account for those changes.

score_list = []
for fit_col in ["model_1", "model_2", "model_3"]:
	scores = {
    	"model": fit_col,
    	"train_score": mean_absolute_error(
        	results_df.iloc[:TRAIN_END]["actuals"],
        	results_df.iloc[:TRAIN_END][fit_col]
    	),
    	"test_score": mean_absolute_error(
        	results_df.iloc[TRAIN_END:]["actuals"],
        	results_df.iloc[TRAIN_END:][fit_col]
    	)
	}
	score_list.append(scores)

scores_df = pd.DataFrame(score_list)
scores_df

As before, we can see that the model using RBF features resulted in the best fit, while the sine/cosine features performed the worst. Our assumption about the similarity of the scores between the training and test sets was also confirmed.

The model using RBF features performed best in terms of the fit. We obtained the worst fit using sine/cosine transformations.
Table 2: The comparison of the scores (MAE) from training/test sets.

Takeaways

  • We showed three approaches to encoding time-related information as features for machine learning models.
  • Aside from the most popular dummy-encoding, there are approaches that are better suited for encoding the cyclical nature of time.
  • When using those approaches, the granularity of the time interval greatly matters for the shape of the newly created features.
  • Using the radial basis functions, we can decide on the number of functions we want to use, as well as the width of the bell curves.

You can find the code used for this article on my GitHub. In case you have any feedback, I would be happy to discuss it on Twitter.

References

Categories
Misc

Performance You Can Feel: Putting GeForce NOW RTX 3080 Membership’s Ultra-Low Latency to the Test This GFN Thursday

GeForce NOW’s RTX 3080 membership is the next generation of cloud gaming. This GFN Thursday looks at one of the tier’s major benefits: ultra-low-latency streaming from the cloud. This week also brings a new app update that lets members log in via Discord, a members-only World of Warships reward and eight titles joining the GeForce Read article >

The post Performance You Can Feel: Putting GeForce NOW RTX 3080 Membership’s Ultra-Low Latency to the Test This GFN Thursday appeared first on The Official NVIDIA Blog.

Categories
Misc

Tiny ML Air Writing Recognition with Nicla Sense ME Experimenting with air-writing recognition on Arduino’s smallest board

Tiny ML Air Writing Recognition with Nicla Sense ME Experimenting with air-writing recognition on Arduino’s smallest board

Software: Neuton TinyML ; Hardware: Arduino Nicla Sense ME
Less than half a year ago, a new Arduino’s board, Nicla Sense ME (Motion & Environment), hit the market. And, needless to say, I couldn’t wait for a chance to try this brand new device and explore its capabilities.

https://preview.redd.it/7lase3m8m9i81.png?width=4032&format=png&auto=webp&s=dcfffd93b2bcd36d316bd0e8f6c6def9529f912b

Nicla Sense ME is currently the smallest board across the entire Arduino PRO family of boards for industrial applications. It comes with a range of Bosch Sensortec smart motion and environmental sensors, and I’m quite sure that this device will be widely applicable in industrial IoT, as it’s great for various research projects and commercial use.

Just have a look at its unique characteristics:

https://preview.redd.it/qbm46lham9i81.png?width=2087&format=png&auto=webp&s=4047e40673a1fd35f65d5b95dfe94ec8f1a74a1e

I’m really excited about the pace of development of the TinyML field because such small devices coupled with tiny machine learning capabilities indeed demonstrate enormous potential for many industries and domains.

Now, let me share my findings after an experiment with Nicla Sense ME.

Procedure:

In my experiment, I decided to play with in-air handwriting using an accelerometer-based pen device for handwriting recognition applications in order to test the ability of Nicla Sense ME to identify and process data about handwritten numbers on the edge. Compared to handwriting based on touch devices, this task is much more complex and challenging.

The device on which the experiment was carried out consisted of a triaxial accelerometer and Nicla Sense ME. The accelerations generated by hand motions were processed on MCU for further inference using the Neuton TinyML model.

Step 1: Model Training

For model training, I created my own dataset by capturing data containing 200 samples for each handwritten digit (from 0 to 9). Each sample was recorded for 2 seconds with a frequency of 100 Hz. It’s easy to calculate how many times I had to move my hands in the air to collect this data, and it’s even easier to imagine what my family members were thinking about me 🙂

https://reddit.com/link/su7ses/video/p881w4gdm9i81/player

Training Dataset

I merge captured samples to a single CSV file and add a target variable using Python script. The resultant dataset consisted of three features (accelerometer axes) and 400000 rows (200 samples by 200 rows for each digit).

I uploaded the dataset in a CSV format to the Neuton TinyML platform, selected the target variable (Digit), target metric (Accuracy). And then I enabled the TinyML option, selected 8-bit calculations without float support. For this case, I activated the Digital Signal Processing option for automatic data preprocessing and feature extraction. The model was trained automatically, and nothing needed to be compressed.

https://preview.redd.it/6i0b9wwem9i81.png?width=3360&format=png&auto=webp&s=61471080b1488adad165d4abe5884de16ebb3cb1

https://preview.redd.it/tytceu3gm9i81.png?width=3360&format=png&auto=webp&s=3c3d3d633f487fd59d8d23e6f71d7774fbfb78ad

https://preview.redd.it/m0v8n51hm9i81.png?width=3360&format=png&auto=webp&s=c8f8b913643a466bdb333e229702797a41686f96

The platform allows us to see a preprocessed dataset. It merged 200 samples in one row and added some statistical features (min, max, mean, etc.)

https://preview.redd.it/tfwbxdcim9i81.png?width=3344&format=png&auto=webp&s=d3ba39634e096d1e1d2c673967c031d59eebe037

I chose Neuton for this experiment since the platform automatically builds models that are optimal in size and accuracy. I also tried to train the same model with TensorFlow. Сheck out the comparison of the resultant metrics:

https://preview.redd.it/sku4h9yjm9i81.png?width=1686&format=png&auto=webp&s=48ea58ec626c59eee9ff1c3cfb717d90ea33375f

Just have a look at the dramatic difference in the number of coefficients, Neuton’s model has 42 times fewer coefficients than a TensorFlow one!

Step 2: Embedding into a Microcontroller

After the training was completed, I downloaded the archive containing all the necessary files for the embedding to the microcontrollers firmware project.

https://preview.redd.it/3p8vl22lm9i81.png?width=3358&format=png&auto=webp&s=85a7dc7f2ce1cca63b529623bee362e53157cd33

I uploaded all the components to GitHub so that you can easily replicate my experiment for yourself: https://github.com/Neuton-tinyML/nicla_digits

Step 3: Running On-device Inferences

I connected my device to a PC via USB to display inference results. Check out the outcomes of my experiment on the video below:

https://reddit.com/link/su7ses/video/7exhh13mm9i81/player

As you can see, the sensor accuracy is really high so it managed to identify all the numbers with great probability. The model operates right on the device and weighs about 1 KB. That’s what I call real TinyML!

Conclusion:

I believe that the future belongs to such incredibly tiny machine learning solutions. The ability to sense and accurately process various types of data in real-time, at low energy consumption but with high computing power opens up new opportunities in many fields. The implementation of such solutions can, for instance, streamline robotic science, ease the detection of seismic activities and dangerous gases in the air, advance IoT devices that we use on a daily basis, and a lot more — the scenarios are infinite! Isn’t that inspiring?

Please write in the comments below what other experiments you want me to do with Nicla Sense ME!

submitted by /u/literallair
[visit reddit] [comments]

Categories
Misc

AI Training Tips and Comparisons

AI Training Tips and Comparisons submitted by /u/Kagermanov
[visit reddit] [comments]
Categories
Misc

NVIDIA Announces Financial Results for Fourth Quarter and Fiscal 2022

Record quarterly revenue of $7.64 billion, up 53 percent from a year earlierRecord fiscal-year revenue of $26.91 billion, up 61 percentRecord quarterly and fiscal-year revenue for Gaming, Data …

Categories
Misc

TensorFlow Similarity Boost Machine Learning Model’s Accuracy Using Self-Supervised Learning

The practice of identifying raw data (such as pictures, text files, videos, etc.) and adding relevant and informative labels providing context to the given data is known as data labeling. It is employed to train the machine learning model in many use cases. For example, labels can be used in computer vision to identify whether a photograph has a bird or an automobile, in speech recognition to determine which words were spoken in an audio recording,

Overall, labeled datasets help train machine learning models to recognize and understand recurrent patterns in the input data. After being trained on labeled data, the ML models are able to recognize the same patterns in new unstructured data and produce reliable results. Continue Reading

submitted by /u/ai-lover
[visit reddit] [comments]

Categories
Misc

Different Types of Edge Computing

The types of edge computing and examples of use cases for each.

Many organizations have started their journey towards edge computing to take advantage of data produced at the edge. The definition of edge computing is quite broad. Simply stated, it is moving compute power physically closer to where data is generated, usually an edge device or IoT sensor.

This encompasses far edge scenarios like mobile devices and smart sensors, as well as more near edge use cases like micro-data centers and remote office computing. In fact, this definition is so broad that it is often talked about as anything outside of the cloud or main data center. 

With such a wide variety of use cases, it is important to understand the different types of edge computing and how they are being used by organizations today. 

Provider edge

The provider edge is a network of computing resources accessed by the Internet. It is mainly used for delivering services from telcos, service providers, media companies, or other content delivery network (CDN) operators. Examples of use cases include content delivery, online gaming​, and AI as a service (AIaaS). 

One key example of the provider edge that is expected to grow rapidly is augmented reality (AR) and virtual reality (VR). Service providers want to find ways to deliver these use cases, commonly known as eXtended Reality (XR), from the cloud to end user edge systems. 

In late 2021, Google partnered with NVIDIA to deliver high-quality XR streaming from Google Cloud NVIDIA RTX powered servers, to lightweight mobile XR displays. By using NVIDIA CloudXR to stream from the provider edge, users can securely access data from the cloud at any time and easily share high-fidelity, full graphics immersive XR experiences with other teams or customers.

Enterprise edge

The enterprise edge is an extension of the enterprise data center, consisting of things like data centers at remote office sites, micro-data centers, or even racks of servers sitting in a compute closet on a factory floor. This environment is generally owned and operated by IT as they would a traditional centralized data center, though there may be space or power limitations at the enterprise edge that change the design of these environments.

Retailers can use edge AI across their business for frictionless shopping, in store analytics as well as supply chain optimization.
Figure 1. Enterprises across all industries use edge AI to drive more intelligent use cases on site.

Looking at examples of the enterprise edge, you can see workloads like intelligent warehouses and fulfillment centers. Improved efficiency and automation of these environments requires robust information, data, and operational technologies to enable AI solutions like real-time product recognition.

Kinetic Vision helps customers build AI for these enterprise edge environments using a digital twin, or photorealistic virtual version, of a fulfillment or distribution center to train and optimize a classification model that is then deployed in the real world. This powers faster, more agile product inspections, and order fulfillments.

Industrial edge

The industrial edge, sometimes called the far edge, generally has smaller compute instances that can be one or two small, ruggedized servers or even embedded systems deployed outside of any sort of data center environment.

Industrial edge use cases include robotics, autonomous checkout, smart city capabilities like traffic control, and intelligent devices. These use cases run entirely outside of the normal data center structure, which means there are a number of unique challenges for space, cooling, security, and management.

BMW is leading the way with industrial edge by adopting robotics to redefine their factory logistics. Using different robots for parts of the process, these robots take boxes of raw parts on the line and transport them to shelves to await production. They are then taken to manufacturing, and finally returned back to the supply area when empty.

Robotics use cases require compute power both in the autonomous machine itself, as well as compute systems that sit on the factory floor. To optimize the efficiency and accelerate deployment of these solutions, NVIDIA introduced the NVIDIA Isaac Autonomous Mobile Robot (AMR) platform.

Accelerating edge computing

Each of these edge computing scenarios has different requirements, benefits, and deployment challenges. To understand if your use case would benefit from edge computing, download the Considerations for Deploying AI at the Edge whitepaper.

Sign up for Edge AI News to stay up to date with the latest trends, customers use cases, and technical walkthroughs.