protected async Task <Texture2D> GetScreenShot()
        {
            camTex = new Texture2D(0, 0);
            float startCapture = Time.realtimeSinceStartup;
            var   frameBreak   = new WaitForEndOfFrame();

            if (externalCamera)
            {
                camTex = await httpLoader.LoadTextureFromImage()
                ;               while (!textureReceived)
                {
                    await frameBreak;
                }
            }
            else
            {
                //camTex = Resources.Load<Texture2D>("Photos/" + $"debug_{idx}");
                camTex = CVUtils.LoadImgToTexture(photoPath, TextureFormat.RGBA32);
            }
            float endCapture = Time.realtimeSinceStartup;

            captureTime     = GenericUtils.CalculateTimeDifference(startCapture, endCapture);
            textureReceived = true;
            Handheld.Vibrate();
            return(camTex);
        }
        private void DetectObjects(Texture2D input_tex)
        {
            text_result = "";

            float startOCRt = Time.realtimeSinceStartup;

            //face and object detection.
            var outputs = _detector.RunInference(input_tex);
            var face    = faceMng.RecognizeFace(input_tex);

            var classNames = outputs.Select(x => x.Key).ToList();
            var classes    = classNames.GroupBy(x => x).ToDictionary(x => x.Key, x => x.ToList().Count);

            foreach (var label in classes)
            {
                if (text_result == String.Empty)
                {
                    text_result = $"{label.Key} {label.Value}";
                }
                else
                {
                    text_result = $"{text_result}, {label.Key} {label.Value}";
                }
            }

            if (face != "Δεν εντοπίστηκε πρόσωπο" && face != "Δεν αναγνωρίστηκε")
            {
                text_result = $"{text_result}, εντοπίστηκε οικείο πρόσωπο με όνομα {face}";
            }

            float endOCRt = Time.realtimeSinceStartup;

            detectionTime = GenericUtils.CalculateTimeDifference(startOCRt, endOCRt);

            inferenceComplete = true;
        }