Coder Social home page Coder Social logo

truthsayer's Introduction

Truthsayer

A Remote-Control Lie Detector

Truthsayer lets you monitor the heart rate and possible 'tells' of deception from any face, including live video calls or recordings.

Video demo and more info available here!

demo

TruthSayer uses OpenCV and MediaPipe's Face Mesh to perform real-time detect of facial landmarks from video input. It also uses FER for mood detection. From there, relative differences are calculated to determine significant changes in specific facial movements from a person's baseline, including their:

  • Heart rate
  • Blink rate
  • Change in gaze
  • Hand covering face
  • Lip compression

Truthsayer can optionally include prompts based on a second video feed to better 'mirror' the original input.

Hit Q on the preview window to exit the resulting display frame, or CTRL+C at the terminal to close the Python process.

Truthsayer is built for Python 3 and will not run on 2.x.

Optional flags:

  • --help - Display the below options
  • --input - Choose a camera, video file path, or screen dimensions in the form x y width height - defaults to device 0
  • --landmarks - Set to any value to draw overlayed facial and hand landmarks
  • --bpm - Set to any value to include a heart rate tracking chart
  • --flip - Set to any value to flip along the y-axis for selfie view
  • --landmarks - Set to any value to draw detected body landmarks from MediaPipe
  • --record - Set to any value to write the output to a timestamped AVI recording in the current folder
  • --second - Secondary video input device for mirroring prompts (device number or path)
  • --ttl - Number of subsequent frames to display a tell; defaults to 30

Example usage:

  • python intercept.py -h - Show all argument options
  • python intercept.py --input 2 --landmarks 1 --flip 1 --record 1 - Camera device 2; overlay landmarks; flip; generate a recording
  • python intercept.py -i "/Downloads/shakira.mp4" --second 0 - Use video file as input; use camera device 0 as secondary input for mirroring feedback

truthsayer's People

Watchers

James Cloos avatar  avatar

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.