-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
XiaochaoGONG
committed
Nov 23, 2018
0 parents
commit 64ddade
Showing
137 changed files
with
28,997 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build | ||
|
||
sdkconfig | ||
sdkconfig.old |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
stages: | ||
- build | ||
- deploy | ||
|
||
variables: | ||
# System environment | ||
|
||
# Common parameters for the 'make' during CI tests | ||
MAKEFLAGS: "-j5 --no-keep-going" | ||
|
||
# GitLab-CI environment | ||
|
||
# more attempts for more robust | ||
GET_SOURCES_ATTEMPTS: "10" | ||
ARTIFACT_DOWNLOAD_ATTEMPTS: "10" | ||
|
||
# We use get_sources.sh script to fetch the submodules and/or re-fetch the repo | ||
# if it was corrupted (if submodule update fails this can happen) | ||
GIT_STRATEGY: clone | ||
GIT_SUBMODULE_STRATEGY: none | ||
IDF_PATH: "$CI_PROJECT_DIR/esp-idf" | ||
|
||
before_script: | ||
# add gitlab ssh key | ||
- mkdir -p ~/.ssh | ||
- chmod 700 ~/.ssh | ||
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64 | ||
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa | ||
- chmod 600 ~/.ssh/id_rsa | ||
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | ||
# replace submodule esp-idf to internal repository to speedup cloning | ||
- sed -i "s%https://github.com/espressif/esp-idf%${GITLAB_SSH_SERVER}/idf/esp-idf.git%" .gitmodules | ||
- git submodule update --init | ||
# (the same regular expressions are used to set these are used in 'only:' sections below | ||
- source esp-idf/tools/ci/configure_ci_environment.sh | ||
|
||
# fetch the submodules (& if necessary re-fetch repo) from gitlab | ||
- time ./esp-idf/tools/ci/get-full-sources.sh | ||
|
||
|
||
.add_gitlab_key_before: | ||
before_script: &add_gitlab_key_before | ||
- echo "Not fetching submodules" | ||
- source ${IDF_PATH}/tools/ci/configure_ci_environment.sh | ||
# add gitlab ssh key | ||
- mkdir -p ~/.ssh | ||
- chmod 700 ~/.ssh | ||
- echo -n $AUTO_KEY > ~/.ssh/id_rsa_base64 | ||
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa | ||
- chmod 600 ~/.ssh/id_rsa | ||
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | ||
|
||
.build_template: &build_template | ||
stage: build | ||
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG | ||
tags: | ||
- build | ||
variables: | ||
BATCH_BUILD: "1" | ||
V: "0" | ||
|
||
.build_examples_make_template: &build_examples_make_template | ||
<<: *build_template | ||
retry: 1 | ||
artifacts: | ||
when: always | ||
paths: | ||
- build_examples/*/*/build/*.bin | ||
- build_examples/*/*/build/*.elf | ||
- build_examples/*/*/build/*.map | ||
- build_examples/*/*/build/download.config | ||
- build_examples/*/*/build/bootloader/*.bin | ||
- ${LOG_PATH} | ||
- ${IDF_PATH}/tools/ci | ||
expire_in: 1 week | ||
variables: | ||
IDF_CI_BUILD: "1" | ||
LOG_PATH: "$CI_PROJECT_DIR/log_examples_make" | ||
script: | ||
# it's not possible to build 100% out-of-tree and have the "artifacts" | ||
# mechanism work, but this is the next best thing | ||
- rm -rf build_examples | ||
- mkdir build_examples | ||
- cd build_examples | ||
- mkdir -p ${LOG_PATH} | ||
- ${CI_PROJECT_DIR}/tools/ci/build_examples.sh "${CI_PROJECT_DIR}/examples" "${CI_JOB_NAME}" | ||
|
||
build_examples_make_00: | ||
<<: *build_examples_make_template | ||
|
||
|
||
push_to_github: | ||
stage: deploy | ||
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG | ||
tags: | ||
- deploy | ||
only: | ||
- master | ||
- /^release\/v/ | ||
when: on_success | ||
dependencies: | ||
- build_examples_make_00 | ||
before_script: | ||
- echo "skip default before_script" | ||
script: | ||
- mkdir -p ~/.ssh | ||
- chmod 700 ~/.ssh | ||
- echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64 | ||
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa | ||
- chmod 600 ~/.ssh/id_rsa | ||
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config | ||
- git remote remove github &>/dev/null || true | ||
- git remote add github [email protected]:espressif/esp-who.git | ||
- ${IDF_PATH}/tools/ci/push_to_github.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "esp-idf"] | ||
path = esp-idf | ||
url = https://github.com/espressif/esp-idf | ||
[submodule "components/esp-face"] | ||
path = components/esp-face | ||
url = https://github.com/espressif/esp-face | ||
[submodule "components/esp32-camera"] | ||
path = components/esp32-camera | ||
url = https://github.com/espressif/esp32-camera.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Change log for esp-who | ||
|
||
## 0.1.0 | ||
Initial commit, esp-who appear in the world. | ||
- Elementry functions such as image processing and matrix computing | ||
- Face detection | ||
- Components such as camera | ||
|
||
## 0.1.1 | ||
Open coefficients for facial detection | ||
- Provide interface to generate customized coefficients via `mkmodel` (temporally support linux only, other os coming soon) | ||
|
||
## 0.5.0 | ||
Face recognition framework | ||
- Add face recognition relative framework | ||
- Provide basic face recognition example | ||
- Move `esp_facenet` to `esp-face` as submodule | ||
- Add some documents for API reference and guide | ||
|
||
## 0.5.1 | ||
Modify recognition example | ||
- enroll procedure changes to waiting 3 seconds | ||
- update readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
ESPRESSIF MIT License | ||
|
||
Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD> | ||
|
||
Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case, | ||
it is free of charge, to any person obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or | ||
substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# ESP-WHO | ||
|
||
ESP-WHO is a face detection and recognition platform that is currently based on Espressif Systems' [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip. | ||
|
||
# Overview | ||
ESP-WHO supports development of face detection and recognition applications based around Espressif Systems' [ESP32](https://espressif.com/en/products/hardware/esp32/overview) chip in the most convenient way. With ESP-WHO, you can easily build up face detection- and recognition-featured applications, for instance: | ||
* A coffee machine that brews coffee according to your taste preference; | ||
* Home applicance that will shut off the electricity automatically when unsupervised children are operating them; | ||
* And other more applications that suit your needs. | ||
|
||
In general, the ESP-WHO features will be supported as shown below: | ||
|
||
![overview](img/overview.jpg) | ||
|
||
In ESP-WHO, Detection, Recognition and Image Utility are at the core of the platform. | ||
|
||
|
||
* **Image Utility** offers fundamental image processing APIs for ESP32. | ||
|
||
* **Detection** takes images as input and give the position of face if there is a face. It is implemented with MTMN model, which refers to [MTCNN](http://cn.arxiv.org/abs/1604.02878) and [MobileNet](https://arxiv.org/abs/1801.04381). However, we replace CNN with MobileNet block and the model size is quite smaller than other face detection models. | ||
|
||
* **Recognition** is to identify the particular person, and it needs the results of detection. It is implemented with MobileFace model. | ||
|
||
|
||
Both input and output are flexible. | ||
|
||
* Image sources could be **input** via camera. However, we don't provide many drivers right now, those for other camera modules will be released in the future. | ||
|
||
* Results could be **output** and displayed through Command line, LCD or even website via Wi-Fi http service. | ||
|
||
|
||
# Quick Start with ESP-WHO | ||
|
||
## Hardware Preparation | ||
|
||
To run ESP-WHO, you need to have a development board which integrates a **ESP32 module** that has sufficient GPIO pins and more than **4 MB** external SPI RAM. In this case, we take **ESP-WROVER-KIT** as the test board, which is highly recommended for getting started with ESP-WHO. | ||
|
||
On how to configure ESP32 module for your applications, please refer to the README.md of each example. | ||
|
||
## Software Preparation | ||
|
||
### Image | ||
|
||
The recommended resolution of input image is **QVGA (320x240)**. | ||
|
||
As for choosing camera as an image offer, make sure that the ESP32 module you choose offers specific pins that your camera needs. If there are pin conflicts, please refer to the pin connection in README.md of each example. | ||
|
||
By now, we have provided the driver of **OV2640**, which is highly recommended to get started with. | ||
|
||
### ESP-WHO | ||
Make sure you clone the project recursive: | ||
|
||
``` | ||
git clone --recursive https://github.com/espressif/esp-who.git | ||
``` | ||
|
||
If you clone project without `--recursive` flag, please go to the `esp-who` directory and run command `git submodule update --init` before doing anything. | ||
|
||
### ESP-IDF | ||
See setup guides for detailed instructions to set up the ESP-IDF: | ||
|
||
* [Getting Started Guide for the stable ESP-IDF version](https://docs.espressif.com/projects/esp-idf/en/stable/get-started/) | ||
* [Getting Started Guide for the latest (master branch) ESP-IDF version](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/) | ||
|
||
In this case, we take [ESP-IDF v3.1](https://github.com/espressif/esp-idf/releases/v3.1) as the test version. | ||
|
||
|
||
# Components | ||
|
||
Components is the main framework of the SDK, with camera driver and algorithm inside. | ||
|
||
See the following sections for more details about components. | ||
|
||
## Camera | ||
|
||
The [camera](components/camera) component contains drivers for camera devices of ESP32. Now OV2640 is supported. | ||
|
||
|
||
## esp-face | ||
|
||
The [esp-face](components/esp-face) component contains the APIs of ESP-WHO neural networks, including face detection and recognition framework. | ||
|
||
|
||
# Examples | ||
The folder of [examples](examples) contains sample applications demonstrating the API features of ESP-WHO. | ||
|
||
Take one Face Detection as an example. | ||
|
||
1. Get into one example folder `esp-who/examples/single_chip/detection_with_command_line`. | ||
``` | ||
cd esp-who/examples/single_chip/detection_with_command_line | ||
``` | ||
|
||
2. Compile the project. You may run `make defconfig` before `make flash` to get the default configurations. | ||
``` | ||
make defconfig | ||
make flash | ||
``` | ||
3. Advanced users can modify some options by using the command `make menuconfig`. | ||
|
||
|
||
Check README.md of each example for more details. | ||
|
||
|
||
# Resources | ||
|
||
* [Check the Issues section on github](https://github.com/espressif/esp-who/issues) if you find a bug or have a feature request, please check existing Issues before opening a new one. | ||
|
||
* If you're interested in contributing to ESP-WHO, please check the [Contributions Guide](https://esp-idf.readthedocs.io/en/latest/contribute/index.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components | ||
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/lib | ||
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/image_util | ||
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/face_detection/fd_coefficients | ||
EXTRA_COMPONENT_DIRS += $(SOLUTION_PATH)/components/esp-face/face_recognition/fr_coefficients |
Submodule esp32-camera
added at
f1a7c3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
default.vim | ||
fontconvert/fontconvert |
Oops, something went wrong.