车牌识别、通用 OCR 与图片保存 API

支持 JPG、JPEG、PNG、BMP 格式图片,单张最大 16 MB。

接口1 - 车牌识别: POST /plate
参数: image (整车图片)
成功响应示例:
{
    "success": true,
    "image_name": "car.jpg",
    "num_plates": 1,
    "results": [{
        "color": "蓝",
        "detection_confidence": 0.8149,
        "plate_number": "粤V·JX888",
        "recognition_confidence": 0.8257
    }],
    "time_ms": 156.29
}
            
接口2 - 通用文字识别(OCR): POST /ocr
参数: image (仅包含文字区域的图片)
成功响应示例:
{
    "success": true,
    "image_name": "text.png",
    "text": "你好世界",
    "confidence": 0.9876,
    "time_ms": 45.32
}
            
接口3 - 保存图片: POST /savephoto
参数: image (multipart/form-data 图片文件)
支持格式: JPG、JPEG、PNG、BMP,单张最大 16 MB
保存位置: mjphoto 目录,文件名从 1 开始递增
成功响应示例:
{
    "success": true,
    "filename": "1.jpg"
}
            

使用示例(curl)

# 车牌识别
curl -X POST -F "image=@/path/to/car.jpg" http://localhost:6000/plate

# 通用文字识别
curl -X POST -F "image=@/path/to/text.jpg" http://localhost:6000/ocr

# 保存图片
curl -X POST -F "image=@/path/to/photo.jpg" http://localhost:6000/savephoto

其他接口


服务运行在端口 6000,模型已预热,请直接调用。