source/neo/eval.py [80:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @staticmethod
    def get_base64_encoding(full_path):
        """
        encode the input image as base64 string

        :param full_path: full path of test image
        :return:
        """
        with open(full_path, "rb") as f:
            data = f.read()
            image_base64_enc = base64.b64encode(data)
            image_base64_enc = str(image_base64_enc, 'utf-8')

        return image_base64_enc
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



source/simulate/face_compare.py [17:24]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @staticmethod
    def get_base64_encoding(full_path):
        with open(full_path, "rb") as f:
            data = f.read()
            image_base64_enc = base64.b64encode(data)
            image_base64_enc = str(image_base64_enc, 'utf-8')

        return image_base64_enc
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



