void FeatureExtractorEngine::runOnImageBatch(ImageVector&& images) { FeatureExtractor extractor(_model); auto labels = extractLabels(images); auto features = extractor.extract(std::move(images)); appendFeatures(*_outputFile, features, labels); }
/// Destructor, prints \b end-of-line before going down. ContextRealLogger::~ContextRealLogger() { if (shouldPrint()) { // The Trolls set STDERR to O_NONBLOCK, but ignores the EAGAIN // from write, so if your machine is heavily loaded and the // terminal can't keep up with our log messages you start to // lose them. Hack: just set STDERR to block before every // debug message. fcntl(STDERR_FILENO, F_SETFL, O_WRONLY); appendFeatures(); QTextStream::operator<<('\n'); QTextStream(stderr) << data; } setDevice(NULL); }