Hello.I have raspberry pi 5 with hailo 8l.I have converted my yolov8n.pt to yolov8n.hef.I want to detect objects using source code from github but I have error message about source code from github.How can I solve that?
Code:
resized_img = cv2.resize(frame, (INPUT_RES_H, INPUT_RES_W), interpolation = cv2.INTER_AREA)
with InferVStreams(network_group, input_vstreams_params, output_vstreams_params) as infer_pipeline:
input_data = {input_vstream_info.name: np.expand_dims(np.asarray(resized_img), axis=0).astype(np.float32)}
with network_group.activate(network_group_params):
infer_results = infer_pipeline.infer(input_data)
# create dictionary that returns layer name from tensor shape (required for postprocessing)
layer_from_shape: dict = {infer_results[key].shape:key for key in infer_results.keys()}
Error Message:
Exception has occurred: AttributeError
‘list’ object has no attribute ‘shape’
File “/home/halil/hailo_platform_venv/son.py”, line 67, in
layer_from_shape: dict = {infer_results[key].shape:key for key in infer_results.keys()}
^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/halil/hailo_platform_venv/son.py”, line 67, in
layer_from_shape: dict = {infer_results[key].shape:key for key in infer_results.keys()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: ‘list’ object has no attribute ‘shape’