emgucv / emgutf

Emgu TF is a cross platform .Net wrapper for the Google Tensorflow library. Allows Tensorflow functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython.

Home Page:https://www.emgu.com/wiki/index.php/Emgu_TF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resnet can add Detect

jackswei opened this issue · comments

Resnet can add Detect , like

Tensor image = ReadTensorFromImageFile("test.jpg");

        Tensor[] finalTensor = TFSession.Run(
            new Output[] { TFGraph["image_tensor"] }, 
            new Tensor[] { image },
            new Output[] { TFGraph["detection_boxes"], TFGraph["detection_scores"],                TFGraph["detection_classes"], TFGraph["num_detections"] }
            );

        var boxes = (float[,,])finalTensor[0].JaggedData;
        var scores = (float[,])finalTensor[1].JaggedData;
        var classes = (float[,])finalTensor[2].JaggedData;
        var num = (float[])finalTensor[3].Data;

        Image resultImage = Image.FromFile("test.jpg");