Code Monkey home page Code Monkey logo

maskade-minigame's Introduction

Maskade Classifier

Demo

Description

The Maskade Classifier is a lightweight computer vision project built with C++. It uses the user's camera to determine if they have a face mask for COVID-19 correctly placed on their face. It also features a minigame in which the user has to try to keep their face behind a floating digital mask to score points before time runs out. The name is a pun on cascade classifiers (e.g. the Haar Cascade Classifier), a common type of computer vision object detection model.

Features

  • Plain classification: run the program and it will tell you if you're wearing a mask or not! Avoid dark lighting for best results.
  • Minigame: Press the M key to enter or exit the minigame mode, where you can take off your real mask and score points by keeping your face behind a floating mask for as many frames as possible within the time limit. Press the R key to reset the game score and timer while in progress.
  • JSON configuration file that allows you to set default parameters for the program's style and fonts. This can be found in config/config.json.
  • The program uses a pretrained TensorFlow savedmodel file to classify images from your computer's camera feed. This can be found ing assets/converted_savedmodel. This model was created using the Google Teachable Machines project.

Dependencies

The program can be cloned and run locally, but it requires several libraries to be installed and linked on your computer to properly work. The dependencies are listed below:

Library Purpose Manual Linkage Required (Y/N) Version
TensorFlow C API Trains, caches, loads, and runs the computer vision model Y 2.3.1
Cppflow Provides an interface between C++ and the TensorFlow C API to allow a Cinder app to use TensorFlow Y 2.0
Cinder Allows the program to draw the camera feed and text to a window Y 0.9.1
OpenCV for C++ Connects C++ to your computer's camera and facilitates image data operations Y 4.5.0
OpenCV Cinderblock Converts OpenCV image matrices to textures that Cinder can display N 2.4.9
JSON for C++ Gives Cinder the ability to read the JSON configuration file N 3.9.1

Usage

The above libraries can be installed using brew install or via direct download. Once the appropriate libraries have been installed and built, the CMakeLists.txt file can be used to link them. Simply replace the corresponding file paths with your local paths to the libraries.

Finally, the CMakeLists.txt file can be used to build the project to a build folder of your choosing a C++ compiler of your choosing. The maskade-visualizer target should be run afterwards. This can either be accomplished through the command line or using an IDE or text editor with support for C++ and CMake, such as CLion or Visual Studio Code.

This project was developed on MacOS 11.1 with the clang 12.0.0 compiler, but it can be expected to work on Windows or Linux, or with a different compiler such as gcc. An MIT License is included. It was created during my time at the University of Illinois at Urbana-Champaign for my CS 126: Software Design Studio class.

Please reach me at rustom.dev or [email protected] with any questions or thoughts. Thank you!

maskade-minigame's People

Contributors

github-classroom[bot] avatar rustom avatar

Stargazers

 avatar

Forkers

webstorage119

maskade-minigame's Issues

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.