Skip to content
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
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ os: linux
language: c
service: docker
script:
- cd $TRAVIS_BUILD_DIR/docker/build/tensorflow && docker build -f Dockerfile.arm64v8 -t shareai/tensorflow:arm64v8_latest .
#- cd $TRAVIS_BUILD_DIR/docker/build/tensorflow && docker build -f Dockerfile.arm64v8 -t shareai/tensorflow:arm64v8_latest .
#- cd $TRAVIS_BUILD_DIR/docker/build/od && docker build -f Dockerfile.arm64v8 -t shareai/od:arm64v8_latest .
- cd $TRAVIS_BUILD_DIR/docker/build && docker-compose -f docker-compose-arm64v8.yml build
after_success:
- docker login --username shareai --password $DOCKER_HUB_TOKEN
- docker push shareai/tensorflow:arm64v8_latest
#- docker push shareai/od:arm64v8_latest
- cd $TRAVIS_BUILD_DIR/docker/build && docker-compose -f docker-compose-arm64v8.yml push
cache:
directories:
- /home/travis/docker/
before_install:
- docker load -i /home/travis/docker/cache.tar || true
before_cache:
- mkdir docker_images || true
- docker save -o /home/travis/docker/cache.tar $(docker images -a -q)
26 changes: 10 additions & 16 deletions docker/build/face_detection/Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
FROM shareai/tensorflow:arm64v8_latest
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get install --no-install-recommends -y python python-pip python-opencv python-dev \
zlib1g-dev gcc python-pil && \
RUN apt-get update && apt-get install --no-install-recommends -y python python-pip python-opencv \
zlib1g-dev libjpeg62-turbo-dev libopencv-dev libopencv-ts-dev python-pil python-scipy python-matplotlib \
python-numpy python-pil python-scipy python-skimage libopencv-videostab-dev && \
apt-get clean
RUN apt-get update && apt-get install -y git scons cmake wget unzip curl build-essential \
libprotobuf-dev protobuf-compiler libopencv-dev python-pip python-setuptools python-dev

ADD face_detector /root/detector
ADD mtcnn /root/mtcnn
ADD ncnn /root/ncnn
RUN cd /root/mtcnn && \
mkdir build && cd build && \
cmake ../ && make -j6 && \
cd /root/ncnn && mkdir build && cd build && \
cmake ../ && make -j6
RUN cp /root/mtcnn/build/src/libncnn.a /root/detector/lib/ncnn/libncnn.a
RUN pip install --upgrade setuptools && pip install --upgrade pip

