Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lanreolokoba committed Dec 30, 2021
0 parents commit dbca4ea
Show file tree
Hide file tree
Showing 150 changed files with 5,026 additions and 0 deletions.
Binary file added .media/hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .media/wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
## 1.0.8
+ Fixed `Cannot deserialize graph` exception when deserializing cached predictors.
+ Fixed `MLModelData` being cached for `DRAFT` predictors.

## 1.0.7
+ Added `MLArrayFeature` constructor that accepts an `MLHubFeature` for working with Hub predictors.
+ Added `MLAudioFeature` constructor that accepts an `MLHubFeature` for working with Hub predictors.
+ Added `MLImageFeature` constructor that accepts an `MLHubFeature` for working with Hub predictors.
+ Added `MLTextFeature` constructor that accepts an `MLHubFeature` for working with Hub predictors.
+ Fixed `DirectoryNotFoundException` when loading cached `MLModelData` on iOS.
+ Removed prediction analytics reporting to NatML Hub, relieving network bandwidth pressure.
+ Removed `cache` flag in `MLModelData.FromHub` method.

## 1.0.6
+ Introduced Hub Predictors, which make predictions using server-side processing on [NatML Hub](https://hub.natml.ai).
+ Added `MLHubModel` class for authoring predictors that make cloud-based predictions using NatML Hub.
+ Added `MLEdgeModel` class for authoring predictors that make edge (on-device) predictions.
+ Added `IMLHubFeature` interface for creating server-side features when making predictions with NatML Hub.
+ Added `IMLEdgeFeature` interface for creating native features when making edge (on-device) predictions.
+ Added `MLTextType` feature type for inspecting `MLTextFeature` instances.
+ Added `MLModelData.tag` property to identify the predictor tag from [NatML Hub](https://hub.natml.ai).
+ Added `MLModel.metadata` dictionary for inspecting model metadata.
+ Added `MLArrayFeature.Squeeze` to remove singleton dimensions from an array feature.
+ Added `MLArrayFeature.Flatten` to flatten an array feature into one-dimensional array feature.
+ Added `MLArrayFeature.ToArray` to convert an array feature into a flattened primitive array.
+ Added `MLImageFeature.ToTexture` to convert an image feature into a `Texture2D`.
+ Added `MLImageType.FromType` static method for converting arbitrary feature types to image types.
+ Added implicit conversion from `MLFeatureType` to `bool` indicating if the type is non-`null`.
+ Added implicit conversion from `MLTextFeature` to `string`.
+ Fixed `MLImageType` image resolution constructor assuming planar format instead of interleaved format.
+ Moved `IMLPredictor` interface to the top-level `NatSuite.ML` namespace.
+ Moved `IMLAsyncPredictor` interface to the top-level `NatSuite.ML` namespace.
+ Deprecated `IMLModel` interface. Cast model to `MLEdgeModel` class instead.
+ Deprecated `IMLFeature` interface. Cast feature to `IMLEdgeFeature` interface instead.
+ Deprecated `MLPredictorExtensions.GetImageSize` static method. Use `MLImageType.FromType` instead.
+ Removed `MLModelData.FromFile` method. Use [NatML Hub](https://hub.natml.ai) instead.
+ Removed `MLModelData.FromStreamingAssets` method. Use [NatML Hub](https://hub.natml.ai) instead.
+ Removed `MLPredictorExtensions.SerializeAudio` method.
+ Removed `MLPredictorExtensions.SerializeImage` method.
+ Removed `MLModel` dictionary indexers. Use `MLModel.metadata` property instead.

## 1.0.5
+ Changed `MLImageFeature.mean` and `std` types to `Vector4` to support normalization for alpha channel.
+ Fixed bitcode not being generated for iOS `NatML.framework`.
+ Removed metadata accessors from `IMLModel` interface. Cast to `MLModel` instead.

## 1.0.4
+ Greatly improved performance and memory pressure when performing multi-indexing with `MLArrayFeature<T>`.
+ Added `MLPredictorExtensions.RectifyAspect` extension method for correcting detection rects from aspect-scaled images.
+ Fixed crash when making predictions with recurrent models on previous state features.
+ Fixed crash when getting native array feature shape for `MLArrayFeature<T>`.
+ Fixed memory leak when making predictions with image features on iOS and macOS.

## 1.0.3
+ Added `IMLAsyncPredictor` interface for making server-side ML predictions with NatML Hub.
+ Added `MLArrayFeature<T>` constructor which accepts a native array feature for easy interop.
+ Added multi-indexing support to `MLArrayFeature<T>` for post-processing native array features.
+ Added `MLArrayType.elementCount` property to get the total number of elements for an array type.
+ Added `MLArrayFeature<T>.shape` property which returns the feature type's shape for convenience.
+ Added `MLArrayFeature<T>.elementCount` property which returns the feature type's element count for convenience.
+ Added `MLArrayFeature<T>.CopyTo` method to copy feature data into an array.
+ Added `MLArrayFeature<T>.Permute` method to create a shallow array view with permuted dimensions.
+ Added `MLArrayFeature<T>.View` method to create a shallow array view with a different shape.
+ Added `MLPredictorExtensions.NonMaxSuppression` method for working with detection models.
+ Added `MLPredictorExtensions.GetImageSize` method for making predictions with image features.
+ Added `MLPredictorExtensions.SerializeAudio` method for making Hub predictions with audio features.
+ Added `MLPredictorExtensions.SerializeImage` method for making Hub predictions with image features.
+ Fixed `MLAsyncPredictor` predictions never completing if backing predictor encountered exception.

## 1.0.2
+ Added `MLModelData.audioFormat` property for working with audio and speech ML models.
+ Added `MLTextFeature` for working with natural language processing models.
+ Added NatML menu items for fetching access key, viewing models, and more.
+ Exposed `mean` and `std` arrays in `MLModelData.Normalization` struct for models that require arbitrary normalization.
+ Removed generic `MLClassificationPredictor` and `MLDenseClassificationPredictor` predictors.
+ Removed ability to specify class labels for local `.onnx` file in project. Use NatML Hub instead.

## 1.0.0
+ First release.
7 changes: 7 additions & 0 deletions Changelog.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Editor/Importers.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions Editor/Importers/CoreMLImporter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* NatML
* Copyright (c) 2021 Yusuf Olokoba.
*/

namespace NatSuite.ML.Editor.Importers {

using Hub;

#if UNITY_2020_2_OR_NEWER
using UnityEditor.AssetImporters;
#else
using UnityEditor.Experimental.AssetImporters;
#endif

[ScriptedImporter(1, @"coreml")]
internal sealed class CoreMLImporter : GraphImporter {

protected override Session CreateSession () => new Session {
predictor = new Predictor {
type = PredictorType.Edge,
status = PredictorStatus.Draft
},
platform = Platform.iOS
};
}
}
11 changes: 11 additions & 0 deletions Editor/Importers/CoreMLImporter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Editor/Importers/GraphImporter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* NatML
* Copyright (c) 2021 Yusuf Olokoba.
*/

namespace NatSuite.ML.Editor.Importers {

using System.IO;
using UnityEngine;
using Hub;

#if UNITY_2020_2_OR_NEWER
using UnityEditor.AssetImporters;
#else
using UnityEditor.Experimental.AssetImporters;
#endif

public abstract class GraphImporter : ScriptedImporter {

public sealed override void OnImportAsset (AssetImportContext ctx) {
var modelData = ScriptableObject.CreateInstance<MLModelData>();
modelData.session = CreateSession();
modelData.graph = File.ReadAllBytes(ctx.assetPath);
ctx.AddObjectToAsset("MLModelData", modelData);
ctx.SetMainObject(modelData);
}

protected abstract Session CreateSession ();
}
}
11 changes: 11 additions & 0 deletions Editor/Importers/GraphImporter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions Editor/Importers/ONNXImporter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* NatML
* Copyright (c) 2021 Yusuf Olokoba.
*/

namespace NatSuite.ML.Editor.Importers {

using Hub;

#if UNITY_2020_2_OR_NEWER
using UnityEditor.AssetImporters;
#else
using UnityEditor.Experimental.AssetImporters;
#endif

[ScriptedImporter(1, @"onnx")]
internal sealed class ONNXImporter : GraphImporter {

protected override Session CreateSession () => new Session {
predictor = new Predictor {
type = PredictorType.Edge,
status = PredictorStatus.Draft
},
platform = Platform.Windows
};
}
}
11 changes: 11 additions & 0 deletions Editor/Importers/ONNXImporter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions Editor/Importers/TFLiteImporter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* NatML
* Copyright (c) 2021 Yusuf Olokoba.
*/

namespace NatSuite.ML.Editor.Importers {

using Hub;

#if UNITY_2020_2_OR_NEWER
using UnityEditor.AssetImporters;
#else
using UnityEditor.Experimental.AssetImporters;
#endif

[ScriptedImporter(1, @"tflite")]
internal sealed class TFLiteImporter : GraphImporter {

protected override Session CreateSession () => new Session {
predictor = new Predictor {
type = PredictorType.Edge,
status = PredictorStatus.Draft
},
platform = Platform.Android
};
}
}
11 changes: 11 additions & 0 deletions Editor/Importers/TFLiteImporter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Editor/NMLMenu.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* NatML
* Copyright (c) 2021 Yusuf Olokoba.
*/

namespace NatSuite.ML.Editor {

using UnityEditor;

internal static class NMLMenu {

[MenuItem(@"NatML/NatML 1.0.8")]
private static void Version () { }

[MenuItem(@"NatML/NatML 1.0.8", true)]
private static bool DisableVersion () => false;

[MenuItem(@"NatML/Get Access Key")]
private static void OpenAccessKey () => Help.BrowseURL(@"https://hub.natml.ai/profile");

[MenuItem(@"NatML/Explore Models on Hub")]
private static void OpenHub () => Help.BrowseURL(@"https://hub.natml.ai");

[MenuItem(@"NatML/Join Discord Community")]
private static void OpenDiscord () => Help.BrowseURL(@"https://discord.com/invite/y5vwgXkz2f");

[MenuItem(@"NatML/View Online Documentation")]
private static void OpenDocs () => Help.BrowseURL(@"https://docs.natml.ai/unity");
}
}
11 changes: 11 additions & 0 deletions Editor/NMLMenu.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions Editor/NatSuite.ML.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "NatSuite.ML.Editor",
"references": [
"NatSuite.ML"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
7 changes: 7 additions & 0 deletions Editor/NatSuite.ML.Editor.asmdef.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dbca4ea

Please sign in to comment.