整理后提交,有一个项目缺素材和模型

This commit is contained in:
ShaoHua
2026-03-13 16:48:22 +08:00
commit 6c53998a3c
32 changed files with 1406 additions and 0 deletions
@@ -0,0 +1,31 @@
namespace YoloPersonDetectionAPI.Models
{
public class Defaults
{
public string variableName;
public string defaultValue;
public VARTYPE type;
static List<Defaults> defaults = new List<Defaults>();
public static List<Defaults> GetDefaults()
{
if (defaults.Count == 0)
{
defaults.Add(new Defaults() { variableName = Constants.SENSITIVITY, defaultValue = "0.5", type = VARTYPE.Numeric });
}
return defaults;
}
public static string GetDefault(string variableName)
{
var d = GetDefaults().Where(x => x.variableName == variableName).FirstOrDefault();
if (d == null)
throw new Exception($"No Default defined for ${variableName}");
//return (T) Convert.ChangeType(d.defaultValue, typeof(T));
return d.defaultValue;
}
}
}