You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
use java sdk request tritonserver
sdk version:r23.10
tritonserver version: 23.10
try use java sdk request tritonsever,but Some abnormalities have occurred
error:
{"error":"in ensemble 'model_test', Runtime error: Critical error in pipeline:\nError when executing Mixed operator decoders__Image encountered:\nError in thread 2: [/opt/dai/dali/operators/decoder/nvjpeg/nvjpeg_decoder_decoupled_api.h:616] [/opt/dali/dali/image/jpeg.cc:125] Assert on "imgcodec::jpeg::GetImageInfo(encoded_buffer, length, &width, &height, &components) ==true" failed\nStacktrace (8 entries):\n[frame 0]: /opt/tritonserver/backends/dali/conda/envs/dalienv/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0xde4db) [0x7f89f450e4db]\n[frame 1]:/opt/tritonserver/backends/dali/conda/envs/dalienv/lib/python3.10/site-packages/nvidia/dali/libdali.so(+0x207ef2) [0x7f89f4637ef2]\n[frame 2]: /opt/tritonserver/backends/dali/conda/envs/dalienv/lib/ ...
java code:
InferenceServerClient client= new InferenceServerClient("127.0.0.1:8000", 20000, 20000);
// read image
BufferedImage image = ImageIO.read(new File("58.jpeg"));
ByteArrayOutputStream os = new ByteArrayOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
encoder.encode(image);
// input
InferInput input0 = new InferInput("images", new long[] {1, 3}, DataType.UINT8);
input0.setData(os.toByteArray(), true);
List inputs = Lists.newArrayList(input0);
//output
InferRequestedOutput output0 = new InferRequestedOutput("output0", true);
List outputs = Lists.newArrayList(output0);
// infer
InferResult result = client.infer("model_test", inputs, outputs);
model info:
name: "model_test"
platform: "onnxruntime_onnx"
max_batch_size : 4
input [
{
name: "images"
data_type: TYPE_FP32
dims: [ 3, -1, -1 ]
}
]
output [
{
name: "output0"
data_type: TYPE_FP32
dims: [ -1, -1 ]
}
]
Beta Was this translation helpful? Give feedback.
All reactions