Open kilievich-dmitriy-andreevich opened 1 month ago
session content:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209
{
"created_at": 1727025141,
"execution_count": 0,
"inputs": {
"images": "float32[1,3,1024,1024]"
},
"last_executed_at": 0,
"model": "mod_A",
"option": {
"cuda": false
},
"outputs": {
"output0": "float32[1,7,21504]"
},
"version": "v1"
}
Hi, @kilievich-dmitriy-andreevich
When attempting to run the ONNX session, you should send the following JSON as the post data:
{
"images": [
// shape 1
[
// shape 3
[
// shape 1024
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
... // 1024 arrays
],
[
// shape 1024
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
... // 1024 arrays
],
[
// shape 1024
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
[
//shape 1024
0,0,0,0,0,0, ... // 1024 float numbers
],
... // 1024 arrays
]
]
]
}
There is a (1024, 1024) shape in the data, which I assume refers to the width or height of the image.
Hello dear developers!
I ran into a problem when converting cv2.Mat in the picture
As I understand from your example,
what (x y z) these are (R G B) colors. I'm converting an image like in example, but I get an error:
Do you have any Python code that would be an example of checking from Mat images to json? Thank you in advance