推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
fendouai_com
V2EX  ›  Python

老板来了:人脸识别+手机推送,老板来了发送手机通知,你立刻知道。( Python 实现)

  •  3
     
  •   fendouai_com · Apr 19, 2017 · 9555 views
    This topic created in 3485 days ago, the information mentioned may be changed or developed.

    背景介绍

    学生时代,老师站在窗外的阴影挥之不去。大家在玩手机,看漫画,看小说的时候,总是会找同桌帮忙看着班主任有没有来。

    teacher.jpeg

    一转眼,曾经的翩翩少年毕业了,新的烦恼来了,在你刷知乎,看视频,玩手机的时候,老板来了! 不用担心,不用着急,基于最新的人脸识别+手机推送做出的 BossComing 。老板站起来的时候, BossComing 会通过人脸识别发现老板已经站起来,然后通过手机推送发送通知 “ BossComing ”,并且震动告诉你有情况。

    效果展示

    不明真相吃瓜群众和身后领导

    领导工作繁忙,埋头敲代码

    低头工作的领导

    身后领导扭头过来,马上被人脸识别程序发现,并标记为 boss

    扭头过来的领导

    手机收到推送,并震动。

    notification.jpg

    BossComing

    身后的领导

    是不是就像“同桌的他”,用胳膊肘不停地戳你,并且小声的说:老师来啦,来时来啦。

    技术介绍

    人脸识别技术

    face_recognition The world's simplest facial recognition api for Python and the command line

    https://github.com/ageitgey/face_recognition

    手机推送技术

    jpush-api-python-client JPush's officially supported Python client library for accessing JPush APIs.

    https://github.com/jpush/jpush-api-python-client

    依赖安装

    pip install face_recognition
    pip install jpush
    

    使用教程

    • 添加 boss image

    conf0.png

    • 配置文件 修改 bosscoming 文件中的 load_image_file 参数 conf1.png

    • JPush 配置,这样你的手机才可以收到推送。 conf2.png

    • 可以直接使用 JPush 官方提供的 Demo 用来接收通知。 JPush 文档: https://docs.jiguang.cn/jpush/guideline/intro/

    • 运行命令

    python bosscoming.py
    

    体验人脸识别部分命令:

    python bosswatching.py
    

    打开电脑上摄像头,开始捕捉画面。然后调整角度,对准需要观察的位置。

    blank.png

    项目说明

    受 《在你上司靠近你座位时,用人脸识别技术及时屏幕切换》启发,文章地址: https://zhuanlan.zhihu.com/p/24809159 ,所介绍的项目是 BossSensor : https://github.com/Hironsan/BossSensor 。因为这个项目所需要的依赖比较多,而且我运行有问题,所以换了另外一个库来实现。 BossComing 项目地址: https://github.com/fendouai/BossComing/tree/dev 代码还不完善,仅供娱乐( Just for fun!)。

    参考引用

    https://github.com/ageitgey/face_recognition

    https://github.com/jpush/jpush-api-python-client

    https://github.com/Hironsan/BossSensor

    32 replies  •  2017-04-20 18:12:36 +08:00
    annqlm
    annqlm
    Apr 19, 2017
    1
    厉害!
    fendouai_com
    fendouai_com
    OP
    Apr 19, 2017
    2
    @annqlm 哈哈,你也可以玩一下,很有意思。
    KaKaGoSki
    KaKaGoSki
    Apr 19, 2017
    3
    ...
    myway
    myway
    Apr 19, 2017
    4
    真是牛逼啊哈哈。。。
    neroxps
    neroxps
    Apr 19, 2017❤️1
    5
    我以后会戴面具巡视的~你继续玩~
    fendouai_com
    fendouai_com
    OP
    Apr 19, 2017
    7
    @eicyan 正是受这个项目启发,只是这个项目没有跑通。
    受 《在你上司靠近你座位时,用人脸识别技术及时屏幕切换》启发,文章地址: https://zhuanlan.zhihu.com/p/24809159 ,所介绍的项目是 BossSensor : https://github.com/Hironsan/BossSensor 。
    qfdk
    qfdk
    PRO
    Apr 19, 2017 via iPhone
    8
    其实感觉显示屏幕桌面更有用 有空看手机 不如老板键自动触发
    Famio
    Famio
    Apr 19, 2017
    9
    @neroxps new project:Boss coming with mask
    hzwei
    hzwei
    Apr 19, 2017 via iPhone
    10
    “老板,你过来,我给你照张相~”
    neroxps
    neroxps
    Apr 19, 2017
    11
    @Famio 再下次,我女妆视察。
    JamesR
    JamesR
    Apr 19, 2017
    12
    厉害啊,卖套装可以开淘宝店了。
    Tunar
    Tunar
    Apr 19, 2017 via Android
    13
    戴口罩呢?
    jinfeng333
    jinfeng333
    Apr 19, 2017
    14
    666
    inrenping
    inrenping
    Apr 19, 2017
    15
    捂脸巡查……
    fendouai_com
    fendouai_com
    OP
    Apr 19, 2017
    16
    @JamesR 是时候开个淘宝店了。
    fendouai_com
    fendouai_com
    OP
    Apr 19, 2017
    17
    @Tunar 晚点试一下,让 boss 戴口罩。
    LioMore
    LioMore
    Apr 19, 2017
    18
    @Tunar 那就把戴口罩也的情况也记下来
    Chichele
    Chichele
    Apr 19, 2017 via Android
    19
    。。。可以开始研究虹膜识别了
    harry890829
    harry890829
    Apr 19, 2017
    20
    这个项目不是利用了机器学习么,第一次戴口罩可能会坑,但是第二次就没事了
    xiagemini
    xiagemini
    Apr 19, 2017 via Android
    21
    得自动触发老板键!
    shadownet
    shadownet
    Apr 19, 2017 via iPhone
    22
    然而现在老板都是看监控 根本不用过来 摄像头还能控制角度 无解啊
    ixinshang
    ixinshang
    Apr 19, 2017
    23
    哈哈 以后机器 不配置摄像头了
    fisher335
    fisher335
    Apr 20, 2017 via iPhone
    24
    没有办法跑在 windows 上吧
    HanSonJ
    HanSonJ
    Apr 20, 2017
    25
    想法很美好,老板该出动无人机监测员工状态了
    Dx2619
    Dx2619
    Apr 20, 2017 via iPhone
    26
    蛮有意思的,不过收到短信已经晚了吧, hh
    49gd
    49gd
    Apr 20, 2017
    27
    如果是电脑的摄像头的话有点晚了吧 得放在走廊上
    bk201
    bk201
    Apr 20, 2017 via iPhone
    28
    识别会不会延迟导致悲剧.
    ileenhow
    ileenhow
    Apr 20, 2017
    29
    老板的肚子真大
    PythonAnswer
    PythonAnswer
    Apr 20, 2017
    30
    老板像个小弟。。
    fendouai_com
    fendouai_com
    OP
    Apr 20, 2017
    31
    @fisher335 不太确定,我是 MAC 。
    mingyun
    mingyun
    Apr 20, 2017
    32
    厉害了 我的哥
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5288 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 201ms · UTC 01:26 · PVG 09:26 · LAX 17:26 · JFK 20:26
    ♥ Do have faith in what you're doing.