Model
Model 管模型加载、推理、元信息和并发调度。
类结构
Model
│
├── Meta → ModelMeta
│ ├── Path → String
│ ├── Task → String
│ ├── ClassCount → int
│ ├── Labels → List<String>
│ ├── InputWidth → int
│ ├── InputHeight → int
│ ├── Channels → int
│ ├── MetaJson → String
│ └── Encrypted → boolean
├── Config → ModelConfig
├── Runtime → Diagnostics
│
├── Phase → Phase
├── License → ModelState
├── LastError → LastError
│
└── 方法
├── Model(path)
├── open(password?)
├── close()
├── infer
├── submit / wait
├── setLabels / clearLabels // 类别名表(随时可调,`open` 后生效)
└── diagnostics