NativeScript / mlkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[mlkit-face-detection] iOS detectWithStillImage doesn't detect face

gookhans opened this issue · comments

I use detectWithStillImage function with local ImageSource. Android works fine but iOS doesn't detect face.
android result: {"face": [...]}
iOS result: {} (empty object)

my code:

const localImage: ImageSource = await ImageSource.fromAsset(imageUrl);

detectWithStillImage(localImage, {
            detectorType: DetectionType.Face,
            faceDetection: {
                detectionMode: 'fast',
                faceTracking: false,
                landmarkMode: 'none',
                contourMode: 'none',
                classificationMode: 'none',
                minimumFaceSize: 0.1
            }
        })
            .then((result) => {
                console.log(result);
                return result;
            })

Thanks in advance for the support