Amazon Rekognition is a deep learning-based image and video analysis service that can be easily incorporated into any application. At Ensolvers, for one of our clients in the telehealth sector, we are asked to use this tool to ensure that patients are following the treatment protocol correctly.
As a part of the compliance requirements, our customer was required to ensure that every patient is following the treatment protocol correctly by uploading pictures during its progress. Those pictures must contain the face of the patient matching the one that is present in their ID, which was uploaded and manually validated when he/she was onboarded and started the treatment. With this in mind, we carried out an investigation to find out what would be the best approach and solution to this problem by using existing tools.
Since we have already relied on AWS for most of our infrastructure and services, we decided to use AWS Rekognition. Rekognition allowed us to detect not only the number of people in the photo but also that the person in the photo is the same as the person in the identification documents. The main process consists in uploading images provided for the patients to an S3 bucket (a cloud-based storage service provided also by AWS) and then, when this process finishes, we call the Rekognition API to execute the detection. Using AI models Rekognition, the API call does the following:
After the comparison, we get the result with an accuracy of 95%. If the photo validation succeeded, it’s taken as valid automatically.
The Rekognition runs every time patients upload a selfie and refuses to continue if the confidence is less than 95%. If the picture is rejected, the process gets interrupted and triggers a warning to the proper medical staff for a manual check to make sure the protocol is being properly followed. In practical terms, this implied a drastic reduction of the manual work in this particular step of the treatment process.
In addition, AWS Rekognition can also be used to detect and analyze potential signs of tampering or alteration in the ID pictures. Its advanced image analysis capabilities can detect anomalies in the images that may indicate that the ID has been digitally manipulated, such as changes to the image's pixels or metadata.
The implementation described here allowed us to have a good level of understanding of how to use AWS Rekognition and some very interesting possibilities it offers when it comes to delivering software solutions through AI. From the practical perspective, we were able to successfully apply it to automate a core part of the process that had to be done manually and it was required for compliance reasons.