Unable to get faces object using detectFacesAsync method

I saved face image using Camera expo plugin with help of FileSystem in
FileSystem.moveAsync({
from: response.uri,
to: folder + ‘/mySnap.jpg’
})
and its saved in directory “file:///data/user/0/host.exp.exponent/files/ExperienceData/%254user%252Fappname/appfolder/mySnap.jpg”,

When I am using to detect face with FaceDetector.detectFacesAsync method following output is return with empty faces I have passed that above fileuri in FaceDetector.detectFacesAsync parameter
[11:34:50] resultface, Object {
[11:34:50] “faces”: Array [],
[11:34:50] “image”: Object {
[11:34:50] “height”: 2048,
[11:34:50] “orientation”: 0,
[11:34:50] “uri”: “file:///data/user/0/host.exp.exponent/files/ExperienceData/%254user%252Fappname/appfolder/mySnap.jpg”,
[11:34:50] “width”: 1536,
[11:34:50] },

Following is the code for FaceDetector.detectFacesAsync
const options = { mode: FaceDetector.Constants.Mode.fast,
detectLandmarks: FaceDetector.Constants.Mode.none,
runClassifications: FaceDetector.Constants.Mode.none };
const detectObj = await FaceDetector.detectFacesAsync(imageUri, options);
console.log(‘resultface,’, detectObj);

imageUri is nothing but that image I saved using FileSystem.

Kindly please help how it will detect faces from images or something I have missed…

Also help with storing files in internal storage of device using expo FileSystem.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.