Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 3rdparty #45

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build_sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install necessary dependencies for building the CMake project
- name: Install Dependencies
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/built_release_from_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Extract the version number from the tag (e.g., "v1.2.3" becomes "1.2.3")
- name: Extract Version Number
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/linux-armv7-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install wget and xz-utils
- name: Install wget and xz-utils
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/linux-armv7-armhf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install wget and xz-utils
- name: Install wget and xz-utils
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/linux-armv7-rv1109rv1126-armhf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install wget and xz-utils
- name: Install wget and xz-utils
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/linux-ubuntu-x86.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install necessary dependencies for building the CMake project
- name: Install Dependencies
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/release-sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install necessary dependencies for building the CMake project
- name: Install Dependencies
Expand Down Expand Up @@ -70,8 +69,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install wget and xz-utils
- name: Install wget and xz-utils
Expand Down Expand Up @@ -128,8 +126,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Extract the version number from the tag (e.g., "v1.2.3" becomes "1.2.3")
- name: Extract Version Number
Expand Down Expand Up @@ -186,8 +183,7 @@ jobs:
# Step 2: Synchronize and update submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Extract the version number from the tag (e.g., "v1.2.3" becomes "1.2.3")
- name: Extract Version Number
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test_ubuntu_x86_Pikachu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ jobs:
# Step 2: Update Git submodules recursively
- name: Update submodules
run: |
git submodule sync --recursive # Ensure submodule paths are up-to-date
git submodule update --init --recursive # Initialize and update all submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git

