【AIWIN 提问 - 模型测试】+ Failed to run API, remote connection closed.【已解决】

比赛 snowhou ⋅ 于 10个月前 ⋅ 最后回复由 snowhou 10个月前 ⋅ 821 阅读

测试时报错提示 Failed to run api, remote connection closed., init() 和 process_image() 看日志应该没有报错,其他错误信息看不懂了,希望可以帮忙看看。
测试日志:https://cvmart.net/storage/test_terminal_log/912.html
深度学习框架:PyTorch, 接口:Python

成为第一个点赞的人吧 :bowtie:
回复数量: 7
  • 你的sdk输出出错了,看起来是process_image返回的结果有问题,可以在编码环境里面先测试一下是不是可以正常的:

    }
    I0520 23:59:10.129079 85 RunningStatus.cpp:44] resetting status
    *** Aborted at 1590019150 (unix time) try "date -d @1590019150" if you are using GNU date ***
    PC: @ 0x7f1544ba301a PyUnicode_AsEncodedString
    *** SIGSEGV (@0x8) received by PID 31 (TID 0x7f14c09f7700) from PID 8; stack trace: ***
    @ 0x7f15443e1390 (unknown)
    @ 0x7f1544ba301a PyUnicode_AsEncodedString
    @ 0x7f15388270dc SampleDetectorImplPy::processImage()
    @ 0x7f1538823d4e processMat()
    @ 0x7f1538824692 ji_calc_frame
    @ 0x41b0ac EVSdkCaller::processData()
    @ 0x41ca0f EVSdkCaller::onDataReceived()
    @ 0x4597f4 SDKService::process()
    @ 0x40f6a8 AlgorithmMod::AlgorithmProcessor::___process()
    @ 0x7f15439692b3 IceInternal::Incoming::invoke()
    @ 0x7f154393fb5e (unknown)
    @ 0x7f1543940110 (unknown)
    @ 0x7f15439425e3 (unknown)
    @ 0x7f1543a54da7 (unknown)
    @ 0x7f1543a55b08 (unknown)
    @ 0x7f1543629b8d (unknown)
    @ 0x7f15443d76ba start_thread
    @ 0x7f153ff8f41d clone
    @ 0x0 (unknown)
    10个月前
    • @Allen之前输出格式确实不太对,改了之后还是有错误,不知道是什么原因?
      这是测 ji.py,输出应该对吧?
      python ji.py

      FO:root:Loading model...
      INFO:root:{'objects': [{'xmin': 298, 'ymin': 288, 'xmax': 345, 'ymax': 333, 'name': 'mask'}]}

      这是封装 SDK 的测试,输出结果为空,不知道哪里出问题了
      cd /usr/local/ev_sdk/bin ./test-ji-api -f 1 -i ../data/mask.jpg

      I0521 18:58:49.151329 18944 test.cpp:700] version info:
              EV_SDK_VERSION: 3.0.0
      I0521 18:58:49.152361 18944 test.cpp:797] run params info:
              fuction: 1.ji_calc_frame
              infile: ../data/mask.jpg
              args: 
              outfile: 
              repeat:1
      I0521 18:58:49.537832 18944 SampleDetectorImplPy.cpp:113] Loading ji.py...
      I0521 18:58:51.658125 18944 SampleDetectorImplPy.cpp:122] ji python module successfully loaded.
      I0521 18:58:51.658223 18944 SampleDetectorImplPy.cpp:129] init loaded.
      I0521 18:58:51.658242 18944 SampleDetectorImplPy.cpp:129] process_image loaded.
      INFO:root:Loading model...
      I0521 18:58:57.834457 18944 ji.cpp:112] SamplePredictor init OK.
      I0521 18:58:57.989828 18944 test.cpp:188] call ji_calc_frame, return 0
      I0521 18:58:57.989873 18944 test.cpp:192] event info:
              code: 0
              json: {
              "objects":      []
      }
      I0521 18:58:57.990309 18944 test.cpp:237] Input image not modfied.
      Exception ignored in: <module 'threading' from '/usr/lib/python3.6/threading.py'>
      Traceback (most recent call last):
        File "/usr/lib/python3.6/threading.py", line 1289, in _shutdown
          assert tlock.locked()
      SystemError: <built-in method locked of _thread.lock object at 0x7fede10496c0> returned a result with an error set

      这是最新的测试日志,报错原因和上面编码环境的一样
      https://cvmart.net/storage/test_terminal_log/1032.html

      10个月前
  • @snowhou 你在编码环境测试是正确的吗?

    10个月前
    • @Allen 上面两个代码段就是编码环境测的(一个是 ji.py 一个是 SDK),只是SDK输出为空,按说应该和 ji.py 测的有相同输出吧(二者 threshold 都一样),实际测试时也是输出为空然后报错停止了

      10个月前
  • 你的ji.py里面process_image返回的内容里面有prob这个key吗?SampleDetectorImplPy.cpp这个文件里面有解析prob这个key的,如果没有的话,就会出错。
    file

    10个月前
    • @Allen :joy:我直接按提交格式写的,没有 加prob,加上后在编码环境 SDK 可以正常输出了

      INFO:root:Loading model...
      I0521 21:34:57.973155 36493 ji.cpp:112] SamplePredictor init OK.
      I0521 21:34:58.153664 36493 test.cpp:188] call ji_calc_frame, return 0
      I0521 21:34:58.153741 36493 test.cpp:192] event info:
              code: 0
              json: {
              "objects":      [{
                              "xmin": 298,
                              "ymin": 288,
                              "xmax": 345,
                              "ymax": 333,
                              "confidence":   0.541788,
                              "name": "mask"
                      }]
      }
      I0521 21:34:58.154337 36493 test.cpp:237] Input image not modfied.

      真的太感谢了 :+1:

      10个月前
    • @Allen 感谢解答,已经成功测试出分

      10个月前
您需要登陆以后才能留下评论!