Skip to content

Commit 0c3a33e

Browse files
committed
RK
1 parent 6020e6b commit 0c3a33e

2 files changed

Lines changed: 101 additions & 2 deletions

File tree

docs/using-with/ios.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
11
# Using InspireFace in iOS
22

3-
We provide C and C++ header files, which you can use by enabling C/C++ compiler features in Xcode.
3+
We provide C and C++ header files, which you can use by enabling C/C++ compiler features in Xcode.
4+
5+
## How to Get the SDK
6+
7+
1. You can download the iOS SDK from the [release page](https://github.com/HyperInspire/InspireFace/releases), which includes iOS InspireFace static library files and framework files;
8+
9+
2. You can also compile from source code using a macOS device:
10+
11+
```bash
12+
bash command/build_ios.sh
13+
```
14+
15+
The compilation results will be consistent with the iOS SDK downloaded from the [release page](https://github.com/HyperInspire/InspireFace/releases).
16+
17+
## 2. Specifications
18+
19+
### Requirements and Dependencies
20+
21+
- Framework type: Static library
22+
- Minimum supported version: iOS 11.0
23+
- Supported architecture: armv8 (ARM64)
24+
- Simulator version not supported yet
25+
- Dependencies:
26+
- libc++.tbd
27+
- UIKit.framework
28+
- CoreML.framework
29+
- Foundation.framework
30+
- MNN.framework(2.8.1)
31+
- SDK version: 10.2.3 (corresponding to open source version 1.2.3)
32+
- Bitcode: Enabled
33+
34+
35+
## 3. Integration Guide
36+
37+
1. You need to add **InspireFace.framework** and **MNN.framework** to your project, and add the required dependency libraries;
38+
39+
![step1](https://inspireface-1259028827.cos.ap-singapore.myqcloud.com/docs/setup_s1.png)
40+
41+
2. Download the models you need. You can download the required models from the [Github Release](https://github.com/HyperInspire/InspireFace/releases/tag/v1.x) page and add them to your project;
42+
43+
3. You can refer to [C/C++ usage examples](https://doc.inspireface.online/using-with/c-cpp.html) for related usage.

docs/using-with/rknpu.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
11
# Using InspireFace in Rockchip NPU
22

3-
TODO
3+
## How to Use the SDK
4+
5+
InspireFace-SDK already supports Rockchip's RKNPU and RGA technologies. Most of the basic interfaces of all InspireFace libraries are consistent with no differences, so you can refer to C/C++ and other related usage cases to quickly get started with the RK device-optimized version.
6+
7+
## API Differences
8+
9+
We provide several dedicated APIs for the RK version:
10+
11+
### RGA Related
12+
13+
RKRGA is an image processing acceleration engine provided by RK devices, which can provide acceleration for 2D image transformation processing using hardware advantages. We provide a series of interfaces for configuring RGA.
14+
15+
```c
16+
/**
17+
* @brief Check whether RGA is enabled during compilation
18+
* @param status Pointer to the status variable that will be returned.
19+
* @return HResult indicating the success or failure of the operation.
20+
* */
21+
HYPER_CAPI_EXPORT extern HResult HFQueryExpansiveHardwareRGACompileOption(HPInt32 enable);
22+
23+
/**
24+
* @brief Set the rockchip dma heap path
25+
* By default, we have already configured the DMA Heap address used by RGA on RK devices.
26+
* If you wish to customize this address, you can modify it through this API.
27+
* @param path The path to the rockchip dma heap
28+
* @return HResult indicating the success or failure of the operation.
29+
* */
30+
HYPER_CAPI_EXPORT extern HResult HFSetExpansiveHardwareRockchipDmaHeapPath(HPath path);
31+
32+
/**
33+
* @brief Query the rockchip dma heap path
34+
* @param path Pointer to a pre-allocated character array that will store the returned path.
35+
* The array should be at least 256 bytes in size.
36+
* @return HResult indicating the success or failure of the operation.
37+
* */
38+
HYPER_CAPI_EXPORT extern HResult HFQueryExpansiveHardwareRockchipDmaHeapPath(HString path);
39+
40+
/**
41+
* @brief Enum for image processing backend.
42+
*/
43+
typedef enum HFImageProcessingBackend {
44+
HF_IMAGE_PROCESSING_CPU = 0, ///< CPU backend(Default)
45+
HF_IMAGE_PROCESSING_RGA = 1, ///< Rockchip RGA backend(Hardware support is mandatory)
46+
} HFImageProcessingBackend;
47+
48+
/**
49+
* @brief Switch the image processing backend, must be called before HFCreateInspireFaceSession.
50+
* @param backend The image processing backend to be set.
51+
* @return HResult indicating the success or failure of the operation.
52+
* */
53+
HYPER_CAPI_EXPORT extern HResult HFSwitchImageProcessingBackend(HFImageProcessingBackend backend);
54+
55+
/**
56+
* @brief Set the image process aligned width, must be called before HFCreateInspireFaceSession.
57+
* @param width The image process aligned width to be set.
58+
* @return HResult indicating the success or failure of the operation.
59+
* */
60+
HYPER_CAPI_EXPORT extern HResult HFSetImageProcessAlignedWidth(HInt32 width);
61+
```
62+

0 commit comments

Comments
 (0)