2023-03-23 18:03:09 +08:00
|
|
|
package mq
|
|
|
|
|
|
|
|
const (
|
|
|
|
TaskAdd = iota + 1
|
|
|
|
ModelIssue
|
2023-06-17 09:38:26 +08:00
|
|
|
TaskExecute
|
|
|
|
TaskResponse
|
|
|
|
ModelIssueRepeater
|
|
|
|
ModelIssueResponse
|
|
|
|
TaskExecuteLog
|
|
|
|
TaskLog
|
|
|
|
TrainTaskAdd
|
2023-03-23 18:03:09 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type InstructionReq struct {
|
|
|
|
Command int `json:"command"`
|
|
|
|
Payload interface{} `json:"payload"`
|
|
|
|
}
|
2023-04-24 15:21:17 +08:00
|
|
|
|
|
|
|
type ModelResult struct {
|
|
|
|
Code int `json:"code"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LightweightResult struct {
|
|
|
|
Code int `json:"code"`
|
|
|
|
Crack bool `json:"crack"`
|
|
|
|
ImgDiscern string `json:"img_discern"`
|
|
|
|
ImgSrc string `json:"img_src"`
|
|
|
|
Pothole bool `json:"pothole"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type InsigmaResult struct {
|
|
|
|
Code int `json:"code"`
|
|
|
|
NumOfDiseases int `json:"num_of_diseases"`
|
|
|
|
Diseases []DiseasesInfo `json:"diseases"`
|
|
|
|
Image string `json:"image"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DiseasesInfo struct {
|
|
|
|
Id int `json:"id"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Level string `json:"level"`
|
|
|
|
Param DiseasesParam `json:"param"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DiseasesParam struct {
|
|
|
|
Length float64 `json:"length"`
|
|
|
|
Area float64 `json:"area"`
|
|
|
|
MaxWidth string `json:"max_width"`
|
|
|
|
}
|