WORKDIR /root/detector/
RUN python setup.py install
RUN python ./test.py
ADD ./assets/face_detection-2.2.0-cp27-cp27mu-linux_aarch64.whl /root/face_detection-2.2.0-cp27-cp27mu-linux_aarch64.whl
RUN pip install /root/face_detection-2.2.0-cp27-cp27mu-linux_aarch64.whl && \
rm /root/face_detection-2.2.0-cp27-cp27mu-linux_aarch64.whl
ADD requirements.txt /root/requirements.txt
RUN pip install -r /root/requirements.txt
ADD detection /root/detection
WORKDIR /root/detection/
RUN python ./test.py
Binary file not shown.
Binary file not shown.
14 changes: 14 additions & 0 deletions docker/build/face_detection/detection/model/det1.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
7767517
12 13
Input data 0 1 data 0=3 1=12 2=12
Convolution conv1 1 1 data conv1 0=10 1=3 2=1 3=1 4=0 5=1 6=270
PReLU PReLU1 1 1 conv1 conv1_PReLU1 0=10
Pooling pool1 1 1 conv1_PReLU1 pool1 0=0 1=2 2=2 3=0 4=0
Convolution conv2 1 1 pool1 conv2 0=16 1=3 2=1 3=1 4=0 5=1 6=1440
PReLU PReLU2 1 1 conv2 conv2_PReLU2 0=16
Convolution conv3 1 1 conv2_PReLU2 conv3 0=32 1=3 2=1 3=1 4=0 5=1 6=4608
PReLU PReLU3 1 1 conv3 conv3_PReLU3 0=32
Split splitncnn_0 1 2 conv3_PReLU3 conv3_PReLU3_splitncnn_0 conv3_PReLU3_splitncnn_1
Convolution conv4-1 1 1 conv3_PReLU3_splitncnn_1 conv4-1 0=2 1=1 2=1 3=1 4=0 5=1 6=64
Convolution conv4-2 1 1 conv3_PReLU3_splitncnn_0 conv4-2 0=4 1=1 2=1 3=1 4=0 5=1 6=128
Softmax prob1 1 1 conv4-1 prob1 0=0
Binary file not shown.
17 changes: 17 additions & 0 deletions docker/build/face_detection/detection/model/det2.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
7767517
15 16
Input data 0 1 data 0=3 1=24 2=24
Convolution conv1 1 1 data conv1 0=28 1=3 2=1 3=1 4=0 5=1 6=756
PReLU prelu1 1 1 conv1 conv1_prelu1 0=28
Pooling pool1 1 1 conv1_prelu1 pool1 0=0 1=3 2=2 3=0 4=0
Convolution conv2 1 1 pool1 conv2 0=48 1=3 2=1 3=1 4=0 5=1 6=12096
PReLU prelu2 1 1 conv2 conv2_prelu2 0=48
Pooling pool2 1 1 conv2_prelu2 pool2 0=0 1=3 2=2 3=0 4=0
Convolution conv3 1 1 pool2 conv3 0=64 1=2 2=1 3=1 4=0 5=1 6=12288
PReLU prelu3 1 1 conv3 conv3_prelu3 0=64
InnerProduct conv4 1 1 conv3_prelu3 conv4 0=128 1=1 2=73728
PReLU prelu4 1 1 conv4 conv4_prelu4 0=128
Split splitncnn_0 1 2 conv4_prelu4 conv4_prelu4_splitncnn_0 conv4_prelu4_splitncnn_1
InnerProduct conv5-1 1 1 conv4_prelu4_splitncnn_1 conv5-1 0=2 1=1 2=256
InnerProduct conv5-2 1 1 conv4_prelu4_splitncnn_0 conv5-2 0=4 1=1 2=512
Softmax prob1 1 1 conv5-1 prob1 0=0
Binary file not shown.
22 changes: 22 additions & 0 deletions docker/build/face_detection/detection/model/det3.param
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
7767517
20 22
Input data 0 1 data 0=3 1=48 2=48
Convolution conv1 1 1 data conv1 0=32 1=3 2=1 3=1 4=0 5=1 6=864
PReLU prelu1 1 1 conv1 conv1_prelu1 0=32
Pooling pool1 1 1 conv1_prelu1 pool1 0=0 1=3 2=2 3=0 4=0
Convolution conv2 1 1 pool1 conv2 0=64 1=3 2=1 3=1 4=0 5=1 6=18432
PReLU prelu2 1 1 conv2 conv2_prelu2 0=64
Pooling pool2 1 1 conv2_prelu2 pool2 0=0 1=3 2=2 3=0 4=0
Convolution conv3 1 1 pool2 conv3 0=64 1=3 2=1 3=1 4=0 5=1 6=36864
PReLU prelu3 1 1 conv3 conv3_prelu3 0=64
Pooling pool3 1 1 conv3_prelu3 pool3 0=0 1=2 2=2 3=0 4=0
Convolution conv4 1 1 pool3 conv4 0=128 1=2 2=1 3=1 4=0 5=1 6=32768
PReLU prelu4 1 1 conv4 conv4_prelu4 0=128
InnerProduct conv5 1 1 conv4_prelu4 conv5 0=256 1=1 2=294912
Dropout drop5 1 1 conv5 conv5_drop5
PReLU prelu5 1 1 conv5_drop5 conv5_prelu5 0=256
Split splitncnn_0 1 3 conv5_prelu5 conv5_prelu5_splitncnn_0 conv5_prelu5_splitncnn_1 conv5_prelu5_splitncnn_2
InnerProduct conv6-1 1 1 conv5_prelu5_splitncnn_2 conv6-1 0=2 1=1 2=512
InnerProduct conv6-2 1 1 conv5_prelu5_splitncnn_1 conv6-2 0=4 1=1 2=1024
InnerProduct conv6-3 1 1 conv5_prelu5_splitncnn_0 conv6-3 0=10 1=1 2=2560
Softmax prob1 1 1 conv6-1 prob1 0=0