coolseven / huawei-frs-sdk
Huawei Frs (Face Recognition Service) SDK for PHP
v1.5.0
2020-05-03 18:39 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- moontoast/math: ^1.2
- phpunit/phpunit: ~4.0
- ramsey/uuid: ^3.9
This package is auto-updated.
Last update: 2025-03-22 01:16:54 UTC
README
Non-Official PHP sdk for Huawei's Face Recognization Service.
Important: This IS NOT AN OFFICIAL SDK. Use It At Your Own Risk.
Requirements
- php >= 7.2
How to use
- Install Sdk
composer require coolseven/huawei-frs-sdk
- Use Sdk
// $endpoint , $ak,$sk can be found at Huawei's console panel $authInfo = new AuthInfo($endpoint,$ak,$sk); $frsClient = new FrsClient($authInfo,$projectId); // get face set list // v1 版本: $responseOfV1 = $frsClient ->getFaceSetService() ->getAllFaceSets(); // v2 版本: $responseOfV2 = $frsClient->getApiCollectionV2() ->getFaceSetService() ->getAllFaceSets();
More usage demos can be found at tests
- Services & Api Cheat Sheet
- CompareService
- compareFaceByBase64
- compareFaceByObsUrl
- compareFaceByLocalFile
- DetectService
- detectFaceByBas464
- detectFaceByObsUrl
- detectFaceByLocalFile
- FaceService
- getFaces
- getFace
- addFaceByBase64
- addFaceByObsUrl
- addFaceByLocalFile
- updateFaceByFaceId
- deleteFaceByFaceId
- deleteFaceByExternalImageId
- deleteFaceByExternalField
- batchDeleteFacesByFilter
- FaceSetService
- getAllFaceSets
- getFaceSet
- createFaceSet
- deleteFaceSet
- LiveDetectService
- liveDetectByBase64
- liveDetectByObsUrl
- liveDetectByLocalFile
- SearchService
- searchFaceByBase64
- searchFaceByFaceId
- searchFaceByObsUrl
- CompareService
TODO
- Add unit tests for FaceSetService
- Add unit tests for FaceService
- Add unit tests for SearchService
- Add unit tests for DetectService
- Add unit tests for CompareService
- Add unit tests for LiveDetectService
- Add parameter validation