efficientvit
efficientvit copied to clipboard
What does this parameter mean
hi Thank you so much for your code
Export Decoder
trtexec --onnx=assets/export_models/sam/onnx/xl1_decoder.onnx --minShapes=point_coords:1x1x2,point_labels:1x1 --optShapes=point_coords:16x2x2,point_labels:16x2 --maxShapes=point_coords:16x2x2,point_labels:16x2 --fp16 --saveEngine=assets/export_models/sam/tensorrt/xl1_decoder.engine
What does this parameter mean point_coords:1x1x2,point_labels:1x1 point_coords:16x2x2,point_labels:16x2
Hi ghm666,
It determines the minimum and maximum number of points/boxes that the TensorRT engine can accept. A single point's coordinate is formatted as 1x1x2, and its label is formatted as 1x1. A single box's coordinate is formatted as 1x2x2, and its label is formatted as 1x2. By configuring the maxShapes as 16x2x2 for coordinates and 16x2 for labels, the engine can process a maximum of 16 points/boxes simultaneously. If you need to process more, you can increase this number.
Best, Zhuoyang
@zhuoyang20 Thank you very much for your reply
python vit_trt_inference.py --model xl1 --encoder_engine ./xl1_encoder.engine --decoder_engine ./xl1_decoder.engine --mode point --point [[[510,356,1],[749,748,0],[100,100,1]]] --img_path ./images/test_3.JPEG --out_path ./vit_trt_img.png
I performed a 3-point inference using the tensorRT model, and the following error occurred
[03/18/2024-09:53:16] [TRT] [E] 3: [executionContext.cpp::validateInputBindings::2016] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::validateInputBindings::2016, condition: profileMaxDims.d[i] >= dimensions.d[i]. Supplied binding dimension [1,3,2] for bindings[1] exceed min ~ max range at index 1, maximum dimension in profile is 2, minimum dimension in profile is 1, but supplied dimension is 3. )
[03/18/2024-09:53:16] [TRT] [E] 3: [executionContext.cpp::validateInputBindings::2016] Error Code 3: API Usage Error (Parameter check failed at: runtime/api/executionContext.cpp::validateInputBindings::2016, condition: profileMaxDims.d[i] >= dimensions.d[i]. Supplied binding dimension [1,3] for bindings[2] exceed min ~ max range at index 1, maximum dimension in profile is 2, minimum dimension in profile is 1, but supplied dimension is 3. )