增加日志
This commit is contained in:
@ -18,7 +18,7 @@ namespace DH.Commons.Base
|
||||
/// Object Detection 目标检测:寻找图像中的物体并进行定位;
|
||||
/// Instance Segmentation 实例分割:定位图中每个物体,并进行像素级标注,区分不同个体;
|
||||
/// </summary>
|
||||
public abstract class VisionEngineBase
|
||||
public abstract class VisionEngineBase : DeviceBase
|
||||
{
|
||||
public List<DetectionConfig> DetectionConfigs = new List<DetectionConfig>();
|
||||
#region event
|
||||
@ -66,118 +66,8 @@ namespace DH.Commons.Base
|
||||
}
|
||||
}
|
||||
}
|
||||
public class CamModuleXY
|
||||
{
|
||||
[Category("图片行")]
|
||||
[DisplayName("行")]
|
||||
[Description("行")]
|
||||
// [TypeConverter(typeof(DeviceIdSelectorConverter<CameraBase>))]
|
||||
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||
public int PicRows { get; set; } = 1;
|
||||
|
||||
[Category("图片列")]
|
||||
[DisplayName("列")]
|
||||
[Description("列")]
|
||||
// [TypeConverter(typeof(DeviceIdSelectorConverter<CameraBase>))]
|
||||
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||
public int PicCols { get; set; } = 1;
|
||||
|
||||
public string GetDisplayText()
|
||||
{
|
||||
return "行:" + PicRows.ToString() + "列:" + PicCols.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
//public class RelatedCamera
|
||||
//{
|
||||
|
||||
// [Category("关联相机")]
|
||||
// [DisplayName("关联相机")]
|
||||
// [Description("关联相机描述")]
|
||||
// //[TypeConverter(typeof(DeviceIdSelectorConverter<CameraBase>))]
|
||||
// //[TypeConverter(typeof(CollectionCountConvert))]
|
||||
// public string CameraSourceId { get; set; } = "";
|
||||
|
||||
|
||||
// //public string GetDisplayText()
|
||||
// //{
|
||||
// // using (var scope = GlobalVar.Container.BeginLifetimeScope())
|
||||
// // {
|
||||
// // List<IDevice> deviceList = scope.Resolve<List<IDevice>>();
|
||||
// // IDevice CameraDevice = deviceList.FirstOrDefault(dev => dev.Id.Equals(CameraSourceId));
|
||||
|
||||
// // if (CameraDevice != null && CameraDevice is CameraBase)
|
||||
// // {
|
||||
// // return CameraDevice.Name;
|
||||
// // }
|
||||
|
||||
// // }
|
||||
// // return CameraSourceId;
|
||||
// //}
|
||||
//}
|
||||
public class VisionEngineInitialConfigBase //: InitialConfigBase
|
||||
{
|
||||
[Category("深度学习检测配置")]
|
||||
[DisplayName("检测配置集合")]
|
||||
[Description("检测配置集合")]
|
||||
//[TypeConverter(typeof(CollectionCountConvert))]
|
||||
//[Editor(typeof(ComplexCollectionEditor<DetectionConfig>), typeof(UITypeEditor))]
|
||||
public List<DetectionConfig> DetectionConfigs { get; set; } = new List<DetectionConfig>();
|
||||
|
||||
[Category("深度学习检测配置")]
|
||||
[DisplayName("标签分类")]
|
||||
[Description("标签分类,A_NG,B_TBD...")]
|
||||
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||
// [Editor(typeof(ComplexCollectionEditor<RecongnitionLabelCategory>), typeof(UITypeEditor))]
|
||||
public List<RecongnitionLabelCategory> RecongnitionLabelCategoryList { get; set; } = new List<RecongnitionLabelCategory>();
|
||||
|
||||
[Category("深度学习检测配置")]
|
||||
[DisplayName("检测标签定义集合")]
|
||||
[Description("定义检测标签的集合,例如:Seg/Detection模式:断裂、油污、划伤...;Class模式:ok、ng、上面、下面、套环、正常...")]
|
||||
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||
// [Editor(typeof(ComplexCollectionEditor<RecongnitionLabel>), typeof(UITypeEditor))]
|
||||
public List<RecongnitionLabel> RecongnitionLabelList { get; set; } = new List<RecongnitionLabel>();
|
||||
|
||||
[Category("深度学习检测配置")]
|
||||
[DisplayName("标签置信度")]
|
||||
[Description("标签置信度,过滤小于改置信度的标签,大于该设置的标签才能识别")]
|
||||
public float Score { get; set; } = 0.5f;
|
||||
|
||||
[Category("深度学习检测配置")]
|
||||
[DisplayName("CPU线程数量")]
|
||||
[Description("用于深度学习的CPU线程数量,不要设置太大,会单独占用线程,影响其他程序运行")]
|
||||
public int CPUNums { get; set; } = 1;
|
||||
|
||||
//[Category("深度学习检测配置")]
|
||||
//[DisplayName("检测项GPU指定")]
|
||||
//[Description("将检测项指定到GPU")]
|
||||
// [TypeConverter(typeof(CollectionCountConvert))]
|
||||
// [Editor(typeof(ComplexCollectionEditor<DetectionGPUConfig>), typeof(UITypeEditor))]
|
||||
// public List<DetectionGPUConfig> DetectionGPUList { get; set; } = new List<DetectionGPUConfig>();
|
||||
|
||||
// [Category("数据保存配置")]
|
||||
//[DisplayName("是否保存检测明细CSV")]
|
||||
//[Description("是否保存 检测明细CSV")]
|
||||
//public override bool IsEnableCSV { get; set; } = true;
|
||||
|
||||
//[Category("数据保存配置")]
|
||||
//[DisplayName("是否保存检测图片")]
|
||||
//[Description("是否保存 检测图片,总开关")]
|
||||
//public bool IsSaveImage { get; set; } = true;
|
||||
|
||||
//[Category("数据保存配置")]
|
||||
//[Description("检测图片 保存文件夹")]
|
||||
//[DisplayName("检测图片保存文件夹")]
|
||||
//[Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
|
||||
//public string ImageSaveDirectory { get; set; } = "D:\\PROJECTS\\X017\\Images";
|
||||
|
||||
//[Category("数据保存配置")]
|
||||
//[Description("检测明细CSV文件夹")]
|
||||
//[DisplayName("检测明细CSV文件夹")]
|
||||
//[Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
|
||||
//public string CSVDataPath { get; set; } = "D:\\PROJECTS\\X017\\Images";
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user