Akiya-Research-Institute / NNEngine-Demo

Demo project for NNEngine
MIT License
10 stars 7 forks source link

running on new onnx model #5

Open antithing opened 6 months ago

antithing commented 6 months ago

Hi! And thank you for this code! I have the example running, and I now need to add this model:

https://github.com/opencv/opencv_zoo/tree/main/models/human_segmentation_pphumanseg

I am using this: https://www.youtube.com/watch?v=sTSlhYOePDE

as an example.

I want to :

load the model and init the engine. Pass a texture from a material graph through to the model return the mask into the material graph.

Thanks!

antithing commented 6 months ago

I have it running, thank you for the detailed documentation! However my output image looks like:

image

Close to what I expect! but doubled up. (Should be one person)

Input tensor:

FLOAT 192 192 3 1

Output tensor:

FLOAT 192 192 2 1

I have resized the output array to 192*192*2*1 and created a 192x192 grey output texture2D

What could be going wrong here?

Also Unreal crashes around 10 secs after running.

antithing commented 6 months ago

If I switch to a RGBA texture (create Texture 2d RGBA Float) as the output, I don't have any crash! And the image is:

image

(expected output would be one of those people)

which looks closer, but still incorrect...