-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'tensorrt_bindings.tensorrt.ICudaEngine' object has no attribute 'get_binding_index' #4007
Comments
ref #3954 (comment) |
TensorRT 10.2.0 import os TRT_LOGGER = trt.Logger(trt.Logger.WARNING) def build_engine(onnx_file_path, engine_file_path):
def save_engine(engine, file_path): def load_engine(runtime, file_path): def allocate_buffers(engine, context, input_shape):
def do_inference(context, bindings, inputs, outputs, stream): def process_with_ai_engine(frame_rgb, engine, context, inputs, outputs, bindings, stream): def select_video(): def select_model(): def process_and_play_video_ffstream():
app = tk.Tk() video_path = tk.StringVar() tk.Label(app, text="Select Video File:").grid(row=0, column=0, padx=10, pady=10) tk.Label(app, text="Select ONNX Model File:").grid(row=1, column=0, padx=10, pady=10) tk.Button(app, text="Process and Play Video", command=process_and_play_video_ffstream).grid(row=2, columnspan=3, padx=10, pady=20) app.mainloop() This is the 2xCompact model. It's black. |
This is real-time playback. |
Are you still having this issue? Are you able to share the model? Does inference work using trtexec? |
TensorRT 10.2.0
#def process_with_ai_engine(frame_rgb, engine):
print("Processing frame with AI engine...")
input_name = 'input'
output_name = 'output'
↓
Traceback (most recent call last):
File "C:\Users\ryou\AppData\Local\Programs\Python\Python311\Lib\tkinter_init_.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "C:\Smooth Video\video_degradation_app\main.py", line 133, in process_and_play_video_ffstream
frame_rgb = process_with_ai_engine(frame_rgb, engine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Smooth Video\video_degradation_app\main.py", line 72, in process_with_ai_engine
input_binding_index = engine.get_binding_index(input_name)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'tensorrt_bindings.tensorrt.ICudaEngine' object has no attribute 'get_binding_index'
I don't understand this.
The text was updated successfully, but these errors were encountered: