• 2023.10.07 - 2023.10.13 期间的工作内容,进行项目优化,主要是把项目由研发环境迁移到运行环境

通过模型配置文件来选择不同平台

  • 配置信息:
    • @–detector-models@/home/user/Models/1060/DETECT.conf@xxx@yyyy@–detector-type@1@–detector-gap@0@–detector-fps@-1@–detector-thresholds@0.4@–detector-thresholds-nms@0.2@–tracker-type@2@–trace-cast@
  • JSON:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    
    {
      "detector-models":[
          "/home/user/Models/1060/DETECT.conf",
          "xxxx",
          "yyyy"
      ],
      "detector-type": 1,
      "detector-gap" : 0,
      "detector-fps" : -1,
      "detector-thresholds": 0.4,
      "detector-thresholds-nms": 0.2,
      "tracker-type": 2,
      "trace-cast": 1
    }
    
  • output:
    • @–detector-models@/home/user/Models/1060/DETECT.conf@xxxx@yyyy@–detector-type@1@–detector-gap@0@–detector-fps@-1@–detector-thresholds@0.400000@–detector-thresholds-nms@0.200000@–tracker-type@2@–trace-cast@1@

”@–detector-models@/home/user/Models/1060/DETECT.conf@xxxx@yyyy@–detector-type@1@–detector-gap@0@–detector-fps@-1@–detector-thresholds@0.400000@–detector-thresholds-nms@0.200000@–tracker-type@2@–trace-cast@1@”

yolov8 debug

  • success:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    
    {
      "box":{
          "h":149,
          "rotation_z":0,
          "w":187,
          "x":641,
          "y":490
      },
      "cart":{
          "x":-0.16562159857292313,
          "y":-0.41955076318823253,
          "z":0.11552591426037706
      },
      "center_in_camera":{
          "x":0.12958075106143951,
          "y":0.1383349746465683,
          "z":1.3273800611495972
      },
      "index":0,
      "normal_vector_in_camera":{
          "n_x_0":0.9294833540916443,
          "n_x_1":-0.09346835315227509,
          "n_x_2":0.3568255305290222,
          "n_y_0":0.10266360640525818,
          "n_y_1":0.9946923851966858,
          "n_y_2":-0.006871246267110109,
          "n_z_0":-0.35428929328918457,
          "n_z_1":0.04301983490586281,
          "n_z_2":0.9341458082199097
      },
      "object_attribute":{
          "depth":0,
          "height":0,
          "width":0
      },
      "rot":{
          "rx":-2.744077008854637,
          "ry":160.2865908183825,
          "rz":0.2672802189826315
      }
    }
    
  • fail:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    
    {
      "box":{
          "h":149,
          "rotation_z":0,
          "w":187,
          "x":642,
          "y":491
      },
      "cart":{
          "x":-0.16590754942419966,
          "y":-0.419407338885887,
          "z":0.11539028144605479
      },
      "center_in_camera":{
          "x":0.1298622041940689,
          "y":0.13848204910755157,
          "z":1.3275210857391357
      },
      "index":0,
      "normal_vector_in_camera":{
          "n_x_0":0.9297333359718323,
          "n_x_1":-0.09497172385454178,
          "n_x_2":0.3557756543159485,
          "n_y_0":-0.1077192947268486,
          "n_y_1":-0.9940502643585205,
          "n_y_2":0.016143877059221268,
          "n_z_0":0.35212570428848267,
          "n_z_1":-0.053333524614572525,
          "n_z_2":-0.9344319701194763
      },
      "object_attribute":{
          "depth":0,
          "height":0,
          "width":0
      },
      "rot":{
          "rx":-2.8191787034365756,
          "ry":-19.664527610430955,
          "rz":18.452750365871054
      }
    }
    
  • error ``` [2023-10-10 14:49:38] [GH_Detector Module] vcr/lib/GH_Detector.cpp:860 原始Z轴法向量: n_z_0: 0.357185 n_z_1: -0.0462075 n_z_2: -0.93289

减去中心点的Z轴法向量: tar_vec_z[0]: 0.227379 tar_vec_z[1]: -0.183971 tar_vec_z[2]: -2.26002

dst中心点的Z轴法向量: n_z_0: 0.357185 n_z_1: -0.0462075 n_z_2: -0.93289

[2023-10-10 14:49:38] [GH_Detector Module] vcr/lib/GH_Detector.cpp:860 原始Z轴法向量: n_z_0: -0.00201935 n_z_1: 0.0165144 n_z_2: 0.999862

减去中心点的Z轴法向量: tar_vec_z[0]: -0.248334 tar_vec_z[1]: -0.350763 tar_vec_z[2]: -0.441165

dst中心点的Z轴法向量: n_z_0: -0.00201935 n_z_1: 0.0165144 n_z_2: 0.999862

[2023-10-10 14:49:38] [GH_Detector Module] vcr/lib/GH_Detector.cpp:968 angle axisd(轴角) x y z [input]: 0.00659813 -0.351785 0.267473

eulerAngle(欧拉角) x y z [output]: -0.0424622 -0.348312 0.277729

[2023-10-10 14:49:38] [GH_Detector Module] vcr/lib/GH_Detector.cpp:968 angle axisd(轴角) x y z [input]: 0.0212336 -3.12521 -0.0286286

eulerAngle(欧拉角) x y z [output]: -0.0184308 -3.12554 0.0137363

[2023-10-10 14:49:38] [GH_Detector Module] vcr/lib/GH_Detector.cpp:617 检测结果: {“box”:{“h”:149.0,”rotation_z”:0.0,”w”:188.0,”x”:641.0,”y”:490.0},”cart”:{“x”:-0.16583405403385304,”y”:-0.42012516474744677,”z”:0.11577560598492731},”center_in_camera”:{“x”:0.1298055648803711,”y”:0.13776402175426483,”z”:1.327133297920227},”index”:0,”normal_vector_in_camera”:{“n_x_0”:0.9274928569793701,”n_x_1”:-0.10044766962528229,”n_x_2”:0.36009353399276733,”n_y_0”:-0.11034564673900604,”n_y_1”:-0.9938687682151794,”n_y_2”:0.0069786314852535725,”n_z_0”:0.35718482732772827,”n_z_1”:-0.04620746895670891,”n_z_2”:-0.9328900575637817},”object_attribute”:{“depth”:0.0,”height”:0.0,”width”:0.0},”rot”:{“rx”:-2.4329035032484883,”ry”:-19.95682129931027,”rz”:15.91269847754868}} [2023-10-10 14:49:38] [GH_Detector Module] vcr/lib/GH_Detector.cpp:617 检测结果: {“box”:{“h”:49.0,”rotation_z”:0.0,”w”:50.0,”x”:794.0,”y”:713.0},”cart”:{“x”:-0.2875236249635189,”y”:-0.19204606014815573,”z”:0.004446407452142198},”center_in_camera”:{“x”:0.2463146448135376,”y”:0.36727777123451233,”z”:1.4410266876220703},”index”:2,”normal_vector_in_camera”:{“n_x_0”:-0.7766305804252625,”n_x_1”:-0.6298943758010864,”n_x_2”:0.00883522629737854,”n_y_0”:0.6299452781677246,”n_y_1”:-0.776511549949646,”n_y_2”:0.014097697101533413,”n_z_0”:-0.0020193501841276884,”n_z_1”:0.016514405608177185,”n_z_2”:0.9998615980148315},”object_attribute”:{“depth”:0.0,”height”:0.0,”width”:0.0},”rot”:{“rx”:-1.0560094210500097,”ry”:-179.0801356617297,”rz”:0.7870340842517526}} ```