public DnnDetectorChannelTransformer(IBatchedDnnDetector detector, ChannelReader <IList <VideoFrame> > inputReader, ChannelWriter <AnalysisResult> outputWriter, ILogger logger) : base(inputReader, outputWriter, logger) { if (detector is null) { throw new ArgumentNullException(nameof(detector)); } _detector = detector; _detector.Initialize(); SetTransformer(this.DoAnalyzeFrames); }
public DnnDetectorChannelTransformer(IBatchedDnnDetector detector, float detectionThreshold, ChannelReader <IList <VideoFrame> > inputReader, ChannelWriter <IList <VideoFrame> > outputWriter, IHeartbeatReporter heartbeatReporter, ILogger logger) : base(inputReader, outputWriter, logger) { if (detector is null) { throw new ArgumentNullException(nameof(detector)); } if (heartbeatReporter is null) { throw new ArgumentNullException(nameof(heartbeatReporter)); } _detectionThreshold = detectionThreshold; _heartbeatReporter = heartbeatReporter; _detector = detector; _detector.Initialize(); }