PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.83k stars 2.89k forks source link

ValueError: cannot reshape array of size 1 into shape (4) in layout analysis #7648

Open TapendraBaduwal opened 1 year ago

TapendraBaduwal commented 1 year ago

After running below script python3 deploy/python/infer.py --model_dir=output_inference/picodet_lcnet_x1_0_layout/ --image_file=./docs/images/layout.jpg --device=CPU

Error msg

batch_size: 1 camera_id: -1 combine_method: nms cpu_threads: 1 device: CPU enable_mkldnn: False enable_mkldnn_bfloat16: False image_dir: None image_file: ./docs/images/layout.jpg match_metric: ios match_threshold: 0.6 model_dir: output_inference/picodet_lcnet_x1_0_layout/ output_dir: output overlap_ratio: [0.25, 0.25] random_pad: False reid_batch_size: 50 reid_model_dir: None run_benchmark: False run_mode: paddle save_images: True save_mot_txt_per_img: False save_mot_txts: False save_results: False scaled: False slice_infer: False slice_size: [640, 640] threshold: 0.5 tracker_config: None trt_calib_mode: False trt_max_shape: 1280 trt_min_shape: 1 trt_opt_shape: 640 use_coco_category: False use_dark: True use_gpu: False video_file: None window_size: 50 ----------- Model Configuration ----------- Model Arch: PicoDet Transform Order: --transform op: Resize --transform op: NormalizeImage --transform op: Permute --transform op: PadStride Traceback (most recent call last): File "deploy/python/infer.py", line 1054, in main() File "deploy/python/infer.py", line 1022, in main detector.predict_image( File "deploy/python/infer.py", line 402, in predict_image result = self.postprocess(inputs, result) File "deploy/python/infer.py", line 658, in postprocess np_boxes, np_boxes_num = postprocessor(np_score_list, np_boxes_list) File "/content/PaddleDetection/deploy/python/picodet_postprocess.py", line 160, in call box_distance = np.sum(box_distance, axis=1).reshape((-1, 4)) ValueError: cannot reshape array of size 1 into shape (4)

1061302569 commented 1 year ago

Hi,guy in runtime.yml post_process change to False

TapendraBaduwal commented 1 year ago

@1061302569 Thank you issue solved.

checkking commented 7 months ago

@TapendraBaduwal 最新的版本还有这个问题呢