https://github.com/elfsundae/faceunity
iOS face-beautification toolkit built upon FaceUnity Nama SDK and FULiveDemo. 相芯美颜 SDK 集成工具包。
https://github.com/elfsundae/faceunity
animoji ar-model face-beautification face-beautify face-detection face-tracking faceunity video-effect video-processing
Last synced: 5 months ago
JSON representation
iOS face-beautification toolkit built upon FaceUnity Nama SDK and FULiveDemo. 相芯美颜 SDK 集成工具包。
- Host: GitHub
- URL: https://github.com/elfsundae/faceunity
- Owner: ElfSundae
- License: mit
- Created: 2020-03-25T09:49:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T07:17:59.000Z (almost 3 years ago)
- Last Synced: 2025-07-23T23:42:03.856Z (6 months ago)
- Topics: animoji, ar-model, face-beautification, face-beautify, face-detection, face-tracking, faceunity, video-effect, video-processing
- Language: Objective-C
- Homepage:
- Size: 17.7 MB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FaceUnity
[](https://github.com/ElfSundae/FaceUnity/actions?query=workflow%3ABuild)

iOS face-beautification toolkit built upon [FaceUnity](https://www.faceunity.com) Nama SDK and [FULiveDemo](https://github.com/Faceunity/FULiveDemo).
相芯美颜 SDK 集成工具包。
## Installation
Install along with the **lite** version of Nama SDK which without physics engine:
```ruby
pod 'FaceUnity'
```
Or install along with the **full** version of Nama SDK:
```ruby
pod 'FaceUnity/Full'
```
## Usage
### Configure auth data for Nama SDK
You must call `FUSetAuthData()` to configure your FaceUnity auth data before invoking any methods of Nama SDK:
```objc
#import
#import "authpack.h"
FUSetAuthData(&g_auth_package, sizeof(g_auth_package));
```
`FUSetAuthData()` can be called multiple times before you use any FaceUnity functions, it is useful when you want to load the auth data from a remote location, for example:
```objc
if (! loadFromCache(cacheFile)) {
// Load the default authpack.
FUSetAuthData(&g_auth_package, sizeof(g_auth_package));
}
downloadAuthData(cacheFile, ^{
loadFromCache(cacheFile);
});
```
### Preload items
After configuring the auth data, you may preload items to speed up the first loading time:
```objc
// Preload FaceUnity dataSource and items.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[FUManager shareManager] loadFilter];
});
```
### Nama SDK documentation
See [Docs](Docs/).