IoT owl is light face detection and recognition system made for small IoT devices like raspberry pi.

Related tags

NetworkingIoT-Owl
Overview

IoT Owl

owl
IoT owl is light face detection and recognition system made for small IoT devices like raspberry pi.

Versions

Heavy

  • with mask detection
  • without mask detection

More in the future

How does it work?

Heavy version:

  1. Raspberry pi analyzes every video frame streamed from the camera
  2. If program detects faces in the frame collects next 10 frames (in the default config, you can change this value) and choice best one then crop face from the best frame
  3. [optional] detects mask on the face
  4. Sends cropped face to Microsoft API to encode face and get information about it (for example: hair color, emotions, whether the mask is put correctly, all available options below)
  5. Sends returned token with detected face to recognition person
  6. Check information about student in local database by returned from cloud person id

diagram

Requirements

Minimal for heavy version:

  • python 3 interperter
  • camera (can be wireless)
  • space on disk (this value depends on how many users we want to recognize and how much information about them, we want to store, additionally is highly possible that you have already installed some of this libraries)
    • 1MB - database with information about users
    • 30MB - models if we want to detect persons with masks
    • 10MB - CVlib
    • 22MB - Matplotlib
    • 200MB - OpenCV
    • 1200MB - Tensorflow
      total: 1463MB

Recommended:

  • internet connection (faster internet = faster face recognition)

Benchmarks

Heavy version:
________________________
- download: 150Mbps 
+ upload: 140Mbps
0.6s ~ 0.9s

________________________
- download: 134Mbps 
+ upload: 105Mbps
0.7s ~ 1.2s

________________________
- download: 12Mbps 
+ upload: 4Mbps
1.2s ~ 1.9s

How to use

Setup:
1. You have to set in configuration file:

  • microsoft API key
  • Microsoft endpoint links with parameters
  • IP of the camera or number if it's connected directly to PC (default is "0")
  1. Download requirements from "requirements.txt"
  2. In main file import:
  • faceDetection.win_face_detection
  • os
  • sys

4. Add program to PATH by: sys.path.append(os.getcwd()) 5. Create an object of the class, run "run" function and pass to it function which will be run every time when face will be detected

Example

import faceDetection.ms_face_detection
import os
import sys
sys.path.append(os.getcwd())


def analyzeStudent(detected_persons = []):
 print(str(data))

  

def experimental():
 print("start")
 test = faceDetection.ms_face_detection.APIFaceDetection()
 test.run(analyzeStudent)


if __name__ == "__main__":
 experimental()

Example output

[
    [
        {
            "confidence": 0.5445673,
            "faceAttributes": {
                "accessories": [],
                "emotion": {
                    "anger": 0.0,
                    "contempt": 0.001,
                    "disgust": 0.0,
                    "fear": 0.0,
                    "happiness": 0.902,
                    "neutral": 0.098,
                    "sadness": 0.0,
                    "surprise": 0.0
                },
                "facialHair": {
                    "beard": 0.1,
                    "moustache": 0.1,
                    "sideburns": 0.1
                },
                "glasses": "NoGlasses",
                "smile": 0.902
            },
            "faceId": "0d56aee7-946a-4450-b1b5-563b5266b129",
            "faceRectangle": {
                "height": 138,
                "left": 44,
                "top": 60,
                "width": 138
            },
            "recognitionModel": "recognition_01",
            "userData": "\"Filip\"\"Poplewski\"\"3iT\"\"10:11:2003\""
        }
    ]
]
example greeting:
["Good morning ['Filip']"]
[
    [
        {
            "confidence": 0.78242,
            "faceAttributes": {
                "headPose": {
                    "pitch": -2.0,
                    "roll": -2.1,
                    "yaw": 18.7
                },
                "mask": {
                    "noseAndMouthCovered": false,
                    "type": "otherMaskOrOcclusion"
                }
            },
            "faceId": "66388a5c-ef86-484e-8319-b7010d782a92",
            "faceRectangle": {
                "height": 202,
                "left": 41,
                "top": 52,
                "width": 148
            },
            "recognitionModel": "recognition_04"
        }
    ]
]

Argument passed to given function

APIFaceDetection will run provided as argument function every time when it detect face at the frame.
APIFaceDetection pass JSON with all collected data about person in the image to given function  variable named "detected_persons".
Examples of all three JSON's you can find in "response.txt"

Debugging and configuration

If you want to configure face detection to your camera you can run version made for debugging. Everything what you need to do is change:

import faceDetection.ms_face_detection to import faceDetection.DEBUG_ms_face_detection

and faceDetection.ms_face_detection.APIFaceDetection() to faceDetection.DEBUG_ms_face_detection.APIFaceDetection()

