We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
using SiaNet; using SiaNet.Application; using SiaNet.Common;
GlobalParameters.Device = CNTK.DeviceDescriptor.CPUDevice;
Logging.OnWriteLog += Logging_OnWriteLog;
string imagePath = "path-to-jpeg-or-png-image"; FastRCNN app = new FastRCNN(FastRCNNModel.Pascal); app.LoadModel();
var predictions = app.Predict(imagePath); foreach (var item in predictions) { Console.WriteLine("Category: {0}, Score: {1}, Bouding Box: x={2}, y={3}, w={4}, h={5}", item.Name, item.Score, item.BBox.X, item.BBox.Y, item.BBox.Width, item.BBox.Height); }
For grocery detection, just change the code:
FastRCNN app = new FastRCNN(FastRCNNModel.Grocery100);
private static void Logging_OnWriteLog(string message) { Console.WriteLine("Log: " + message); ; }