PaddleX icon indicating copy to clipboard operation
PaddleX copied to clipboard

C# 初始化模型出错

Open Code-WHappy opened this issue 3 years ago • 7 comments

问题类型:模型部署 问题描述

paddlex v2.0.0正式版

你们提供的C#demo,在第一台电脑可以正常运行,第二台电脑无法初始化模型。具体报错见下图

image

Code-WHappy avatar Sep 10 '21 13:09 Code-WHappy

第二台电脑有进行编译和相关设置么, 还有cuda等环境是否符合要求

heliqi avatar Sep 12 '21 06:09 heliqi

现在把dll库重新编译后,初始化OK了,但是预测出错了。用的cpu,没有用gpu 初始化代码 image 预测的代码 image

Code-WHappy avatar Sep 13 '21 07:09 Code-WHappy

Paddlex gui v2.0.0正式版导出的模型。PPYOLO V2

Code-WHappy avatar Sep 13 '21 07:09 Code-WHappy

PPYOLOTiny,可以预测,但是PPYOLO V2不可以,不知道为啥,是bug吗? 以下是PPYOLO V2训练参数

image

导出模型的相关参数,即model.yml文件 Model: PPYOLOv2 Transforms:

  • Resize: interp: CUBIC keep_ratio: false target_size: !!python/tuple
    • 320
    • 320
  • Normalize: is_scale: true max_val:
    • 255.0
    • 255.0
    • 255.0 mean:
    • 0.485
    • 0.456
    • 0.406 min_val:
    • 0
    • 0
    • 0 std:
    • 0.229
    • 0.224
    • 0.225 _Attributes: eval_metrics: bbox_map: 100.0 fixed_input_shape:
    • -1
    • 3
    • 608
    • 608 labels:
    • OK
    • ZHI model_type: detector num_classes: 2 _init_params: anchor_masks:
      • 6
      • 7
      • 8
      • 3
      • 4
      • 5
      • 0
      • 1
      • 2 anchors:
      • 10
      • 13
      • 16
      • 30
      • 33
      • 23
      • 30
      • 61
      • 62
      • 45
      • 59
      • 119
      • 116
      • 90
      • 156
      • 198
      • 373
      • 326 backbone: ResNet50_vd_dcn ignore_threshold: 0.7 label_smooth: false nms_iou_threshold: 0.45 nms_keep_topk: 100 nms_score_threshold: 0.01 nms_topk: -1 num_classes: 2 scale_x_y: 1.05 use_drop_block: true use_iou_aware: true use_iou_loss: true use_matrix_nms: true use_spp: true completed_epochs: 0 status: Infer version: 2.0.0rc4

Code-WHappy avatar Sep 13 '21 08:09 Code-WHappy

我也尝试这个c#的GUI版本,发现release模式下可以运行,但debug模式下模型加载不了,貌似应该是paddle_inference.dll库没有debug版提供造成,不知道您是否有相同现象?有解决吗?

ximitiejiang avatar Sep 14 '21 01:09 ximitiejiang

我也尝试这个c#的GUI版本,发现release模式下可以运行,但debug模式下模型加载不了,貌似应该是paddle_inference.dll库没有debug版提供造成,不知道您是否有相同现象?有解决吗?

我是PaddleX的PM C#这个case我跟进一下,方便的话,加我微信yzl819819具体看一下问题

yzl19940819 avatar Sep 14 '21 06:09 yzl19940819

c#的GUI版本加载初始化模型接口就报错,找不到model_infer.dll,debug看了一下一调用InitModel()就出现内存错误,这个问题怎么解决?

sdjxmikill avatar Apr 21 '22 03:04 sdjxmikill