Releases: cyberlabsai/perse-sdk-lite-ios
0.3.1
0.3.0
💥 Breaking Changes
Complete breaking changes in the Responses, Methods and your usages. Motivations:
- Improve cohesion;
- Patterning with the methods;
- Prepare for future features, like the "vox"s;
API Responses
Deprecated | New Usage |
---|---|
CompareResponse |
PerseAPIResponse.Face.Compare |
DetectResponse |
PerseAPIResponse.Face.Detect |
FaceResponse |
PerseAPIResponse.Face.Face |
MetricsResponse |
PerseAPIResponse.Face.Metrics |
LandmarksResponse |
PerseAPIResponse.Face.Landmarks |
Methods
Deprecated | New |
---|---|
func detect( _ filePath: String, onSuccess: @escaping (DetectResponse) -> Void, onError: @escaping (String, String) -> Void) |
func detect( _ filePath: String, onSuccess: @escaping (PerseAPIResponse.Face.Detect) -> Void, onError: @escaping (String, String) -> Void) |
func detect( _ data: Data, onSuccess: @escaping (DetectResponse) -> Void, onError: @escaping (String, String) -> Void) |
func detect( _ data: Data, onSuccess: @escaping (PerseAPIResponse.Face.Detect) -> Void, onError: @escaping (String, String) -> Void) |
func compare( _ firstFilePath: String, _ secondFilePath: String, onSuccess: @escaping (CompareResponse) -> Void, onError: @escaping (String, String) -> Void) |
func compare( _ firstFilePath: String, _ secondFilePath: String, onSuccess: @escaping (PerseAPIResponse.Face.Compare) -> Void, onError: @escaping (String, String) -> Void) |
func compare( _ firstData: Data, _ secondData: Data, onSuccess: @escaping (CompareResponse) -> Void, onError: @escaping (String, String) -> Void) |
func compare( _ firstData: Data, _ secondData: Data, onSuccess: @escaping (PerseAPIResponse.Face.Compare) -> Void, onError: @escaping (String, String) -> Void) |
✨ New Feature
Face Enrollment
Enrolled faces are persisted and can be used for saving biometric facial features for future use. The enrollment's methods allow you to create, update, delete and get enrolled faces.
face.enrollment.create
- Responsible for creating new enrollment;
- Extract the facial features of the largest face;
- Faces that are not completely inside the image will not be considered;
- The input can be the image file path or his Data;
- The
onSuccess
type isPerseAPIResponse.Face.Enrollment.Create
struct;
func create(
_ filePath: String,
onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Create) -> Void,
onError: @escaping (String, String) -> Void
)
func create(
_ data: Data,
onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Create) -> Void,
onError: @escaping (String, String) -> Void
)
face.enrollment.update
- Responsible for update a face enrollment with a new face image and user token;
- Extract the facial features of the largest face;
- Faces that are not completely inside the image will not be considered;
- The input can be the image file path or his Data;
- The
onSuccess
type isPerseAPIResponse.Face.Enrollment.Update
struct;
func update(
_ filePath: String,
_ userToken: String,
onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Update) -> Void,
onError: @escaping (String, String) -> Void
)
func update(
_ data: Data,
_ userToken: String,
onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Update) -> Void,
onError: @escaping (String, String) -> Void
)
face.enrollment.delete
- Responsible for delete an enrollment;
- This endpoint expects a "user token" in the url;
- The
onSuccess
type isPerseAPIResponse.Face.Enrollment.Delete
struct;
func delete(
onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Delete) -> Void,
onError: @escaping (String, String) -> Void
)
face.enrollment.read
- Responsible the complete list of the created "user tokens";
- The
onSuccess
type isPerseAPIResponse.Face.Enrollment.Read
struct;
func read(
onSuccess: @escaping (PerseAPIResponse.Face.Enrollment.Read) -> Void,
onError: @escaping (String, String) -> Void
)
🐛 Bug Fix
Fix terms "underexpose" to "underexposure" in the Demo project.
⚡️ Improvements
Change the tests names to the camel case pattern for better reading. This changes has no impact in tests usage.
0.2.1
⚡️ Improvements
- Add
Development.xcconfig
; - Add
API_KEY
andBASE_URL
in theinfo.plist
; - Add "base url" usage to init
PerseLite
in the example; - Add "base url" usage in the tests;
0.2.0
0.1.1
♻️ Refactor
Changes in the API Responses:
- Change
overexpose
tooverexposure
; - Change
underexpose
tounderexposure
; - Change
underexposeThreshold
toundexposure
; - Change
overexposeThreshold
tooverexposure
;
0.1.0
✨ New Feature
- New fields from the API:
- DetectThreshold: Default threshold values for detect response;
- CompareThreshold: Default threshold values for compare response;
📝 Update Readme
Complete remake of the docs.
0.0.4
♻️ Refactor
Changes in the DetectResponse and CompareResponse:
- Remove
imageTokens
field; - Remove
confidence
field; - Add
raw
field;
0.0.3
⚡️ Improvements
For the face.detect
and face.compare
onError
closure:
- add new parameter for raw text message;
- default value is
""
;
📝 Update Readme
- Update
face.detect
andface.compare
onError
closure usage; - New section to run the tests: Running Tests;
0.0.2
⚡ Improvement
For face.compare
method, improve error response for one or both images input has no face detect.