Module Server Interface Protocol - neohoon/ObjectDetector GitHub Wiki

Module Server Interface Protocol

"Health Check" Protocol

  • Request
  {"cmd": "check"}
  • Response
    • 정상일 경우
    {"state": "healthy"}
  • 비정상일 경우
    {"state": "Invalid"}

"Run" Protocol

  • Request
  {     
    "cmd": "run",   
    "request":
      {
        "mmap_fname": memory_map_filename,   
        "mmap_shape": numpy_array_shape,   
        "roi": roi_list,
        "tracker_": "True" | "False"       // To enable tracking feature
      }
  }
  • memory_map_filename 은 numpy memory map 의 νŒŒμΌμ΄λ¦„μ΄λ©° string νƒ€μž…μ΄λ‹€.

  • numpy_array_shape 은 numpy array 의 shape 이며 tuple νƒ€μž…μ΄λ‹€.

  • roi_list λŠ” 0 κ³Ό 1 μ‚¬μ΄μ˜ λ„€κ°œμ˜ μ‹€μˆ˜λ‘œ κ΅¬μ„±λ˜λ©° list νƒ€μž…μ΄λ‹€.

  • Response

    • 정상일 경우
      {
        "state": "Done",
        "response":
        {
          "result": "success",
          "obj_info":
            {
              "obj_box_arr": obj_box_arr,
              "obj_name_arr": obj_name_arr,
              "obj_score_arr": obj_score_arr,
              "tracker_box_arr": list of tracker box,
              "tracker_index_arr": list of tracker index,
              "elapsed_time": elapsed_time
            },
          "proc_time": proc_time
        }
      }
    
    • obj_box_arr λŠ” 0 κ³Ό 1 μ‚¬μ΄μ˜ 4 개의 μ‹€μˆ˜λ‘œ 이루어진 bounding box 의 array 이닀.
    • obj_name_arr λŠ” κ²€μΆœν•œ object μ΄λ¦„μ˜ array 이닀.
    • obj_score_arr λŠ” κ²€μΆœν•œ object score 의 array 이닀.
    • list of tracker box λŠ” tracked box λ₯Ό μ˜λ―Έν•œλ‹€.
      • λ³Έμ§ˆμ μœΌλ‘œλŠ” object box 와 λ™μΌν•˜λ‚˜, λ‚΄λΆ€μ μœΌλ‘œ object box 보닀 μ•½κ°„ ν‚€μ›Œμ„œ μ²˜λ¦¬ν•œλ‹€.
    • list of tracker index λŠ” tracked box 의 index 이닀.
    • elapsed_time 은 object detection 에 μ†Œμš”λœ μ‹œκ°„μ΄λ‹€.
    • 비정상일 경우
      {
        "state": "Done",
        "response":
        {
          "result": "fail",
          "description": fail_description
        }
      }
    
    • fail_description 은 정상 λ™μž‘μ— μ‹€νŒ¨ν•œ μ΄μœ κ°€ κΈ°λ‘λœλ‹€.