[Bug/Feature Request] -Native TensorRT to support “string” datatype for CV models
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Description
This bug/feature request is for native TensorRT to support “string” datatype for object detection models.
Models trained with Google AutoML include string datatype (which is not supported by TensorRT). I have applied several methods (TF-ONNX-TRT, TF-UFF-TRT) to optimize the object detection model (trained with Google AutoML) and its variants (saved_model, frozen graph, onnx, tflite) without success. Also after applying Graph Surgeon (GS) to all of them it looks like even GS can’t fix the issue with the “String” datatype, see below the errors:
Errors with the saved_model (.pb) | TF->ONNX->TRT
a.TF-ONNX | Error - Tensorflow op [map/while/DecodeJpeg: DecodeJpeg] is not supported
b. ONNX-TRT | Error: Unsupported ONNX data type: STRING (8)
c. Graph Surgeon-ONNX-TRT | it didn’t pass the onnx checker: Error: ValidationError: No Op registered for DecodeJpeg
Errors with the frozen_graph (.pb) | TF-ONNX-TRT
a.ONNX-TRT | Error: Unsupported ONNX data type: STRING (8)
b.Graph Surgeon-ONNX-TRT | Found unsupported datatype (8) when importing initializer: encoded_image_string_tensor:0
Errors with TF-UFF-TRT
NOTE: UFF has been tested with TensorFlow 1.15.0. WARNING: The version of TensorFlow installed on this system is not guaranteed to work with UFF. Warning: No conversion function registered for layer: TensorArrayGatherV3 yet. Error: AttributeError: module 'tensorflow' has no attribute 'AttrValue'
Environment
TensorRT Version: 8.2.3
NVIDIA GPU: A2
NVIDIA Driver Version: 470.129.06
CUDA Version: 11.6
CUDNN Version:
Operating System: Ubuntu 18.04
Python Version (if applicable): 3.8.10
Tensorflow Version (if applicable): 2.7
PyTorch Version (if applicable): n/a
Baremetal or Container (if so, version): docker image nvcr.io/nvidia/tensorflow:22.02-tf2-py3
Relevant Files
Steps To Reproduce
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the reported TF-ONNX-TRT and TF-UFF-TRT conversion paths in the TensorRT 8.2.3, TensorFlow 2.7, and CUDA 11.6 environment, then reduce the Google AutoML object-detection model to a reproducible case. Done would require a defined native TensorRT path that accepts the string datatype without the reported DecodeJpeg, ONNX STRING, or UFF conversion errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100