AWS Rekognition FaceLiveness

0

Some clients are telling me the FaceLiveness is not working for them. My confidence threshold is at 80% and I have not been able to reproduce my clients' errors, however when I told them to try it with Wifi the problems solved themselves. When I try FaceLiveness on LTE networks, it works fine for me. But for some users it is not working on LTE internet no matter how many attempts they make. Maybe it depends on the internet carrier as well? Not sure. Please help.

Is this a known problem or is something wrong on my end?

`router.post('/analyze-session', async (req, res) => { try { const { sessionId } = req.body; if (!sessionId) { return res.status(400).json({ success: false, message: 'Session ID is required' }); }

    const user = await User.findById(req.user._id);
    if (!user) {
        return res.status(404).json({ success: false, message: 'User not found' });
    }

    const command = new GetFaceLivenessSessionResultsCommand({
        SessionId: sessionId
    });

    const response = await rekognitionClient.send(command);

    if (response.Confidence < 80) {
        return res.status(400).json({ success: false, message: 'Identity verification did not pass. Try again.' });
    }

    // Store in session as before
    req.session.pendingReferenceImage = Array.from(response.ReferenceImage.Bytes);

    // Convert to base64 for client preview
    const base64Image = Buffer.from(response.ReferenceImage.Bytes).toString('base64');

    console.log("Confidence: " + response.Confidence);
    res.json({ 
        success: true, 
        referenceImage: `data:image/jpeg;base64,${base64Image}`
    });    
} catch (error) {
    console.error('Failed to analyze face liveness session:', error);
    res.status(500).json({ success: false, message: 'Failure to analyze face liveness session' });
}

});`

*The client error: *Identity verification did not pass. Try again

asked 18 days ago35 views
1 Answer
0

The issue you're experiencing with AWS Rekognition FaceLiveness not working for some clients, particularly on LTE networks, could be related to a few factors:

  1. Network Connectivity: The fact that the problem resolves when clients switch to Wi-Fi suggests that network connectivity plays a crucial role. LTE networks can sometimes have higher latency or less stable connections compared to Wi-Fi, which might affect the performance of the FaceLiveness API calls.

  2. Timeout Issues: The FaceLiveness API might be timing out due to slower or less stable LTE connections. This could explain why it works fine on Wi-Fi but fails on some LTE networks.

  3. Data Transfer Speed: LTE networks might not provide sufficient speed for transferring the necessary data (like images) within the expected timeframe, leading to failures or low confidence scores.

  4. Carrier Differences: As you suggested, there could be variations between different mobile carriers that affect the API's performance.

  5. Device Capabilities: While not directly related to the network, different devices might handle image capture and processing differently, which could impact the results when combined with slower network speeds.

To address these issues, you could consider the following:

  1. Implement retry logic with exponential backoff for failed requests.
  2. Increase timeout settings for the API calls if possible.
  3. Optimize the image size and quality to reduce data transfer requirements.
  4. Provide clear instructions to users about optimal conditions for using the feature (good lighting, stable internet connection, etc.).
  5. Consider lowering your confidence threshold slightly (e.g., from 80% to 75%) to account for potential network-related issues, if it doesn't compromise your security requirements.

It's worth noting that this doesn't appear to be a widely reported issue with AWS Rekognition FaceLiveness itself, but rather a combination of factors related to network conditions and possibly how the API is being used in your specific implementation.

If the problem persists, it would be advisable to contact AWS support for more detailed troubleshooting, as they might have insights into any known issues or best practices for handling these scenarios.

Sources
Rekognition Faceliveness Issues | AWS re:Post
JSDoc: Source: segments/plugins/plugin.js
Prerequisites - Amazon Rekognition

profile picture
answered 18 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions