This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-AM68:如何更改模型制作器中的训练和编译参数

Guru**** 2482105 points
Other Parts Discussed in Thread: SK-AM68, AM68A

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1413808/sk-am68-how-to-change-trainning-and-compilation-parameters-in-model-maker

器件型号:SK-AM68
主题中讨论的其他器件:AM68A

工具与软件:

我使用此命令训练和编译模型制作器、

./run_modelmaker.sh AM68A config_obj_detection_x.yaml

我想更改 培训和编译参数  

例如

检测顶部 K: 从200到500

查看之前的帖子、 可以通过以下两个文件进行修改:

我想知道应更改哪个文件?

https://github.com/TexasInstruments/edgeai-tensorlab/blob/main/edgeai-modelmaker/edgeai_modelmaker/ai_modules/vision/params.py
https://github.com/TexasInstruments/edgeai-benchmark/blob/16b53719c0e40f36bee48d2addd6ece808196d33/settings_base.yaml


我修改了上述文件以重新训练和编译、  

./run_modelmaker.sh AM68A config_obj_detection_x.yaml

已检查符合的文件、但它似乎未生效。

mchi@ubuntu22:~/github/edgeai-tensorlab/edgeai-modelmaker/data/projects/obj_detect_sdk10$ grep -inr top_k
run/20240914-225031/yolox_s_lite/run.yaml:18:  detection_top_k: 200
run/20240914-225031/yolox_s_lite/status.json:221:      "detection_top_k":200,
run/20240914-225031/yolox_s_lite/run.json:220:    "detection_top_k":200,
run/20240914-225031/yolox_s_lite/training/model.prototxt:24:      top_k: 200
run/20240914-225031/yolox_s_lite/training/model.prototxt:27:    keep_top_k: 200
run/20240914-225031/yolox_s_lite/status.yaml:19:    detection_top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/work/od-8220/model/model.prototxt:24:      top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/work/od-8220/model/model.prototxt:27:    keep_top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/work/od-8220/result.yaml:86:    object_detection:top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/work/od-8220/config.yaml:75:    object_detection:top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/work/od-8220/param.yaml:129:    object_detection:top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/pkg/20240914-225031_yolox_s_lite_onnxrt_AM68A/model/model.prototxt:24:      top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/pkg/20240914-225031_yolox_s_lite_onnxrt_AM68A/model/model.prototxt:27:    keep_top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/pkg/20240914-225031_yolox_s_lite_onnxrt_AM68A/config.yaml:75:    object_detection:top_k: 200
run/20240914-225031/yolox_s_lite/compilation/AM68A/pkg/20240914-225031_yolox_s_lite_onnxrt_AM68A/param.yaml:129:    object_detection:top_k: 200
run/20240915-002311/yolox_s_lite/run.yaml:18:  detection_top_k: 200
run/20240915-002311/yolox_s_lite/status.json:221:      "detection_top_k":200,
run/20240915-002311/yolox_s_lite/run.json:220:    "detection_top_k":200,
run/20240915-002311/yolox_s_lite/training/model.prototxt:24:      top_k: 200
run/20240915-002311/yolox_s_lite/training/model.prototxt:27:    keep_top_k: 200
run/20240915-002311/yolox_s_lite/status.yaml:19:    detection_top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/work/od-8220/model/model.prototxt:24:      top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/work/od-8220/model/model.prototxt:27:    keep_top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/work/od-8220/result.yaml:86:    object_detection:top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/work/od-8220/config.yaml:75:    object_detection:top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/work/od-8220/param.yaml:129:    object_detection:top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/pkg/20240915-002311_yolox_s_lite_onnxrt_AM68A/model/model.prototxt:24:      top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/pkg/20240915-002311_yolox_s_lite_onnxrt_AM68A/model/model.prototxt:27:    keep_top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/pkg/20240915-002311_yolox_s_lite_onnxrt_AM68A/config.yaml:75:    object_detection:top_k: 200
run/20240915-002311/yolox_s_lite/compilation/AM68A/pkg/20240915-002311_yolox_s_lite_onnxrt_AM68A/param.yaml:129:    object_detection:top_k: 200
run/20240915-220931/yolox_s_lite/run.yaml:18:  detection_top_k: 200
run/20240915-220931/yolox_s_lite/status.json:221:      "detection_top_k":200,
run/20240915-220931/yolox_s_lite/run.json:220:    "detection_top_k":200,
run/20240915-220931/yolox_s_lite/training/model.prototxt:24:      top_k: 200
run/20240915-220931/yolox_s_lite/training/model.prototxt:27:    keep_top_k: 200
run/20240915-220931/yolox_s_lite/status.yaml:19:    detection_top_k: 200
run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/model/model.prototxt:24:      top_k: 200
run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/model/model.prototxt:27:    keep_top_k: 200
run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/result.yaml:86:    object_detection:top_k: 200
run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/config.yaml:75:    object_detection:top_k: 200
grep: run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/artifacts/detslabels_tidl_net.bin: binary file matches
grep: run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/artifacts/tempDir/detslabels_tidl_net.bin: binary file matches
run/20240915-220931/yolox_s_lite/compilation/AM68A/work/od-8220/param.yaml:129:    object_detection:top_k: 200
run/20240914-224307/yolox_s_lite/run.yaml:18:  detection_top_k: 200
run/20240914-224307/yolox_s_lite/status.json:221:      "detection_top_k":200,
run/20240914-224307/yolox_s_lite/run.json:220:    "detection_top_k":200,
run/20240914-224307/yolox_s_lite/status.yaml:19:    detection_top_k: 200

