Onnx with nms conversion problem

im training yolo V8 model , then i get the best.pt file now i want to convert it into onnx by keeping nms=true the input and output i expect is this:-

:inbox_tray: Model Inputs:
Input[0] Name: images, Shape: [1, 3, 480, 640], Type: tensor(float)
Input[1] Name: max_output_boxes_per_class, Shape: [1], Type: tensor(int64)
Input[2] Name: iou_threshold, Shape: [1], Type: tensor(float)
Input[3] Name: score_threshold, Shape: [1], Type: tensor(float)

:outbox_tray: Model Outputs:
Output[0] Name: valid, Shape: [‘Castvalid_dim_0’], Type: tensor(int64)
Output[1] Name: rois, Shape: [‘Gatherrois_dim_0’, 4], Type: tensor(float)
Output[2] Name: scores, Shape: [‘Gatherscores_dim_0’], Type: tensor(float)
Output[3] Name: class_ids, Shape: [‘Gatherclass_ids_dim_0’], Type: tensor(int64)
Output[4] Name: masks, Shape: [‘Reshapemasks_dim_0’, 120, 160], Type: tensor(float)

But instead i get this

:inbox_tray: Model Inputs:
Input[0] Name: images, Shape: [‘batch’, 3, ‘height’, ‘width’], Type: tensor(float)

:outbox_tray: Model Outputs:
Output[0] Name: output0, Shape: [‘batch’, ‘Concatoutput0_dim_1’, ‘anchors’], Type: tensor(float)

can anyone help me with this .

Why do you expect that input and output?

The output of ONNX with NMS is explained here:

Then what input and output should i expect and plz guide me what i have to do to get that kind of input and output

I linked the guide that explains the output from Ultralytics:

plz guide me what i have to do to get that kind of input and output

Ultralytics doesn’t provide support for those inputs and outputs that you listed in your post. I am not sure where you found those from and why you want those specifically. You should explain what you’re trying to do.