Пример #1
0
        private static bool DetectCat(INeuralNetwork neuralNetwork, Image <Gray, Byte> image)
        {
            double[] networkFeed              = LocalImage.GetNetworkFeedArray(image);
            var      networkOutput            = neuralNetwork.GenerateOutput(networkFeed);
            var      outputValue              = networkOutput[0];
            var      complementaryOutputValue = networkOutput[1];

            return(outputValue > 0.95 && complementaryOutputValue < 0.05);
        }