Hide screen when boss is approaching.

Overview

BossSensor

Hide your screen when your boss is approaching.

Demo

The boss stands up. He is approaching.

standup

When he is approaching, the program fetches face images and classifies the image.

approaching

If the image is classified as the Boss, it will monitor changes.

editor

Requirements

  • WebCamera
  • Python3.5
  • OSX
  • Anaconda
  • Lots of images of your boss and other person image

Put images into data/boss and data/other.

Usage

First, Train boss image.

$ python boss_train.py

Second, start BossSensor.

$ python camera_reader.py

Install

Install OpenCV, PyQt4, Anaconda.

conda create -n venv python=3.5
source activate venv
conda install -c https://conda.anaconda.org/menpo opencv3
conda install -c conda-forge tensorflow
pip install -r requirements.txt

Change Keras backend from Theano to TensorFlow.

Licence

MIT

Author

Hironsan

Comments
  • Error when checking : expected convolution2d_input_1

    Error when checking : expected convolution2d_input_1

    I have following error.

    ➜  BossSensor git:(master) ✗ python camera_reader.py
    Using TensorFlow backend.
    Model Loaded.
    face detected
    Traceback (most recent call last):
      File "camera_reader.py", line 36, in <module>
        result = model.predict(image)
      File "/Users/huseyinmert/Desktop/tmp_code/BossSensor/boss_train.py", line 159, in predict
        result = self.model.predict_proba(image)
      File "/usr/local/lib/python2.7/site-packages/keras/models.py", line 758, in predict_proba
        preds = self.predict(x, batch_size, verbose)
      File "/usr/local/lib/python2.7/site-packages/keras/models.py", line 671, in predict
        return self.model.predict(x, batch_size=batch_size, verbose=verbose)
      File "/usr/local/lib/python2.7/site-packages/keras/engine/training.py", line 1161, in predict
        check_batch_dim=False)
      File "/usr/local/lib/python2.7/site-packages/keras/engine/training.py", line 108, in standardize_input_data
        str(array.shape))
    Exception: Error when checking : expected convolution2d_input_1 to have shape (None, 64, 64, 3) but got array with shape (1, 3, 64, 64)
    
    opened by hmert 4
  • No model.h5

    No model.h5

    Hi,

    do I need to create the model.h5 manually during the training.

    python boss_train.py

    OSError: Unable to create file (Unable to open file: name = './store/model.h5', errno = 2, error message = 'no such file or directory', flags = 13, o_flags = 602) Exception ignored in: <bound method BaseSession.del of <tensorflow.python.client.session.Session object at 0x10e0a1e80>> Traceback (most recent call last):

    opened by manesvenom 2
  • Info to be added

    Info to be added

    Hi could you add your article in the description as a reference to more info? http://ahogrammer.com/2016/11/15/deep-learning-enables-you-to-hide-screen-when-your-boss-is-approaching/

    opened by amorenew 2
  • run boss_train.py error

    run boss_train.py error

    I user tensorflow 0.12, and I put some pictures in boss and other directories, but when I run boss_train.py ,it report error:
    Traceback (most recent call last):
    File "/home/zxx/PycharmProjects/BossSensor/boss_train.py", line 176, in
    dataset.read()
    File "/home/zxx/PycharmProjects/BossSensor/boss_train.py", line 35, in read
    X_train, X_test, y_train, y_test = train_test_split(images, labels, test_size=0.3, random_state=random.randint(0, 100))
    File "/usr/lib/python2.7/dist-packages/sklearn/cross_validation.py", line 1556, in train_test_split
    arrays = check_arrays(*arrays, **options)
    File "/usr/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 287, in check_arrays
    array.ndim)
    ValueError: Found array with dim 4. Expected <= 2

    Could you give me some help, thanks.

    opened by asd51731 1
  • ZeroDivisionError: integer division or modulo by zero

    ZeroDivisionError: integer division or modulo by zero

    I'm a beginner,and i got those issues,what that means?

    gine/training.py", line 429, in data_generator_task generator_output = next(self._generator) File "/Users/zhangfei/anaconda3/envs/venv/lib/python3.5/site-packages/keras/preprocessing/image.py", line 662, in next return self.next(*args, **kwargs) File "/Users/zhangfei/anaconda3/envs/venv/lib/python3.5/site-packages/keras/preprocessing/image.py", line 708, in next index_array, current_index, current_batch_size = next(self.index_generator) File "/Users/zhangfei/anaconda3/envs/venv/lib/python3.5/site-packages/keras/preprocessing/image.py", line 645, in _flow_index current_index = (self.batch_index * batch_size) % n ZeroDivisionError: integer division or modulo by zero

    Traceback (most recent call last): File "boss_train.py", line 178, in model.train(dataset, nb_epoch=10) File "boss_train.py", line 143, in train validation_data=(dataset.X_valid, dataset.Y_valid)) File "/Users/zhangfei/anaconda3/envs/venv/lib/python3.5/site-packages/keras/models.py", line 935, in fit_generator initial_epoch=initial_epoch) File "/Users/zhangfei/anaconda3/envs/venv/lib/python3.5/site-packages/keras/engine/training.py", line 1600, in fit_generator callbacks.on_epoch_end(epoch, epoch_logs) UnboundLocalError: local variable 'epoch_logs' referenced before assignment

    opened by julianL0veios 1
  • Why do you divide the data set like this?

    Why do you divide the data set like this?

    X_train, X_test, y_train, y_test = train_test_split(images, labels, test_size=0.3, random_state=random.randint(0, 100)) X_valid, X_test, y_valid, y_test = train_test_split(images, labels, test_size=0.5, random_state=random.randint(0, 100))

    opened by Cds3851 1
  • Problems about './store/model.h5'

    Problems about './store/model.h5'

    When I read “boss_train.py”,I found a constant named "FILE_PATH".I can't find its value "./store/model.h5" in any folders.Is it a forein file?

    opened by SCYtelils 1
  • Problems in boss_train.py

    Problems in boss_train.py

    I run the boss_train.py, but there is an error called "AttributeError". It says that, 'ProgbarLogger' object has no attribute 'log_values'. Does anyone know how this problem happens? Thanks!

    opened by songshumiao 4
  • detecting problem in finally

    detecting problem in finally

    I have accomplish the model's train and evaluate,the evaluate result is 93%,but when I predict face on my camera , the process will think of all the faces as me . I should how to the problem。

    opened by yoga1314 4