我想知道修改参数后还需要什么?   如何确认参数是否确实已修改? 谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您提到的这两个参数是从 edgeai-modelmaker 传递到 edgeai-benchmarking 的参数、因此必须在 edgeai-modelmaker 中自行修改

    您可以在 modelmaker 配置 YAML 文件 https://github.com/TexasInstruments/edgeai-tensorlab/blob/main/edgeai-modelmaker/config_detection.yaml 中的编译字段下指定

    编译:

      #启用/禁用编译
      启用:对#False
      # tensor_bits:8 #16 #32
      Detection_TOP_k:200
      Detection_threshold:0.1

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的、谢谢。

    将培训和编译参数作为模型制作器中的模型编写器更改、  

    似乎平均处理是有点低,  除了这些参数,还有什么其他方法可以用来提高处理?  谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    默认参数经过优化、可最大程度地缩短运行时间。 更改精度测量设置可能会增加运行时间。  

    您可以尝试为精度测量设置以下参数:

    Detection_top_k:500
    Detection_threshold:0.05

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在 SK-AM68 EVM 上运行时、会出现以下错误、

    root@am68a-sk:/opt/edgeai-gst-apps/apps_cpp/bin/Release# ./app_edgeai ~/obj_detection.yaml
    libtidl_onnxrt_EP loaded 0xb9196b0 
    Final number of subgraphs created are : 1, - Offloaded Nodes - 283, Total Nodes - 283 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
       212.665547 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
       212.665655 s:  VX_ZONE_INIT:Enabled
       212.665668 s:  VX_ZONE_ERROR:Enabled
       212.665675 s:  VX_ZONE_WARNING:Enabled
       212.666675 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
       212.667486 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    TIDL_RT_OVX: ERROR: Config file size (93976 bytes) does not match size of sTIDL_IOBufDesc_t (37912 bytes)
       212.668415 s:  VX_ZONE_ERROR:[tivxAddKernelTIDL:269] invalid values for num_input_tensors or num_output_tensors 
       212.700588 s:  VX_ZONE_ERROR:[vxQueryKernel:140] Invalid kernel reference
       212.700624 s:  VX_ZONE_ERROR:[vxMapUserDataObject:384] Invalid user data object reference
       212.700635 s:  VX_ZONE_ERROR:[vxUnmapUserDataObject:469] Invalid user data object reference
       212.700642 s:  VX_ZONE_ERROR:[tivxTIDLNode:113] Exceeded max parameters for a kernel
       212.700650 s:  VX_ZONE_ERROR:[vxSetReferenceName:960] Invalid reference
       212.700658 s:  VX_ZONE_ERROR:[vxSetReferenceName:960] Invalid reference
       212.700663 s:  VX_ZONE_ERROR:[vxSetReferenceName:960] Invalid reference
    graph
    ==========[INPUT PIPELINE(S)]==========
    
    [PIPE-0]
    

    SDK 版本是9.2、 我 尝试 edgeai-tensor 9.2和主分支、它无法运行、

    我想知道,如果我使用的是 SDK 9.2版, 那么我必须使用   edgeai-tensor 9.2 ,或者主分支可以吗?

    我记得它可以在   几周前运行 SDK 9.2版和 edgeai-tensor 主分支、

    现在我将 edgeai-tensor 重置为最新 或9.2分支、它无法运行模型。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    9.2和 edgeai-tensorlab 的分支和主分支的内容与现在相同。 10.0分支发布后、主分支将与该分支同步。

    过去几周内、我们没有添加任何重大变化-仅进行了几次错误修复。 您可以在历史记录中查看提交。 如果几周前就运行了、现在应该也运行。

    您可能会尝试重新启动 EVM 以查看模型是否正常工作。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

       ?、现在没有与 Edgeai-tensorlab PROCESSOR-SDK-LINUX 版本与 AM68A-AM68A 版本10.00.00.08相匹配的版本、因为最新的 tensorlab 版本为 r9.2 μ s  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我们计划在几天内为 edgeai-tensorlab 推出 r10.0分支。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    root@am68a-sk:/opt/edgeai-gst-apps/apps_cpp/bin# cd Release/
    root@am68a-sk:/opt/edgeai-gst-apps/apps_cpp/bin/Release# ls
    app_config_checker  app_edgeai
    root@am68a-sk:/opt/edgeai-gst-apps/apps_cpp/bin/Release# ./app_edgeai /opt/edgeai-gst-apps/configs/imx219_cam_example.yaml
    libtidl_onnxrt_EP loaded 0x3571a750 
    Final number of subgraphs created are : 1, - Offloaded Nodes - 283, Total Nodes - 283 
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=5) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
      1433.134006 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
      1433.134120 s:  VX_ZONE_INIT:Enabled
      1433.134129 s:  VX_ZONE_ERROR:Enabled
      1433.134136 s:  VX_ZONE_WARNING:Enabled
      1433.134856 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-0 
      1433.135009 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-1 
      1433.135174 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-2 
      1433.135279 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:116] Added target MPU-3 
      1433.135291 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
      1433.135783 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
      1433.154097 s:  VX_ZONE_ERROR:[ownContextSendCmd:875] Command ack message returned failure cmd_status: -1
      1433.154125 s:  VX_ZONE_ERROR:[ownNodeKernelInit:590] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
      1433.154132 s:  VX_ZONE_ERROR:[ownNodeKernelInit:591] Please be sure the target callbacks have been registered for this core
      1433.154139 s:  VX_ZONE_ERROR:[ownNodeKernelInit:592] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
      1433.154147 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:608] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
      1433.154172 s:  VX_ZONE_ERROR:[vxVerifyGraph:2159] Node kernel init failed
      1433.154179 s:  VX_ZONE_ERROR:[vxVerifyGraph:2213] Graph verify failed
    TIDL_RT_OVX: ERROR: Verifying TIDL graph ... Failed !!!
    TIDL_RT_OVX: ERROR: Verify OpenVX graph failed
    graph
    ==========[INPUT PIPELINE(S)]==========
    
    [PIPE-0]
    
    v4l2src device=/dev/video-imx219-cam0 io-mode=5 ! queue leaky=2 ! capsfilter caps="video/x-bayer, width=(int)1920, height=(int)1080, format=(string)rggb;" ! tiovxisp dcc-isp-file=/opt/imaging/imx219/linear/dcc_viss.bin sensor-name=SENSOR_SONY_IMX219_RPI ! capsfilter caps="video/x-raw, format=(string)NV12;" ! tiovxmultiscaler name=multiscaler_split_00
    multiscaler_split_00. ! queue ! capsfilter caps="video/x-raw, width=(int)480, height=(int)416;" ! tiovxmultiscaler target=1 ! capsfilter caps="video/x-raw, width=(int)416, height=(int)416;" ! tiovxdlpreproc out-pool-size=4 data-type=3 tensor-format=1 ! capsfilter caps="application/x-tensor-tiovx;" ! appsink max-buffers=2 drop=true name=flow0_pre_proc0
    multiscaler_split_00. ! queue ! capsfilter caps="video/x-raw, width=(int)1280, height=(int)720;" ! tiovxdlcolorconvert out-pool-size=4 ! capsfilter caps="video/x-raw, format=(string)RGB;" ! appsink max-buffers=2 drop=true name=flow0_sensor0
    
    ==========[OUTPUT PIPELINE]==========
    
    appsrc do-timestamp=true format=3 block=true name=flow0_post_proc0 ! tiovxdlcolorconvert ! capsfilter caps="video/x-raw, width=(int)1280, height=(int)720, format=(string)NV12;" ! queue ! mosaic0.sink0
    
    tiovxmosaic target=1 background=/tmp/background0 name=mosaic0 src::pool-size=4
    sink_0::startx="<320>" sink_0::starty="<150>" sink_0::widths="<1280>" sink_0::heights="<720>"
    ! capsfilter caps="video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080;" ! queue ! tiperfoverlay title=IMX219 Camera ! kmssink sync=false max-lateness=5000000 qos=true processing-deadline=15000000 driver-name=tidss connector-id=40 plane-id=31 force-modesetting=true
    
     +-----------------------------------------------------------------+ | IMX219 Camera| +-----------------------------------------------------------------+ +-----------------------------------------------------------------+ | Input Source: /dev/video-imx219-cam0| | Model Name:   object_detection_test| | Model Type:   detection| +-----------------------------------------------------------------+ | dl-inference:     0.00 ms  from     0 samples  | | total time:     0.00 ms  from     0 samples  | | framerate:     0.00 ms  from     0 samples  | +-----------------------------------------------------------------+  1433.954422 s:  VX_ZONE_ERROR:[ownContextSendCmd:875] Command ack message returned failure cmd_status: -1
      1433.954463 s:  VX_ZONE_ERROR:[ownNodeKernelInit:590] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
      1433.954472 s:  VX_ZONE_ERROR:[ownNodeKernelInit:591] Please be sure the target callbacks have been registered for this core
      1433.954479 s:  VX_ZONE_ERROR:[ownNodeKernelInit:592] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
      1433.954490 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:608] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
      1433.954509 s:  VX_ZONE_ERROR:[vxVerifyGraph:2159] Node kernel init failed
      1433.954517 s:  VX_ZONE_ERROR:[vxVerifyGraph:2213] Graph verify failed
      1433.954582 s:  VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:885] graph is not in a state required to be scheduled
      1433.954591 s:  VX_ZONE_ERROR:[vxProcessGraph:813] schedule graph failed
      1433.954599 s:  VX_ZONE_ERROR:[vxProcessGraph:818] wait graph failed
    ERROR: Running TIDL graph ... Failed !!!
      1433.962006 s:  VX_ZONE_ERROR:[ownContextSendCmd:875] Command ack message returned failure cmd_status: -1
      1433.962047 s:  VX_ZONE_ERROR:[ownNodeKernelInit:590] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
      1433.962055 s:  VX_ZONE_ERROR:[ownNodeKernelInit:591] Please be sure the target callbacks have been registered for this core
      1433.962062 s:  VX_ZONE_ERROR:[ownNodeKernelInit:592] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
      1433.962071 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:608] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
      1433.962083 s:  VX_ZONE_ERROR:[vxVerifyGraph:2159] Node kernel init failed
      1433.962089 s:  VX_ZONE_ERROR:[vxVerifyGraph:2213] Graph verify failed
      1433.962153 s:  VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:885] graph is not in a state required to be scheduled
      1433.962162 s:  VX_ZONE_ERROR:[vxProcessGraph:813] schedule graph failed
      1433.962168 s:  VX_ZONE_ERROR:[vxProcessGraph:818] wait graph failed
    ERROR: Running TIDL graph ... Failed !!!
      1433.985935 s:  VX_ZONE_ERROR:[ownContextSendCmd:875] Command ack message returned failure cmd_status: -1
      1433.985965 s:  VX_ZONE_ERROR:[ownNodeKernelInit:590] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
      1433.985973 s:  VX_ZONE_ERROR:[ownNodeKernelInit:591] Please be sure the target callbacks have been registered for this core
      1433.985980 s:  VX_ZONE_ERROR:[ownNodeKernelInit:592] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
      1433.985990 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:608] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
      1433.986002 s:  VX_ZONE_ERROR:[vxVerifyGraph:2159] Node kernel init failed
      1433.986009 s:  VX_ZONE_ERROR:[vxVerifyGraph:2213] Graph verify failed
      1433.986066 s:  VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:885] graph is not in a state required to be scheduled
      1433.986073 s:  VX_ZONE_ERROR:[vxProcessGraph:813] schedule graph failed
      1433.986079 s:  VX_ZONE_ERROR:[vxProcessGraph:818] wait graph failed
    ERROR: Running TIDL graph ... Failed !!!

    您可以帮助检查此错误吗?   我使用了 SDK 9.2和 edgeai-tensorlab 9.2、

    我重新训练和编译了示例模型、

    ./run_modelmaker AM68A config_detection.yaml  

     将重新编译的模型下载到目标板并运行、将得到上述错误、
    这是 tidl-tools 的版本匹配问题吗? 我已检查版本是 r9.2

    edgeai-tensorlab/edgeai-benchmark/tools/AM68A/tidl_tools/version.yaml

    target_device: AM68A
    version: 9.2
    release_id: 09_02_09_00
    release_name: r9.2

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

     报告的编译准确性低于训练准确性、原因有多种。

    1. 上面讨论的 detection_top_k 和 detection_threshold 参数肯定会影响准确性。 您可以尝试按照上面建议的方法调整参数以查看精度提高。  

    2. 量化肯定会影响准确度-您尝试在浮点仿真模式下运行编译(在编译中、设置 tensor_bits:32)来测量量化的准确性。 如果量化确实是精度下降的原因、那么您需要将一些层(尤其是最后一个卷积层)放到16位来恢复精度。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    另一个问题:

    现在、我在模型编写器和 模型制作器中使用了相同的数据集、

    并使用相同的 培训和编译参数、

    模型编写器:





    模型制造商:

    当我将经过训练的模型下载到目标板时、使用模型编写器训练的模型的识别准确度还行、但由模型编写器训练的模型的准确度要低得多。  

    如您所知、模型编写器最新版本支持 sdk9.1。 我们需要使用 SDK10.0、但使用模型生成器训练的模型的识别准确性非常低、即使使用相同的数据集也是如此。 我们该如何解决这个问题? 如何使用模型制作器提高精度? 谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您可以提取最新的 edgeai-tensorlab r10.0并重试吗? 由于模型的更改导致精度出现问题、并且已进行更正。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

     我已经 拉了最新的 edgeai-tensorlab r10.0、 似乎没有任何改进。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    烦恼问题:
    我使用  yolox_s_lite 模型、 训练使用静态图像 、对于某些动态目标、识别率太低。 可以调整哪些参数?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在上面比较9.1 ModelComposer 和10.0 ModelMaker 的培训中、使用哪个数据集? 我将尝试重现同样的场景、如果有任何问题、我会帮助解决。

    另外、您能否澄清以下说法:"我使用  yolox_s_lite 模型、而 Training 使用静态图像、 对于某些动态目标、识别率太低。"  我不太明白-这意味着什么?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    1)我正在使用我自己的数据集、该数据集由设备的摄像机捕获。



    和配置文件

    common:
        target_module: 'vision'
        task_type: 'detection'
        target_device: 'AM68A'
        # run_name can be any string, but there are some special cases:
        # {date-time} will be replaced with datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
        # {model_name} will be replaced with the name of the model
        run_name: '{date-time}/{model_name}'
    
    dataset:
        # enable/disable dataset loading
        enable: True #False
        # max_num_files: [750, 250] #None
    
        # Object Detection Dataset Examples:
        # -------------------------------------
        # Example 1, (known datasets): 'widerface_detection', 'pascal_voc0712', 'coco_detection', 'udacity_selfdriving', 'tomato_detection', 'tiscapes2017_driving'
        # dataset_name: widerface_detection
        # -------------------------------------
        # Example 2, give a dataset name and input_data_path.
        # input_data_path could be a path to zip file, tar file, folder OR http, https link to zip or tar files
        # for input_data_path these are provided with this repository as examples:
        #    'software-dl.ti.com/.../tiscapes2017_driving.zip'
        #    'software-dl.ti.com/.../animal_detection.zip'
        # -------------------------------------
        # Example 3, give image folders with annotation files (require list with values for both train and val splits)
        # dataset_name: coco_detection
        # input_data_path: ["./data/projects/coco_detection/dataset/train2017",
        #                        "./data/projects/coco_detection/dataset/val2017"]
        # input_annotation_path: ["./data/projects/coco_detection/dataset/annotations/instances_train2017.json",
        #                        "./data/projects/coco_detection/dataset/annotations/instances_val2017.json"]
        # -------------------------------------
        dataset_name: fork_20241014
        #input_data_path: ["./data/datasets/obj_detection/images/"]
        #input_annotation_path: ["./data/datasets/obj_detection/annotations/instances.json"]
        input_data_path: './data/datasets/fork_20241014'
        input_annotation_path: './data/datasets/fork_20241014/annotations/instances.json'
    training:
        # enable/disable training
        enable: True #False
    
        # Object Detection model chosen can be changed here if needed
        # options are: 'yolox_s_lite', 'yolox_tiny_lite', 'yolox_nano_lite', 'yolox_pico_lite', 'yolox_femto_lite'
        model_name: 'yolox_s_lite'
    
        training_epochs: 45 #30
        batch_size: 8 #32
        learning_rate: 0.002
        #num_gpus: 0 #1 #4
    
    compilation:
        # enable/disable compilation
        enable: True #False
        tensor_bits: 16 #16 #32
        detection_top_k: 500
        detection_threshold: 0.05
        calibration_iterations: 10
        Calibration Frames: 10  




    2)我的训练模型的目标是检测生产线上的 产品缺陷,例如输送带上的产品不固定。 动态对象的识别率比较低。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、此断言是由于多处理(使用多个进程)造成的、在进程完成后在__delete__中发生-这是无害的。 我们正在寻找的想法,以避免它,并将尝试修复它,因为它是一个烦恼。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您能帮助我解决准确度问题吗?  谢谢

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    e2e.ti.com/.../10.0_5F00_xilutek_2D00_dataset_5F00_20241017_5F00_143225_5F00_learning_5F00_rate0.002.log

    我对您共享的数据集进行了几次培训(随附的日志文件)、都是在10.0中进行的培训

    其中一个使用默认的 learning_rate、另一个使用默认的 learning_rate 0.001的一半

    我观察到、使用默认学习速率时、精度会发生波动-在某个 epoch 内、精度突然下降。 这种情况可能发生在此类小数据集中。  

    这种情况的一个解决方案是减小 LEARING_RATE。  第二个培训使用  learning_rate 0.001、 结果比您在9.1中观察到的更好

    e2e.ti.com/.../2555.0_5F00_xilutek_2D00_dataset_5F00_20241017_5F00_143937_5F00_learning_5F00_rate0.001.log

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    好的,谢谢,我会尝试 它。

    此外、前面提到的动态物体检测问题

    这是一个训练注释图片、 有一个非常薄的裂纹在叉中间  

    将经过训练的模型复制到目标板上、当货叉静止时、是否确定裂纹?

    当货叉未固定在传送带上时、速度非常慢且几乎无法识别。
    对于这种情况、 是否有好的方法来解决此问题?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    训练图像是否包含足够的捕获的移动叉图像? 这应该有助于在使用移动图像的实际测试中提高精度。

    如果 yolox_nano_lite 模型的精度不够、则可以尝试 yolox_s_lite 模型

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

     我使用过  yolox_s_lite 模型、似乎此版本、有更新的版本可用吗? 如何更换它?
    www_modelzoo_path =的oftware-dl.ti.com/.../08_06_00_01'
    Download_URL':F'{www_modelzoo_path}/models/vision/detection/coco/edgeai-mmdet/yolox_s_lite_640x640_20220221_checkpoint.pth

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    此问题是否仍然存在?

    此致、

    Brijesh

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    yolox_s_lite 是我们目前在 edgeai-modelmaker 中拥有的最佳对象检测模型。 如果检测质量不符合预期、您可以尝试将更真实的图像添加到训练集中。 例如、如果在移动场景中发生故障、请从移动场景中捕获更多图像并添加到训练集。