WARNING: To create TensorRT plugin nodes, please use the create_plugin_node
function instead.
UFF Version 0.6.5
=== Automatically deduced input nodes ===
[name: “Input”
op: “Placeholder”
attr {
key: “dtype”
value {
type: DT_FLOAT
}
}
attr {
key: “shape”
value {
shape {
dim {
size: 1
}
dim {
size: 3
}
dim {
size: 640
}
dim {
size: 640
}
}
}
}
]
Using output node NMS
Converting to UFF graph
Warning: No conversion function registered for layer: NMS_TRT yet.
Converting NMS as custom op: NMS_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_loc as custom op: FlattenConcat_TRT
WARNING:tensorflow:From /home/york/anaconda3/envs/tensorRT6.0/lib/python3.7/site-packages/uff/converters/tensorflow/converter.py:179: The name tf.AttrValue is deprecated. Please use tf.compat.v1.AttrValue instead.
Warning: No conversion function registered for layer: GridAnchor_TRT yet.
Converting GridAnchor as custom op: GridAnchor_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_conf as custom op: FlattenConcat_TRT
DEBUG [/home/york/anaconda3/envs/tensorRT6.0/lib/python3.7/site-packages/uff/converters/tensorflow/converter.py:96] Marking [‘NMS’] as outputs
No. nodes: 515
UFF Output written to /media/york/F/GitHub/tensorflow/train_model/ssd_mobilenet_v2_coco_focal_loss_trafficlight/export_train_bdd100k_baidu_truck_zl004_class4_wh640640_maxscale4_trainval299287_expansion_layer3_cosine_reducebox_v2_step320000-733/frozen_inference_graph.uff
UFF Text Output written to /media/york/F/GitHub/tensorflow/train_model/ssd_mobilenet_v2_coco_focal_loss_trafficlight/export_train_bdd100k_baidu_truck_zl004_class4_wh640640_maxscale4_trainval299287_expansion_layer3_cosine_reducebox_v2_step320000-733/frozen_inference_graph.pbtxt
[TensorRT] VERBOSE: Plugin Creator registration succeeded - GridAnchor_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - NMS_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - Reorg_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - Region_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - Clip_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - LReLU_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - PriorBox_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - Normalize_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - RPROI_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - BatchedNMS_TRT
[TensorRT] VERBOSE: Plugin Creator registration succeeded - FlattenConcat_TRT
TensorRT inference engine settings:
- Inference precision - DataType.FLOAT
- Max batch size - 1
…
[TensorRT] VERBOSE: UFFParser: BoxPredictor_2/Reshape/shape/3 →
[TensorRT] VERBOSE: UFFParser: Applying order forwarding to: BoxPredictor_2/Reshape/shape/3
[TensorRT] VERBOSE: UFFParser: Parsing BoxPredictor_2/Reshape/shape[Op: Stack]. Inputs: BoxPredictor_2/strided_slice, BoxPredictor_2/Reshape/shape/1, BoxPredictor_2/Reshape/shape/2, BoxPredictor_2/Reshape/shape/3
[TensorRT] VERBOSE: UFFParser: Applying order forwarding to: BoxPredictor_2/Reshape/shape
[TensorRT] VERBOSE: UFFParser: Parsing BoxPredictor_2/Reshape[Op: Reshape]. Inputs: BoxPredictor_2/BoxEncodingPredictor/BiasAdd, BoxPredictor_2/Reshape/shape
[TensorRT] VERBOSE: UFFParser: BoxPredictor_2/Reshape → [2400,1,4]
[TensorRT] VERBOSE: UFFParser: Applying order forwarding to: BoxPredictor_2/Reshape
[TensorRT] VERBOSE: UFFParser: Parsing concat_box_conf[Op: FlattenConcat_TRT]. Inputs: BoxPredictor_0/Reshape, BoxPredictor_1/Reshape, BoxPredictor_2/Reshape
[TensorRT] VERBOSE: UFFParser: Parsing Squeeze[Op: Squeeze]. Inputs: concat_box_conf
[TensorRT] VERBOSE: UFFParser: Squeeze → [124800,1,1]
[TensorRT] VERBOSE: UFFParser: Applying order forwarding to: Squeeze
[TensorRT] VERBOSE: UFFParser: Parsing GridAnchor[Op: GridAnchor_TRT].
[libprotobuf FATAL /externals/protobuf/x86_64/10.0/include/google/protobuf/repeated_field.h:1408] CHECK failed: (index) < (current_size):
Traceback (most recent call last):
File “/media/york/F/GitHub/tensorflow/models/research/auto_driving/uff_ssd-TensorRT-6.0.1.5/detect_objects_trafficlight_trt6.0.py”, line 266, in
main()
File “/media/york/F/GitHub/tensorflow/models/research/auto_driving/uff_ssd-TensorRT-6.0.1.5/detect_objects_trafficlight_trt6.0.py”, line 240, in main
batch_size=args.max_batch_size)
File “/media/york/F/GitHub/tensorflow/models/research/auto_driving/uff_ssd-TensorRT-6.0.1.5/utils/inference.py”, line 116, in init
batch_size=batch_size)
File “/media/york/F/GitHub/tensorflow/models/research/auto_driving/uff_ssd-TensorRT-6.0.1.5/utils/engine.py”, line 125, in build_engine
parser.parse(uff_model_path, network)
RuntimeError: CHECK failed: (index) < (current_size):
Process finished with exit code 1
my conf.py is like:
Input = gs.create_plugin_node(name=“Input”,
op=“Placeholder”,
dtype=tf.float32,
shape=[1, channels, height, width])
PriorBox = gs.create_plugin_node(name=“GridAnchor”, op=“GridAnchor_TRT”,
minSize=0.05,
maxSize=0.2,
aspectRatios=[1.0, 3.0, 0.33, 2.0, 0.5],
variance=[0.1,0.1,0.2,0.2],
#featureMapShapes=[19, 10, 5, 3, 2, 1],
featureMapShapes=[80, 40, 20],
numLayers=3
)
NMS = gs.create_plugin_node(
name=“NMS”,
op=“NMS_TRT”,
shareLocation=1,
varianceEncodedInTarget=0,
backgroundLabelId=0,
confidenceThreshold=1e-8,
nmsThreshold=0.6,
topK=100,
keepTopK=100,
numClasses=5,
inputOrder=[0, 2, 1],
confSigmoid=1,
isNormalized=1
)
concat_priorbox = gs.create_node(
“concat_priorbox”,
op=“ConcatV2”,
dtype=tf.float32,
axis=2
)
concat_box_loc = gs.create_plugin_node(
“concat_box_loc”,
op=“FlattenConcat_TRT”,
dtype=tf.float32,
axis=1,
ignoreBatch=0
)
concat_box_conf = gs.create_plugin_node(
“concat_box_conf”,
op=“FlattenConcat_TRT”,
dtype=tf.float32,
axis=1,
ignoreBatch=0
)
namespace_plugin_map = {
“MultipleGridAnchorGenerator”: PriorBox,
“Postprocessor”: NMS,
“Preprocessor”: Input,
“ToFloat”: Input,
“image_tensor”: Input,
“Concatenate”: concat_priorbox,
“concat”: concat_box_loc,
“concat_1”: concat_box_conf
}
what‘ the problem??? tensorflow detection model to tensorRT ,anyone can help?? my object is light, class is 4.