It will display window with:

  • camera view,
  • detected face
  • cropped face
  • response
  • time to next face recognition
  • face quality in percents

Issue?

If you have any questions or you need help in implementation write to me :)
email:   [email protected]

Owner
Ret2Me
Contact me at: [email protected]
Ret2Me
High capacity, high availability, well connected, fast lightning node.

LND ⚡ Routing High capacity, high availability, well connected, fast lightning node. We aim to become a top liquidity provider for the lightning netwo

18 Dec 16, 2022
This is an open project to maintain a list of domain names that serve YouTube ads

The YouTube ads blocklist project This is an open project to maintain a list of domain names that serve YouTube ads. The original project only produce

Evan Pratten 574 Dec 30, 2022
Ip-Seeker - See Details With Public Ip && Find Web Ip Addresses

IP SEEKER See Details With Public Ip && Find Web Ip Addresses Tool By Heshan

M.D.Heshan Sankalpa 1 Jan 02, 2022
Herramienta para transferir eventos de Shadowserver REST API hacia Azure Blob Storage.

Herramienta para transferir eventos de Shadowserver REST API hacia Azure Blob Storage.

CSIRT-RD 1 Feb 04, 2022
Monitoring plugin to check network interfaces with Icinga, Nagios and other compatible monitoring solutions

check_network_interface - Monitor network interfaces This is a monitoring plugin for Icinga, Nagios and other compatible monitoring solutions to check

DinoTools 3 Nov 15, 2022
📨 Share files easily over your local network from the terminal! 📨

Fileshare 📨 Share files easily over your local network from the terminal! 📨 Installation #

Dopevog 11 Sep 10, 2021
Mass querying whois records using whois tool

Mass querying whois records using whois tool

Mohamed Elbadry 24 Nov 10, 2022
Extended refactoring capabilities for Python LSP Server using Rope.

pylsp-rope Extended refactoring capabilities for Python LSP Server using Rope. This is a plugin for Python LSP Server, so you also need to have it ins

36 Dec 24, 2022
A simple tool to get information about IP

IP Info Tool Just a simple tool to get IP's information, it uses requests module to gather information about IP, if you dont have much knowledge about

0 Dec 01, 2021
Simple python script for automated network scans with random name generator(useful for CTF boxes).

📄 Automated NMAP script Description Simple python script for automated network scans with random name generator(useful for CTF boxes). Requirements 1

Dhmos Funk 2 Oct 29, 2021
Visualize the electric field of a point charge network.

ElectriPy ⚡ Visualize the electric field of a point charges network. 🔌 Installation Install ElectriPy package: $ pip install electripy You are all d

Dylan Tintenfich 29 Aug 29, 2022
A simple python application for generating a WiFi QR code for ease of connection

A simple python application for generating a WiFi QR code Initialize the class by providing QR code values WiFi_QR_Code(self, error_correction: int =

Ivan 2 Aug 01, 2022
A tool to generate valid ip addresses of 55 countries. These ip's can be used for OpenBullet.

IP-Grabber A tool to generate valid ip addresses of 55 countries. These ip's can be used for OpenBullet. ive added the feature to set the generated ip

Saad 9 Dec 17, 2022
A powerful framework for decentralized federated learning with user-defined communication topology

Scatterbrained Decentralized Federated Learning Scatterbrained makes it easy to build federated learning systems. In addition to traditional federated

Johns Hopkins Applied Physics Laboratory 7 Sep 26, 2022
TradingView Interactive Brokers Integration using Webhooks

TradingView Interactive Brokers Integration using Webhooks

84 Dec 19, 2022
Web service load balancing simulation experiment.

Web service load balancing simulation experiment.

NicestZK 1 Nov 12, 2021
Heroku Cloudflare App Domain

Heroku Cloudflare App Domain Creating branded herokuapp.com-like domains using Cloudflare, based on the app name (eg my-app-prod.example.com). Feature

Torchbox 2 Oct 04, 2022
This is a simple python script to collect sub-domains from hackertarget API

Domain-Scraper 🌐 This is a simple python script to collect sub-domains from hackertarget API Note : This is tool is limited to 20 Queries / day with

CHINO TECH TOOLS 4 Sep 09, 2021
Securely and anonymously share files, host websites, and chat with friends using the Tor network

OnionShare OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor ne

OnionShare 5.4k Jan 01, 2023
This will generate a very basic DHCP config with use of PHPIPAM systems.

phpipam-dhcp-config-generator This will generate a very basic DHCP config with use of PHPIPAM systems. Requirements PHPIPAM Custom Fields domain_name

1 Oct 24, 2021