Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resnet can add Detect #54

Open
jackswei opened this issue Dec 30, 2020 · 0 comments
Open

Resnet can add Detect #54

jackswei opened this issue Dec 30, 2020 · 0 comments

Comments

@jackswei
Copy link

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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant