Skip to content

Commit 0fd6087

Browse files
committed
To fix local conflict.
2 parents 6600c56 + bfbdf68 commit 0fd6087

42 files changed

Lines changed: 12185 additions & 1164 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ runtime
55
build/build/*
66
build/dist/*
77
build/runtime_arch
8+
build/*
9+
*node_modules/*
10+
test/node_modules/*
11+
*.tgz
12+
.DS_Store

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Full stack system for the deep learning edge computing devices, espeicailly set-
77
## Automatically train/deploy model for edge device(Embedded/Android/X86 system)
88
## Power efficient, Easy scalable, Production ready, Mobile first
99

10-
![image](screenshots/lifecycle.png)
10+
![image](screenshots/lifecycle_mac.png)
1111

1212
# Feature List
1313
- [x] High accurate Face Recognition
@@ -46,18 +46,13 @@ Full stack system for the deep learning edge computing devices, espeicailly set-
4646
# Demo
4747
![demo](https://github.com/SharpAI/DeepCamera/blob/master/screenshots/demo.gif)
4848

49-
# Purchase Dev Kit for easily startup
50-
Run from code is time consuming task even with experts' supporting, we are considering to provide full set of development kit to easy the setup effort you may face to.
51-
[Please thumb up if you want one](https://github.com/SharpAI/DeepCamera/issues/8)
52-
### How it works from end user's point of view, green parts are done if using Dev Kit
53-
![From end user's view](screenshots/on_app_end_user.png)
54-
5549
# How to Run DeepCamera From Source Code
50+
![From end user's view](screenshots/on_app_end_user.png)
5651

5752
## 1. Generate/Get Serial No
5853
### Android
59-
After install Launcher(Modified Termux), the serial_no will be placed:
60-
`/data/data/com.termux/files/home/.ro_serialno`
54+
After install Launcher(Modified Termux), QR Code is placed on screen.
55+
6156
### Linux/MacOS
6257
Get your Mac Address(1e:20:34:10:24:21)
6358
```
@@ -70,7 +65,7 @@ echo 1e2034102421 > docker/workaipython/ro_serialno
7065

7166
## 3. How to Run DeepCamera on Edge Device
7267

73-
### 3.1 [Run on Android(5.1+ aarch64)](docs/Run_On_Android_aarch64.md)
68+
### 3.1 [Run on Android(5.1+ aarch64)](docs/Run_Source_Android_aarch64.md)
7469
### 3.2 Run on Rockchip RK3399 with linux/docker
7570
#### 3.2.1 Use prebuilt docker images
7671
```
@@ -111,6 +106,8 @@ Shinobi login page(device_ip:8080):
111106
username: user@sharpaibox.com
112107
password: SharpAI2018
113108

109+
You can also [turn Mac Camera into RTSP camera(not tested)](https://www.tribler.org/MacWebcam/)
110+
114111
### 4.2 Android(Dahua SDK Configure)
115112
Code is [here](https://github.com/SharpAI/RTSP_Decoder_IJKPlayer/blob/od_gl_based/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/activities/CameraScanActivity.java#L147)
116113

@@ -120,7 +117,18 @@ Code is [here](https://github.com/SharpAI/ScreenCapture)
120117
### 4.4 Android(RTSP url config)
121118
Comming soon
122119

123-
## [How to configure on Mobile APP](https://github.com/SharpAI/mobile_app_server/blob/android_porting/README.md)
120+
# Survey: Do you want to have Dev Kit for easily startup
121+
We are considering to provide full set of development kit to easy the setup effort you may face to.
122+
[Please thumb up if you want one](https://github.com/SharpAI/DeepCamera/issues/8)
123+
### How it works from end user's point of view, green parts are done if using Dev Kit
124+
![From end user's view](screenshots/on_app_end_user.png)
125+
126+
## [How to configure on Mobile APP, Chinese Version](https://github.com/SharpAI/mobile_app_server/blob/android_porting/README.md)
127+
128+
## Application in English(Beta Test)
129+
Android: https://www.pgyer.com/app/install/0e87e08c72a232e8f39a6a7c76222038
130+
iOS: https://testflight.apple.com/join/8LXGgu3q
131+
124132
## [How to deploy server on your server](https://github.com/SharpAI/mobile_app_server/issues/1)
125133
# Call For Help
126134
- [ ] Documents, A LOT OF DOCUMENTS, we already deploy our deep camera in industry leading company but we don't have extra resource to build up community friendly documents.

build/build_aarch64.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ fi
2525
mkdir -p $runtime/bin/model
2626

2727
pyinstaller --clean -y classifier_server.spec
28-
#cp -f ../src/embedding/judgeutil.so_termux-linux-aarch64 dist/classifier/judgeutil.so
2928
cp -rf dist/classifier/* runtime/bin/
3029
rm -rf dist/classifier/*
3130

build/scripts/embedding_aarch64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
export RUNTIME_BASEDIR=`pwd`
3-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib64:/system/lib64
3+
export LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64:/system/vendor/lib64/egl:/system/vendor/lib64
44
export DATA_RUNTIME_FOLDER=../model
55
export DEVICE_UUID_FILEPATH=/data/data/com.termux/files/home/.ro_serialno
66
export DEVICE_GROUP_ID_FILEPATH=/data/data/com.termux/files/home/.groupid.txt

build/scripts/start_aarch64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ function startserver()
7474
fi
7575
}
7676

77-
checkUUID
77+
#checkUUID
7878
startserver

build/scripts/start_arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ function startserver()
7878
fi
7979
}
8080

81-
checkUUID
81+
#checkUUID
8282
startserver

build/scripts/start_monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ while true; do
1717
#disable watchtower before startup index.js
1818
#rm -rf ${AUTO_UPDATE_FILE}
1919
pushd monitor
20-
node main.bin.js\
20+
node main.bin.js
2121
popd
2222
#popd
2323
echo "exit index.js"

build/scripts/worker_aarch64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export DATA_RUNTIME_FOLDER=../model
55
cd bin
66
while [ 1 ]
77
do
8-
./worker worker --loglevel INFO -E -n detect -c 1 -Q detect
8+
REDIS_HOST=localhost REDIS_PORT=6379 ONE_KNOWN_PERSON_BYPASS_QUEUE_MODE=0 DEEP_ANALYSIS_MODE=1 SAMPLING_TO_SAVE_ENERGY_MODE=0 RESTRICT_RECOGNITON_MODE=0 MINIMAL_FACE_RESOLUTION=100 BIGGEST_FACE_ONLY_MODE=0 UPLOAD_IMAGE_SERVICE_ENABLED=0 GIF_UPLOADING=1 REALTIME_STRANGER_SDK_MESSAGE=1 ENABLE_STATIC_OBJECT_FILTER=false ./worker worker --loglevel INFO -E -n detect -c 1 -Q detect
99
sleep 20
1010
done

docs/Run_On_Android_aarch64.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Run On Android(AArch64)
2+
## Tested Device
3+
|Chipset|Memory Size|GPU Model|Device Model|System|Issue|
4+
|:-----:|:---------:|:-------:|:----------:|:----:|:---:|
5+
|Rockchip RK3399|4GB|Mali-T760 MP4|H96 MAX|Android 7.1.2||
6+
|Rockchip RK3399|4GB|Mali-T760 MP4|Rockpro64|Android 7.1.2||
7+
|Samsung Exynos 7420|3GB|Mali-T760 MP8|VR on avl7420|Android 6.0.1||
8+
|Samsung Exynos 7420|3GB|Mali-T760 MP8|SM-G920A|Android 7.0||
9+
|MediaTek MT6797|3GB|Mali-T880 MP4|Chuwi Hi9 Pro Tablet|Android 8.0.0|[TfLite Object Detection](https://github.com/SharpAI/DeepCamera/issues/19)|
10+
|HiSilicon Kirin 970|4GB|Mali-G72 MP12 + NPU|Huawei Honor 10|Android 8.1.2|[TfLite Object Detection](https://github.com/SharpAI/DeepCamera/issues/19)|
211

312
## Get Launcher_Termux source code
413
```
@@ -31,23 +40,54 @@ ssh -p 8022 a@Android_IP
3140
pkg update
3241
pkg install wget
3342
cd /data/data/com.termux/files
34-
wget https://github.com/SharpAI/DeepCamera/releases/download/1.1/usr_aarch64_dev_1204_2018.tgz
35-
tar -zxf usr_aarch64_dev_1204_2018.tgz
43+
wget https://github.com/SharpAI/DeepCamera/releases/download/1.1/usr_aarch64_dev_0318_2019.tgz
44+
tar -zxf usr_aarch64_dev_0318_2019.tgz
3645
```
37-
#### you can delete usr_aarch64_dev_1204_2018.tgz to save space or just keep it
46+
#### you can delete usr_aarch64_dev_0318_2019.tgz to save space or just keep it
3847

3948
## Test if working
4049

41-
### Following works on Rockpro64 Android 7.1.2, please report issue if you have runtime warning
50+
### please report issue if you have runtime warning
4251
```
43-
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib64:/system/lib64:/system/vendor/lib64/egl:/system/vendor/lib64 LD_PRELOAD=$LD_PRELOAD:/system/lib64/libcrypto.so:/system/lib64/libcompiler_rt.so python2
52+
LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64:/system/vendor/lib64/egl:/system/vendor/lib64 python2
4453
4554
import tvm
46-
import mxnet
4755
```
4856
```
4957
>>> tvm.__version__
5058
'0.5.dev'
59+
```
60+
### please report issue if you have runtime warning
61+
```
62+
LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64 python2
63+
64+
import mxnet
65+
```
66+
```
5167
>>> mxnet.__version__
52-
'0.10.1'
68+
'1.3.1'
69+
```
70+
## Get the source code of DeepCamera
71+
```
72+
cd
73+
git clone https://github.com/SharpAI/DeepCamera
74+
cd DeepCamera
75+
./setup.sh
76+
cd build
77+
./build_aarch64.sh ./
78+
```
79+
80+
## Install the built code
81+
82+
```
83+
cd DeepCamera/build
84+
tar -zxmf sharpai-app-aarch64.tgz -C ~
85+
```
86+
87+
## Run the built code
88+
89+
```
90+
cd /data/data/com.termux/files/home/runtime
91+
termux-wake-lock
92+
setsid bash ~/runtime/start_aarch64.sh
5393
```

docs/Run_Source_Android_aarch64.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Run On Android(AArch64)
2+
## Tested Device
3+
|Chipset|Memory Size|GPU Model|Device Model|System|Issue|
4+
|:-----:|:---------:|:-------:|:----------:|:----:|:---:|
5+
|Rockchip RK3399|4GB|Mali-T760 MP4|H96 MAX|Android 7.1.2||
6+
|Rockchip RK3399|4GB|Mali-T760 MP4|Rockpro64|Android 7.1.2||
7+
|Samsung Exynos 7420|3GB|Mali-T760 MP8|VR on avl7420|Android 6.0.1||
8+
|Samsung Exynos 7420|3GB|Mali-T760 MP8|SM-G920A|Android 7.0||
9+
|MediaTek MT6797|3GB|Mali-T880 MP4|Chuwi Hi9 Pro Tablet|Android 8.0.0|[TfLite Object Detection](https://github.com/SharpAI/DeepCamera/issues/19)|
10+
|HiSilicon Kirin 970|4GB|Mali-G72 MP12 + NPU|Huawei Honor 10|Android 8.1.2|[TfLite Object Detection](https://github.com/SharpAI/DeepCamera/issues/19)|
11+
12+
## Get Launcher_Termux source code
13+
```
14+
git clone https://github.com/SharpAI/Launcher_Termux
15+
```
16+
17+
## Config authorized_keys for ssh
18+
Open Launcher_Termux, add your id_rsa.pub in authorized_keys
19+
20+
![add authorized keys](../screenshots/add_authorized_keys.png)
21+
22+
## Launch Launcher_Termux in Android Studio
23+
24+
## Install openssh in Launcher_Termux
25+
26+
```
27+
pkg install openssh
28+
sshd
29+
```
30+
31+
## Remote access to Launcher_Termux through ssh
32+
33+
```
34+
ssh -p 8022 a@Android_IP
35+
```
36+
37+
## Install development rootfs(Launcher_Termux ssh environment)
38+
39+
```
40+
pkg update
41+
pkg install wget
42+
cd /data/data/com.termux/files
43+
wget https://github.com/SharpAI/DeepCamera/releases/download/1.1/usr_aarch64_dev_0318_2019.tgz
44+
tar -zxf usr_aarch64_dev_0318_2019.tgz
45+
```
46+
#### you can delete usr_aarch64_dev_0318_2019.tgz to save space or just keep it
47+
48+
## Test if working
49+
50+
### please report issue if you have runtime warning
51+
```
52+
LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64:/system/vendor/lib64/egl:/system/vendor/lib64 python2
53+
54+
import tvm
55+
```
56+
```
57+
>>> tvm.__version__
58+
'0.5.dev'
59+
```
60+
### please report issue if you have runtime warning
61+
```
62+
LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH:$PREFIX/lib64 python2
63+
64+
import mxnet
65+
```
66+
```
67+
>>> mxnet.__version__
68+
'1.3.1'
69+
```
70+
## Get the source code of DeepCamera
71+
```
72+
cd
73+
git clone https://github.com/SharpAI/DeepCamera
74+
cd DeepCamera
75+
./setup.sh
76+
./start_service.sh
77+
```

0 commit comments

Comments
 (0)