README.md 1.6 KB

入户门检测服务

服务启动

python entrance_result_server.py

调用示例

# 基础调用(仅检测)
curl -X POST http://192.168.9.52:8079/detect-sync \
  -H "Content-Type: application/json" \
  -d '{"scene_folder": "/path/to/scene0001"}' \
  -o result.json

#url:http://192.168.9.52:8079/detect-sync 
#传入参数格式:json
#传入参数: /path/to/scene0001
#输出结果: result.json(保存到客户端,指定定路径)

# 带可视化输出
curl -X POST http://192.168.9.52:8079/detect-sync \
  -H "Content-Type: application/json" \
  -d '{"scene_folder": "/path/to/scene0001", "vis_ply": true}' \
  -o result.json

192.168.9.52 替换为服务器实际 IP 地址。

场景文件夹结构

scene0001/
├── pano_img/          # 全景 RGB 图像(JPG 格式,以点位 ID 命名)
│   ├── 1.jpg
│   ├── 2.jpg
│   └── ...
├── depth_img/         # 深度图像(PNG 格式,16 位深度)
│   ├── 1.png
│   ├── 2.png
│   └── ...
└── vision.txt         # JSON 格式,包含点位姿态和可见性信息

输出格式

entrance_position.json

{
  "source": "door_detection",
  "is_estimated": false,
  "from_2d_images": [
    {
      "image": "8.jpg",
      "bbox": {
        "x1": 165.0,
        "y1": 765.0,
        "x2": 329.0,
        "y2": 765.0,
        "x3": 329.0,
        "y3": 1380.0,
        "x4": 165.0,
        "y4": 1380.0
      }
    }
  ]
}

from_2d_images是一个列表,其中的每个元素就是该场景下检测到的入户门。 bbox就是矩形四个顶点的坐标。