Owner
Hiroki Nakayama
OSS developer | Interested in Natural Language Processing
Hiroki Nakayama
In this project, we'll be making our own screen recorder in Python using some libraries.

Screen Recorder in Python Project Description: In this project, we'll be making our own screen recorder in Python using some libraries. Requirements:

Hassan Shahzad 4 Jan 24, 2022
An NVDA add-on to split screen reader and audio from other programs to different sound channels

An NVDA add-on to split screen reader and audio from other programs to different sound channels (add-on idea credit: Tony Malykh)

Joseph Lee 7 Dec 25, 2022
Uses OpenCV and Python Code to detect a face on the screen

Simple-Face-Detection This code uses OpenCV and Python Code to detect a face on the screen. This serves as an example program. Important prerequisites

Denis Woolley (CreepyD) 1 Feb 12, 2022
Manage your SSH like a boss.

--- storm is a command line tool to manage your ssh connections. features adding, editing, deleting, listing, searching across your SSHConfig. command

Emre Yılmaz 3.9k Jan 3, 2023
Universal Radio Hacker: Investigate Wireless Protocols Like A Boss

The Universal Radio Hacker (URH) is a complete suite for wireless protocol investigation with native support for many common Software Defined Radios.

Dr. Johannes Pohl 9k Jan 3, 2023
Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

SeatGeek 1.2k Jan 1, 2023
The learning agent learns firstly approaching to the football and then kicking the football to the target position

Football Court This project utilized Pytorch and Tensorflow so that the learning agent learns firstly approaching to the football and then kicking the

null 1 Nov 19, 2021
A python package that computes an optimal motion plan for approaching a red light

redlight_approach redlight_approach is a Python package that computes an optimal motion plan during traffic light approach. RLA_demo.mov Given the par

Jonathan Roy 4 Oct 27, 2022
SHAS: Approaching optimal Segmentation for End-to-End Speech Translation

SHAS: Approaching optimal Segmentation for End-to-End Speech Translation In this repo you can find the code of the Supervised Hybrid Audio Segmentatio

Machine Translation @ UPC 21 Dec 20, 2022
Easy way to use Telegram bot to hide your identity.

telegram-support-bot Easy way to use Telegram bot to hide your identity. Useful for support, anonymous channel management. Free clone of Livegram Bot.

Daniil Okhlopkov 197 Dec 23, 2022
Hide secret texts inside an image, optionally encrypt them with a password using AES-256.

Hide secret texts/messages inside an image. You can optionally encrypt your texts with a password using AES-256 before encoding into the image.

Teja Swaroop 97 Dec 29, 2022
Hide Your Secret Message in any Wave Audio File.

HiddenWave Embedding secret messages in wave audio file What is HiddenWave Hiddenwave is a python based program for simple audio steganography. You ca

TechChip 99 Dec 28, 2022
DNSStager is an open-source project based on Python used to hide and transfer your payload using DNS.

What is DNSStager? DNSStager is an open-source project based on Python used to hide and transfer your payload using DNS. DNSStager will create a malic

Askar 547 Dec 20, 2022
CloudProxy is to hide your scrapers IP behind the cloud

Hide your scrapers IP behind the cloud. Provision proxy servers across different cloud providers to improve your scraping success.

Christian Laffin 1.1k Jan 2, 2023
TRREASURE_IMAGE is python lib by which you can hide anything in a .jpg image with Command-Line Interface[cli] feature

TRREASURE_IMAGE TRREASURE_IMAGE is a python third-party library with Command-Line Interface[cli] feature. Table of Contents General Info Python librar

Fatin Shadab 3 Jun 7, 2022
Hide new MacBook Pro notch with black wallpaper.

Hide new MacBook Pro notch with black wallpaper.

Wang Chao 1 Oct 27, 2021
Python module and its web equivalent, to hide text within text by manipulating bits

cacherdutexte.github.io This project contains : Python modules (binary and decimal system 6) with a dedicated tkinter program to use it. A web version

null 2 Sep 4, 2022
test whether http(s) proxies actually hide your ip

Proxy anonymity I made this for other projects, to find working proxies. If it gets enough support and if i have time i might make it into a gui Repos

gxzs1337 1 Nov 9, 2021
Hide secret data within a digital image using good ol' terminal

pystego Hide secret data within a digital image using good ol' terminal Installation The recommended way for installing this package is using, python

Ayush Gupta 1 Jan 6, 2022
Hide sensitive information in images

Data-Preserved Script allowing to blur the most sensitive information on images. Prerequisites Before you begin, ensure you have met the following req

null 2 Dec 1, 2021