예제 #1
0
        public Methods(IFaceDetectionService faceCameraService,
                       IFaceRecogntionService faceRecogntionService)
        {
            _faceCameraService     = faceCameraService;
            _faceRecogntionService = faceRecogntionService;

            ToggleCameraService = new ModelCommand(
                _faceCameraService.ToogleCameraService);

            ChangeDevice = new ModelCommand(
                _faceCameraService.ChangeDevice);

            SetRecognizer = new ModelCommand(
                _faceRecogntionService.SetRecognizer);

            SaveDetected = new ModelCommand(
                _faceCameraService.SaveDetected);

            LoadPersonalData = new ModelCommand(
                _faceCameraService.LoadPersonalData);

            ShouldDetectEyes = new ModelCommand(
                _faceCameraService.ShouldDetectEyes);

            ShouldAlwaysRetrain = new ModelCommand(
                _faceRecogntionService.ShouldAlwaysRetrain);

            RetrainRecognizer = new ModelCommand(
                _faceRecogntionService.RetrainRecognizer);

            ChangeDataMode = new ModelCommand(
                _faceCameraService.ChangeDataMode);
        }
예제 #2
0
 public FaceModelBuilderService(
     IFaceStore faceStore,
     IFaceDetectionService faceDetectionService)
 {
     _faceStore            = faceStore;
     _faceDetectionService = faceDetectionService;
 }
예제 #3
0
 public BuildFaceDataTask(
     IFaceDetectionService faceDetectionService,
     IBoxExtractorService boxExtractorService)
 {
     _faceDetectionService = faceDetectionService;
     _boxExtractorService  = boxExtractorService;
 }
예제 #4
0
 public FaceDetectionController(IFaceDetectionService faceDetectionService,
                                IDetectionResultService detectionResultService, IMapper mapper)
 {
     this.faceDetectionService   = faceDetectionService;
     this.detectionResultService = detectionResultService;
     this.mapper = mapper;
 }
예제 #5
0
 public DetectionController(IDetectionResultService detectionResultService,
                            IFaceDetectionService faceDetectionService, IMapper mapper,
                            ILogger <DetectionController> logger)
 {
     this.detectionResultService = detectionResultService;
     this.faceDetectionService   = faceDetectionService;
     this.mapper = mapper;
     this.logger = logger;
 }
예제 #6
0
 public SampleService(
     IThumbnailService thumbnailService,
     IFaceDetectionService faceDetectionService,
     IBoxExtractorService faceExtractorService)
 {
     _thumbnailService     = thumbnailService;
     _faceDetectionService = faceDetectionService;
     _faceExtractorService = faceExtractorService;
 }
예제 #7
0
 public FileUploadController(IStorageService storageService,
                             IFaceDetectionService faceDetectionService,
                             IImageService imageService,
                             ApplicationDbContext dbContext)
 {
     _storageService       = storageService;
     _faceDetectionService = faceDetectionService;
     _imageService         = imageService;
     _dbContext            = dbContext;
 }
예제 #8
0
 public FaceMutations(
     IFaceService faceService,
     IFaceModelBuilderService faceModelBuilder,
     IFaceDetectionService faceDetectionService,
     IMediaService mediaService)
 {
     _faceService          = faceService;
     _faceModelBuilder     = faceModelBuilder;
     _faceDetectionService = faceDetectionService;
     _mediaService         = mediaService;
 }
예제 #9
0
 public ImportSample(
     IMediaStore store,
     IMetadataExtractor metadataExtractor,
     IFaceDetectionService faceDetectionService,
     IBoxExtractorService faceExtractorService,
     IThumbnailService thumbnailService)
 {
     _store                = store;
     _metadataExtractor    = metadataExtractor;
     _faceDetectionService = faceDetectionService;
     _faceExtractorService = faceExtractorService;
     _thumbnailService     = thumbnailService;
 }
        public async Task DetectFaces()
        {
            // Arrange
            IServiceProvider sp    = BuildServiceProvider();
            Stream           image = TestMediaLibrary.TwoFacesNoExif;

            IFaceDetectionService faceService = sp.GetService <IFaceDetectionService>();

            // Act
            IEnumerable <FaceDetectionResponse> faces = await faceService.DetectFacesAsync(image, default);

            // Assert
            faces.MatchSnapshot();
        }
