Skip to content
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

模型导出后进行预测,报MemoryError: std::bad_alloc的错误 #9241

Open
1 task done
mayun123 opened this issue Dec 13, 2024 · 3 comments
Open
1 task done
Assignees

Comments

@mayun123
Copy link

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

执行命令python deploy/python/infer.py --model_dir=infer_model/rtdetr_r50vd_6x_coco_water --image_file=test_img/img/300874.jpg --device=GPU

结果报错,显示如下
----------- Running Arguments -----------
action_file: None
batch_size: 1
camera_id: -1
collect_trt_shape_info: False
combine_method: nms
cpu_threads: 1
device: GPU
enable_mkldnn: False
enable_mkldnn_bfloat16: False
image_dir: None
image_file: test_img/img/300874.jpg
match_metric: ios
match_threshold: 0.6
model_dir: infer_model/rtdetr_r50vd_6x_coco_water
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]
task_type: Detection
threshold: 0.5
tracker_config: None
trt_calib_mode: False
trt_max_shape: 1280
trt_min_shape: 1
trt_opt_shape: 640
tuned_trt_shape_file: shape_range_info.pbtxt
use_coco_category: False
use_dark: True
use_fd_format: False
use_gpu: False
video_file: None
window_size: 50

----------- Model Configuration -----------
Model Arch: DETR
Transform Order:
--transform op: Resize
--transform op: NormalizeImage
--transform op: Permute

Traceback (most recent call last):
File "deploy/python/infer.py", line 1266, in
main()
File "deploy/python/infer.py", line 1199, in main
detector = eval(detector_func)(
File "deploy/python/infer.py", line 108, in init
self.predictor, self.config = load_predictor(
File "deploy/python/infer.py", line 1098, in load_predictor
predictor = create_predictor(config)
MemoryError: std::bad_alloc

@mayun123
Copy link
Author

换了一个模型yolov3_darknet53_270e_coco,报同样的错MemoryError: std::bad_alloc,执行命令
python deploy/python/infer.py --model_dir=./inference_model/yolov3_darknet53_270e_coco --image_file=./demo/000000014439.jpg --device=CPU

paddle版本3.0.0b1,paddledetection版本2.7

@mayun123
Copy link
Author

换了3个不同的paddle版本2.6.2和3.0.0b1以及3.0.0b2,re-detr模型都不行

@leo-q8
Copy link
Collaborator

leo-q8 commented Dec 20, 2024

试试更早版本的的paddle吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants