From 2d25b62b60da018412ed164b6fd29470498cea17 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 13 十二月 2019 12:27:39 +0800 Subject: [PATCH] update --- proc/proc.go | 35 +++++++++++++++++++++++++++++------ 1 files changed, 29 insertions(+), 6 deletions(-) diff --git a/proc/proc.go b/proc/proc.go index 0d719b7..c6b0ab2 100644 --- a/proc/proc.go +++ b/proc/proc.go @@ -35,6 +35,29 @@ name = "./data/yolo/data/coco.names" ) +const ( + FDetect = "FaceDetect" + // FExtract = "FaceExtract" + // FProperty = "FaceProperty" + FCompare = "FaceCompare" + FtTract = "FaceTrack" + FtDetect = "FaceTrackDetect" + FtOnly = "FaceTrackOnly" + YDetect = "Yolo" + PlateID = "Plate" +) + +var ( + SDK = []string{ + YDetect, + FDetect, + FCompare, + PlateID, + // FtTract, + // FtOnly, + } +) + func prepare(name string, gpu int) (string, bool) { return initSDK(name, gpu) } @@ -43,7 +66,7 @@ sdkType := name - if s, f := util.FindStringInArray(sdkType, work.SDK); f { + if s, f := util.FindStringInArray(sdkType, SDK); f { sdkType = s } else { logo.Errorln("THERE IS NO THIS SDK TYPE: ", sdkType) @@ -63,18 +86,18 @@ var e sdk.Engine ret := true - if sdkType == work.FDetect { + if sdkType == FDetect { e, ret = createFaceDetect(gpu, thrds, util.SFI.DetectNum, util.SFI.DetectAngle, util.SFI.TrackInterval, util.SFI.SampleSize) - } else if sdkType == work.YDetect { + } else if sdkType == YDetect { e, ret = createYolo(gpu) - } else if sdkType == work.FtTract { + } else if sdkType == FtTract { e, ret = createFaceTrack(gpu, thrds, util.SFI.DetectNum, util.SFI.DetectAngle, util.SFI.TrackInterval, util.SFI.SampleSize) - } else if sdkType == work.FCompare { + } else if sdkType == FCompare { e = sdk.NewEFExtract(100) - } else if sdkType == work.PlateID { + } else if sdkType == PlateID { e = sdk.NewPlateIDDetector(util.SCI.LicenseServerPath, util.SCI.Model, util.SCI.MaxImageWidth, util.SCI.MaxImageHeight) } -- Gitblit v1.8.0