# Step 3: Install necessary dependencies for building the CMake project
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test_res/*
resource/*
pack/*
*.zip
3rdparty
18 changes: 0 additions & 18 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/Catch2
Submodule Catch2 deleted from 182c91
1 change: 0 additions & 1 deletion 3rdparty/MNN
Submodule MNN deleted from d20f37
1 change: 0 additions & 1 deletion 3rdparty/indicators
Submodule indicators deleted from 222382
1 change: 0 additions & 1 deletion 3rdparty/inspireface-precompile
Submodule inspireface-precompile deleted from 09c66d
1 change: 0 additions & 1 deletion 3rdparty/spdlog
Submodule spdlog deleted from 27cb4c
1 change: 0 additions & 1 deletion 3rdparty/yaml-cpp
Submodule yaml-cpp deleted from 1d8ca1
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,30 @@ If you require further information on tracking development branches, CI/CD proce
Please contact [[email protected]](mailto:[email protected]?subject=InspireFace) for commercial support, including obtaining and integrating higher accuracy models, as well as custom development.

## 1. Preparation
### 1.1. Downloading 3rdparty Files
### 1.1. Pull 3rdparty Files

After pulling the project to your local machine, you need to execute the command to fetch or update the submodules, retrieving the latest submodules online to your local environment.
Clone the `3rdparty` repository from the remote repository into the root directory of the project. Note that this repository contains some submodules. When cloning, you should use the `--recurse-submodules` parameter, or after entering the directory, use `git submodule update --init --recursive` to fetch and synchronize the latest submodules:

```Bash
# Go to the project root directory
cd InspireFace/
# Pull the submodule project
# Clone the repository and pull submodules
git clone --recurse-submodules https://github.com/HyperInspire/3rdparty.git
```

If you need to update the `3rdparty` repository to ensure it is current, or if you didn't use the `--recursive` parameter during the initial pull, you can run `git submodule update --init --recursive`:

```bash
# If you're not using recursive pull
git clone https://github.com/HyperInspire/3rdparty.git

cd 3rdparty
git pull
# Update submodules
git submodule update --init --recursive
```

### 1.2. Downloading Pack Files
You can download the pack files containing models and configurations needed for compilation from [Google Drive](https://drive.google.com/drive/folders/1krmv9Pj0XEZXR1GRPHjW_Sl7t4l0dNSS?usp=sharing) and extract them to any location.
### 1.2. Downloading Model Package Files

You can download the model package files containing models and configurations needed for compilation from [Google Drive](https://drive.google.com/drive/folders/1krmv9Pj0XEZXR1GRPHjW_Sl7t4l0dNSS?usp=sharing) and extract them to any location.

### 1.3. Installing OpenCV
If you intend to use the SDK locally or on a server, ensure that OpenCV is installed on the host device beforehand to enable successful linking during the compilation process. For cross-compilation targets like Android or ARM embedded boards, you can use the pre-compiled OpenCV libraries provided by **3rdparty/inspireface-precompile/opencv/**.
Expand Down Expand Up @@ -53,7 +64,7 @@ The '3rdparty' directory already includes the MNN library and specifies a partic
CMake option are used to control the various details of the compilation phase. Please select according to your actual requirements. [Parameter table](doc/CMake-Option.md).

### 2.1. Local Compilation
Make sure OpenCV is installed, you can begin the compilation process. If you are using macOS or Linux, you can quickly compile using the shell scripts provided in the **command/** folder at the project root:
Make sure OpenCV is installed, you can begin the compilation process. If you are using macOS or Linux, you can quickly compile using the shell scripts provided in the `command` folder at the project root:
```bash
cd InspireFace/
# Execute the local compilation script
Expand All @@ -80,7 +91,7 @@ export ARM_CROSS_COMPILE_TOOLCHAIN=YOUR_DIR/gcc-arm-8.3-2019.03-x86_64-arm-linux
# Execute the cross-compilation script for RV1109/RV1126
bash command/build_cross_rv1109rv1126_armhf.sh
```
After the compilation is complete, you can find the compiled results in the **build/inspireface-linux-armv7-rv1109rv1126-armhf** directory.
After the compilation is complete, you can find the compiled results in the `build/inspireface-linux-armv7-rv1109rv1126-armhf` directory.
### 2.3. Supported Platforms and Architectures
We have completed the adaptation and testing of the software across various operating systems and CPU architectures. This includes compatibility verification for platforms such as Linux, macOS, iOS, and Android, as well as testing for specific hardware support to ensure stable operation in diverse environments.

Expand Down Expand Up @@ -189,12 +200,12 @@ if (ret != HSUCCEED) {
return ret;
}
```
For more examples, you can refer to the **cpp/sample** sub-project located in the root directory. You can compile these sample executables by enabling the **ISF_BUILD_WITH_SAMPLE** option during the compilation process.
For more examples, you can refer to the `cpp/sample` sub-project located in the root directory. You can compile these sample executables by enabling the `ISF_BUILD_WITH_SAMPLE` option during the compilation process.

**Note**: For each error code feedback, you can click on this [link](doc/Error-Feedback-Codes.md) to view detailed explanations.

### 3.2. Python Native Sample
We provide a Python API that allows for more efficient use of the InspireFace library. After compiling the dynamic link library, you need to either symlink or copy it to the **python/inspireface/modules/core** directory within the root directory. You can then start testing by navigating to the **[python/](python/)** directory. Your Python environment will need to have some dependencies installed:
We provide a Python API that allows for more efficient use of the InspireFace library. After compiling the dynamic link library, you need to either symlink or copy it to the `python/inspireface/modules/core` directory within the root directory. You can then start testing by navigating to the **[python/](python/)** directory. Your Python environment will need to have some dependencies installed:

- python >= 3.7
- opencv-python
Expand Down Expand Up @@ -256,7 +267,7 @@ In the project, there is a subproject called cpp/test. To compile it, you need t
```bash
cmake -DISF_BUILD_WITH_TEST=ON ..
```
If you need to run test cases, you will need to download the required [resource files](https://drive.google.com/file/d/1i4uC-dZTQxdVgn2rP0ZdfJTMkJIXgYY4/view?usp=sharing), which are **test_res** and **pack** respectively. Unzip the pack file into the test_res folder. The directory structure of test_res should be prepared as follows before testing:
If you need to run test cases, you will need to download the required [resource files](https://drive.google.com/file/d/1i4uC-dZTQxdVgn2rP0ZdfJTMkJIXgYY4/view?usp=sharing), which are **test_res** and **Model Package** respectively. Unzip the pack file into the test_res folder. The directory structure of test_res should be prepared as follows before testing:

```bash

Expand All @@ -270,7 +281,7 @@ test_res
└── video_frames

```
After compilation, you can find the executable program "Test" in **YOUR_BUILD_FOLDER/test**. The program accepts two optional parameters:
After compilation, you can find the executable program "**Test**" in `YOUR_BUILD_FOLDER/test`. The program accepts two optional parameters:

- **test_dir**:Path to the test resource files
- **pack**:Name of the model to be tested
Expand Down Expand Up @@ -298,7 +309,7 @@ The following functionalities and technologies are currently supported.
| 10 | Cooperative Liveness Detection | ![Static Badge](https://img.shields.io/badge/PENDING-yellow?style=for-the-badge) | |


## 6. Models Pack List
## 6. Models Package List

For different scenarios, we currently provide several Packs, each containing multiple models and configurations.

Expand Down
Loading