Giter VIP home page Giter VIP logo

k210-face-detection's Introduction

k210 face detection demo

I implement face detection based on the idea of ​​yolo network in Kendryte K210. ps : this model only 500kb

Usage

environmental preparation

you should install python package:

tensorflow 1.12 imgaug scikit-image numpy opencv-python matpltlib scipy tqdm

train model

  1. prepare dataset and make train list

    cd k210-face-detection
    wget http://tamaraberg.com/faceDataset/originalPics.tar.gz
    mkdir FDDB
    tar -zxvf originalPics.tar.gz -C FDDB
    wget http://vis-www.cs.umass.edu/fddb/FDDB-folds.tgz
    tar -zxvf FDDB-folds.tgz -C FDDB
    python3 tools/make_list.py --fddb_dir FDDB --ann_dir FDDB/FDDB-folds

    now your data fold have train.list

    NOTE: When generate the train.list I set the box width and height only half. if you want use the normal value to train, please remove the comment in tools/make_list.py line 47

  2. train

    make train_pureconv ILR=0.001 MAXEP=20 IAA=false

    ILR : the init learning rate

    MAXEP : max epoch

    IAA : whether to use data augmenter

    NOTE: you can use CKPT:xxxxx to continue train

    example:

    make train_pureconv CKPT=log/20190216-152633 ILR=0.0005 MAXEP=20 IAA=true

    And you can use tensorboard --logdir log to look the record

test model

make inference PB=Freeze_save.pb

export pb

  1. freeze ckpt

    make freeze CKPT=log/20190216-154422 

    now your fold will have Freeze_save.pb

  2. use kendryte-model-complier to complie pb file

    you can use my script (you should modify MODELCMP):

    make kmodel_convert PB=Freeze_save.pb MODELCMP=~/Documents/kendryte-model-compiler

    or refer to see the kendryte-model-compiler

modfiy k210 code

  1. copy weights array to code

    cp ~/Documents/kendryte-model-compiler/build/gencode_output.* K210_code/
  2. compile the code

    you can refer to the documents k210 use in windows or k210 use in linux

    And you can find some useful article in my bolg.

  3. down load program

    now you can use kflash.py down load the program

Final effect

We play together at the skating rink

todo

  • [] add nms to avoid box overlapping

Reference

kendryte github

YAD2k

If you have any question, please make issue~

k210-face-detection's People

Contributors

zhen8838 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

k210-face-detection's Issues

Frame rate

What is the frame rate that you achieve with this model?

k210 sdk

您好:
请问你用是的什么版本的sdk,我尝试了很多版本的sdk都没成功,你能分享一份sdk源码吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.