NativeScript / mlkit

Apache License 2.0
24 stars 9 forks source link

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

Open gookhans opened 2 years ago

gookhans commented 2 years ago

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