YonghaoHe / LFFD-A-Light-and-Fast-Face-Detector-for-Edge-Devices

A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......
MIT License
1.31k stars 330 forks source link

Cuda 10.2+TensorRT 7.0.0.1, Inference issue, ValueError: could not broadcast input array from shape (3,4,3) into shape (3,4,1) #97

Open ashuezy opened 3 years ago

ashuezy commented 3 years ago
[TensorRT] WARNING: Current optimization profile is: 0. Please ensure there are no enqueued operations pending in this context prior to switching profiles
INFO:root:The size of input image is not 3x768.
The input image will be resized keeping the aspect ratio.
Traceback (most recent call last):
  File "predict_tensorrt.py", line 325, in <module>
    run_prediction_folder()
  File "predict_tensorrt.py", line 313, in run_prediction_folder
    bboxes = myInference.do_inference(im, score_threshold=0.6, top_k=1000, NMS_threshold=0.2, NMS_flag=True)
  File "predict_tensorrt.py", line 214, in do_inference
    input_batch[0, :, left_pad:left_pad + input_image.shape[1], :] = input_image
ValueError: could not broadcast input array from shape (3,4,3) into shape (3,4,1)