예제 #11
0
        public Shell(IFaceDetectionService faceDetectionService,
                     IFaceRecogntionService faceRecognitionService,
                     IMainPageViewModel mainPageViewModel,
                     IDatabaseService databaseService,
                     IFileDirectoryService directoryService)
        {
            _faceDetectionService = faceDetectionService;
            _faceRecognionService = faceRecognitionService;
            _mainPageViewModel    = mainPageViewModel;
            _databaseService      = databaseService;
            _directoryService     = directoryService;

            InitializeServices();
        }
예제 #12
0
 public FaceService(
     IFaceStore faceStore,
     IPersonService personStore,
     IMediaStore mediaStore,
     IFaceDetectionService faceDetectionService,
     IAgeOperationsService ageOperationsService,
     IBus bus)
 {
     _faceStore            = faceStore;
     _personService        = personStore;
     _mediaStore           = mediaStore;
     _faceDetectionService = faceDetectionService;
     _ageOperationsService = ageOperationsService;
     _bus = bus;
 }
예제 #13
0
 public FaceRecognitionService(DatabaseContext context)
 {
     try
     {
         _eigen           = new EigenFaceRecognizer();
         _FacesNamesArray = File.ReadAllLines(_recognizerFacesFileName);
         _eigen.Read(_recognizerFileName);
         _faceDetectionService = new FaceDetectionService();
         _context = context;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #14
0
 public FaceRecognitionService(DatabaseContext context, int recognizerNumOfComponents, int recognizerThreshold)
 {
     try
     {
         _recognizerNumOfComponents = recognizerNumOfComponents;
         _recognizerThreshold       = recognizerThreshold;
         _eigen = new EigenFaceRecognizer(_recognizerNumOfComponents, _recognizerThreshold);
         _faceDetectionService = new FaceDetectionService();
         _context = context;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #15
0
        public AddPerson()
        {
            InitializeComponent();

            PersonVM                = new PersonViewModel();
            _personsService         = new PersonsService();
            _faceRecognitionService = new FaceRecognitionService();
            _faceDetectionService   = new FaceDetectionService();
            _imageResizerService    = DependencyService.Get <IImageResizerService>();

            _ImageSlots.Add(image1);
            _ImageSlots.Add(image2);
            _ImageSlots.Add(image3);

            NextPhotos.IsVisible = false;
            PrevPhotos.IsVisible = false;
        }
예제 #16
0
 public PredictPersonsTask(IFaceDetectionService faceDetectionService)
 {
     _faceDetectionService = faceDetectionService;
 }
예제 #17
0
 public FaceDetectionsController(IFaceDetectionService faceDetectionService)
 {
     FaceDetectionService = faceDetectionService;
 }
예제 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FaceDetectionController"/> class with <see cref="IFaceDetectionService"/> and logger.
 /// </summary>
 /// <param name="faceDetectionService">The service provide face detect functions.</param>
 /// <param name="logger">The logger.</param>
 public FaceDetectionController(IFaceDetectionService faceDetectionService,
                                ILogger <FaceDetectionController> logger)
 {
     this._FaceDetectionService = faceDetectionService;
     this._Logger = logger;
 }
 public FaceDetectionPageModel(IFaceDetectionService faceDetectionService)
 {
     _faceDetectionService = faceDetectionService;
 }
예제 #20
0
 public MainWindowViewModel(IDialogService dialogSvc, IFaceDetectionService faceDetectionSvc)
 {
     dialogService        = dialogSvc;
     faceDetectionService = faceDetectionSvc;
 }
예제 #21
0
 public DetectionController(IFaceDetectionService faceDetectionService)
 {
     this._FaceDetectionService = faceDetectionService;
 }