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

how to get the output value including the tuple? #475

Open
khseob0715 opened this issue Jan 4, 2020 · 1 comment
Open

how to get the output value including the tuple? #475

khseob0715 opened this issue Jan 4, 2020 · 1 comment

Comments

@khseob0715
Copy link

khseob0715 commented Jan 4, 2020

I have used this library before.
Previously, it was easy to use because only one result was obtained.

I am currently trying to utilize Mask RCNN in unity
I've written some code, but there's a problem with the way I get the output.

`

runner.AddInput(graph["input_image"][0], input_image_tensor)
                      .AddInput(graph["input_image_meta"][0], input_image_meta_tensor)
                      .Fetch(graph["mrcnn_detection/Reshape_1"][0])
                      .Fetch(graph["mrcnn_class/Reshape_1"][0])
                      .Fetch(graph["mrcnn_bbox/Reshape"][0])
                      .Fetch(graph["mrcnn_mask/Reshape_1"][0]);


TFTensor mrcnn_detection = output[0];       
     // Returns: [batch, num_detections, (y1, x1, y2, x2, class_id, score)]  in python model.py
TFTensor mrcnn_class = output[1]; 
TFTensor mrcnn_bbok = output[2];
TFTensor mrcnn_mask = output[3];       
     // Returns: Masks [batch, num_rois, MASK_POOL_SIZE, MASK_POOL_SIZE, NUM_CLASSES]    in python model.py

Debug.Log(mrcnn_detection.GetValue(jagged: true).GetType());  // System.Single[][][]

`

I want to get the return value of detection, which is the first output.

This returns (float float tuple) at model.py on the mask rcnnn.

But, the Getvalue() returned the single[][][] types.

I don't know how to handle this output.

Please give me some advice.

Thank you in advance.

@chrigui94
Copy link

Hello @khseob0715,
did you find any solution to handle MaskRcnn model using TensorflowSharp? I have the same case and I am blocked.

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

2 participants