Install-Package NboxTrainer -Version
dotnet add package NboxTrainer --version
<PackageReference Include="NboxTrainer" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NboxTrainer --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NboxTrainer,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install NboxTrainer as a Cake Addin
#addin nuget:?package=NboxTrainer&version=

// Install NboxTrainer as a Cake Tool
#tool nuget:?package=NboxTrainer&version=
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NBox Trainer

Nbox Trainer is library-wrapper for easy creating trainer ml models of image classification with GPU acceleration. Also you can test prediction with prediction service.

  • Microsoft.ML [1.5.4]
  • Microsoft.ML.ImageAnalytics [1.5.4]
  • Microsoft.ML.Vision [1.5.4]
  • SciSharp.TensorFlow.Redist-Windows-GPU [1.5.1]
  • CUDA 10.0;
  • Cudnn 7.6.4;
Example struct dataset
 |   +---daisy
 |   +---dandelion
 |   +---roses
 |   +---sunflowers
 |   +---tulips

All top subfolders of dataset catalog will use as label of categories

Example using trainer with fluent builder
 string dirDatasets = "D:\\Downloads\\flower_photos\\";

            TrainerService trainer = new TrainerService(AppContext.BaseDirectory, "flower")
                .setCriteriaEarlyStopping(new ImageClassificationTrainer.EarlyStopping(0.1F, 500,

            trainer.onStateChanged += state => { Console.Title = $"Current Stage: {state}"; };
            trainer.onTrainMetrics += Trainer_onTrainMetrics;

            await trainer.Train();
            var _metrics = await trainer.GetMetrics();
            await trainer.SaveModel();
Example using prediction service with fluent builder
   PredictorService service = new PredictorService("D:\\flower_photos\\test_fraction\\")
            service.onPrediction += prediction => Console.WriteLine(prediction);
            await service.Process();
/* output log with event onPrediction
*File:   100080576_f52e8ee070_n.jpg |  Predicted: daisy  |    Accuracy: 0,9956813
*File:   102841525_bd6628ae3c.jpg   |  Predicted: daisy  |    Accuracy: 0,99993706
*File:   105806915_a9c13e2106_n.jpg |  Predicted: daisy  |    Accuracy: 0,99083275
*File:   107592979_aaa9cdfe78_m.jpg |  Predicted: daisy  |    Accuracy: 0,9820342
*File:   113902743_8f537f769b_n.jpg |  Predicted: tulips |    Accuracy: 0,9946406
*File:   113960470_38fab8f2fb_m.jpg |  Predicted: tulips |    Accuracy: 0,9788831
*File:   116343334_9cb4acdc57_n.jpg |  Predicted: tulips |    Accuracy: 0,99646
*File:   122450705_9885fff3c4_n.jpg |  Predicted: tulips |    Accuracy: 0,9952939

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 190 1/10/2021 179 1/10/2021