Files
zmkgC/third/arithmetic/SpartaApi/entity.go
2025-07-07 20:11:59 +08:00

35 lines
1.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package SpartaApi
//type UniversalEntity struct {
// code string `json:"code" dc:"200:业务处理成功40x:访问权限错误50x:系统错误。"`
// msg string `json:"msg" dc:"结果消息提示success"`
// data string `json:"leftTopPoint" dc:"业务执行结果(obj/arr)"`
//}
type TokenEntity struct {
Token string `json:"token" dc:"token"`
ExpiresAt int `json:"expires_at" dc:"过期时间"`
}
type RecognizeReq struct {
CapUrl string `json:"capUrl" v:"required" dc:"v-在线图片地址"`
RecType string `json:"recType" v:"required" dc:"v-识别算法模型"`
Async string `json:"async" dc:"是否异步处理false默认值算法识别完后同步返回接口请求会等待适用于识别时间较长的模型true: 收到请求后,算法服务器会异步识别"`
CallBackUrl string `json:"callBackUrl" dc:"若为异步则需要此参数系统会将结果post到这个接口中"`
AreaHigh string `json:"area_high" dc:"若为异步则需要此参数系统会将结果post到这个接口中"`
}
type RecognizeRes struct {
HasTarget int `json:"hasTarget" dc:"是否监测到目标10否"`
OriginalImgSize []int `json:"originalImgSize" dc:"原始图片尺寸([宽,高]ex[1920,1080]"`
Targets []TargetsEntity `json:"targets" dc:"目标信息"`
}
type TargetsEntity struct {
PhoNumber int `json:"pho_number" dc:"在光伏板检测的时候会多输出一个参数代表光伏板的数量"`
Type string `json:"type" dc:"目标信息"`
Size []float64 `json:"size" dc:"目标外接矩形像素"`
LeftTopPoint []float64 `json:"leftTopPoint" dc:"目标在画面中左上角位置信息"`
Score float64 `json:"score" dc:"置信度得分0~1"`
}