zhangmeng
2020-01-06 a10f7bf10c195421b089cda0c13f2195c614cb80
proc/proc.go
@@ -36,6 +36,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"
   HumanTrack = "HumanTrack"
)
var (
   SDK = []string{
      YDetect,
      FDetect,
      FCompare,
      PlateID,
      HumanTrack,
   }
)
func prepare(name string, gpu int) (string, bool) {
   return initSDK(name, gpu)
@@ -45,7 +68,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)
@@ -65,21 +88,21 @@
   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)
   } else if sdkType == work.HumanTrack {
      e = sdk.NewHumanTracker(gpu, 1, 0)
   } else if sdkType == HumanTrack {
      e = sdk.NewHumanTracker(gpu, 16, 0)
   }
   if ret {