API集成需遵循以下Standardized processes::
- Service deployment
- Start command:
python dam_server.py --model-path nvidia/DAM-3B --conv-mode v1
- 推荐使用8001等非标准端口避免冲突
- Start command:
- 请求构造
- 图像需转为Base64编码,建议使用
base64.b64encode(open("image.png","rb").read())
- 视频需分帧处理,每秒抽取3-5关键帧
- 图像需转为Base64编码,建议使用
- response parsing
- 成功响应包含置信度分数(0-1范围)
- 错误代码:4001(掩码无效)、5003(模型过载)
Typical Integration Example:
城市规划系统中,通过POST请求发送航拍图获取”6米宽机动车道+2米宽绿化带”等结构化描述,响应时间控制在1.2秒内。
This answer comes from the articleDescribe Anything: Open source tool for generating detailed descriptions of images and video regionsThe