Automatically measure the facial Width-To-Height ratio and get facial analysis results provided by Microsoft Azure

Overview

fwhr-calc-website

This project is to automatically measure the facial Width-To-Height ratio and get facial analysis results provided by Microsoft Azure. Used in

Built with

  • Python 3.6
  • Dlib
  • Opencv
  • Flask

Getting started

Prerequisites

  1. python version 3.6 with Anaconda distribution (no guarantee for other versions)
    • You can download Anaconda Individual Edition in [here] (https://www.anaconda.com/products/individual)
    • Check your anaconda installation by conda -V
    • Create a virtual environment by conda create -n [name] python=3.6 and activate the venv by conda activate [name]
  2. Clone this repo.
    • git clone https://github.com/haileypark-kr/fwhr-calc-website.git
  3. Microsoft Azure Face Api Key
    1. Create an Azure account and a Cognitive Service Face API resource in Azure Portal. Read [this] (https://docs.microsoft.com/en-us/azure/cognitive-services/face/) documentation.
    2. Generate keys to access your API. (Resource Management > Keys and Endpoint)
    3. Make a file named azure_faceapi_key.conf and paste the first key in the file. (you can change the file name if you want, but make sure you also change .gitignore and config.py) Do not upload this file to GitHub.
    4. Replace the variable FACE_API_ENDPOINT in config.py with your endpoint.
      # config.py
      
      FACE_API_ENDPOINT = "https://eastasia.api.cognitive.microsoft.com"
      

Installation

Install python libraries in this project's root directory.

  • pip install -r requirements.txt
  • Some libraries (dlib) cannot be installed by pip - should be installed using conda with conda install -y -c conda-forge dlib

Usage

There are two ways to run this application.

  • Running a flask web server: If you want to analyze a few facial images with GUI.
  • Running fWHR calcaculating script: If you want to analyze thousands of images

Running a flask web server

  1. Command: python app.py
  2. Open a Chrome browser and enter 127.0.0.1:5001
  3. Select some images and press Submit button.
  4. Wait and do not reload the browser.
  5. Anlysis result will be downloaded shortly (in xlsx format)

Running fWHR calcaculating script

  1. Command: python fWHR_main.py --dataroot [path to the image directory]
  2. Wait
  3. Go to data/output direcetory and get the analysis result file.
Owner
SoohyunPark
Soohyun Park. Interests in computer vision and backend
SoohyunPark
PyTorch - Python + Nim

Master Release Pytorch - Py + Nim A Nim frontend for pytorch, aiming to be mostly auto-generated and internally using ATen. Because Nim compiles to C+

Giovanni Petrantoni 425 Dec 22, 2022
FCN (Fully Convolutional Network) is deep fully convolutional neural network architecture for semantic pixel-wise segmentation

FCN_via_Keras FCN FCN (Fully Convolutional Network) is deep fully convolutional neural network architecture for semantic pixel-wise segmentation. This

Kento Watanabe 48 Aug 30, 2022
Train an RL agent to execute natural language instructions in a 3D Environment (PyTorch)

Gated-Attention Architectures for Task-Oriented Language Grounding This is a PyTorch implementation of the AAAI-18 paper: Gated-Attention Architecture

Devendra Chaplot 234 Nov 05, 2022
New AidForBlind - Various Libraries used like OpenCV and other mentioned in Requirements.txt

AidForBlind Recommended PyCharm IDE Various Libraries used like OpenCV and other

Aalhad Chandewar 1 Jan 13, 2022
Code of Puregaze: Purifying gaze feature for generalizable gaze estimation, AAAI 2022.

PureGaze: Purifying Gaze Feature for Generalizable Gaze Estimation Description Our work is accpeted by AAAI 2022. Picture: We propose a domain-general

39 Dec 05, 2022
Learning Continuous Image Representation with Local Implicit Image Function

LIIF This repository contains the official implementation for LIIF introduced in the following paper: Learning Continuous Image Representation with Lo

Yinbo Chen 1k Dec 25, 2022
toroidal - a lightweight transformer library for PyTorch

toroidal - a lightweight transformer library for PyTorch Toroidal transformers are of smaller size and lower weight than the more common E-I types. Th

MathInf GmbH 64 Jan 07, 2023
Social Network Ads Prediction

Social network advertising, also social media targeting, is a group of terms that are used to describe forms of online advertising that focus on social networking services.

Khazar 2 Jan 28, 2022
A micro-game "flappy bird".

1-o-flappy A micro-game "flappy bird". Gameplays The game will be installed at /usr/bin . The name of it is "1-o-flappy". You can type "1-o-flappy" to

1 Nov 06, 2021
[NeurIPS 2021] Better Safe Than Sorry: Preventing Delusive Adversaries with Adversarial Training

Better Safe Than Sorry: Preventing Delusive Adversaries with Adversarial Training Code for NeurIPS 2021 paper "Better Safe Than Sorry: Preventing Delu

Lue Tao 29 Sep 20, 2022
Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding

Vision Longformer This project provides the source code for the vision longformer paper. Multi-Scale Vision Longformer: A New Vision Transformer for H

Microsoft 209 Dec 30, 2022
Projects for AI/ML and IoT integration for games and other presented at re:Invent 2021.

Playground4AWS Projects for AI/ML and IoT integration for games and other presented at re:Invent 2021. Architecture Minecraft and Lamps This project i

Vinicius Senger 5 Nov 30, 2022
DeepStochlog Package For Python

DeepStochLog Installation Installing SWI Prolog DeepStochLog requires SWI Prolog to run. Run the following commands to install: sudo apt-add-repositor

KU Leuven Machine Learning Research Group 17 Dec 23, 2022
Trained on Simulated Data, Tested in the Real World

Trained on Simulated Data, Tested in the Real World

livox 43 Nov 18, 2022
Python scripts form performing stereo depth estimation using the CoEx model in ONNX.

ONNX-CoEx-Stereo-Depth-estimation Python scripts form performing stereo depth estimation using the CoEx model in ONNX. Stereo depth estimation on the

Ibai Gorordo 8 Dec 29, 2022
A PyTorch version of You Only Look at One-level Feature object detector

PyTorch_YOLOF A PyTorch version of You Only Look at One-level Feature object detector. The input image must be resized to have their shorter side bein

Jianhua Yang 25 Dec 30, 2022
A repo to show how to use custom dataset to train s2anet, and change backbone to resnext101

A repo to show how to use custom dataset to train s2anet, and change backbone to resnext101

jedibobo 3 Dec 28, 2022
Zeyuan Chen, Yangchao Wang, Yang Yang and Dong Liu.

Principled S2R Dehazing This repository contains the official implementation for PSD Framework introduced in the following paper: PSD: Principled Synt

zychen 78 Dec 30, 2022
Neural Network Libraries

Neural Network Libraries Neural Network Libraries is a deep learning framework that is intended to be used for research, development and production. W

Sony 2.6k Dec 30, 2022
MVS2D: Efficient Multi-view Stereo via Attention-Driven 2D Convolutions

MVS2D: Efficient Multi-view Stereo via Attention-Driven 2D Convolutions Project Page | Paper If you find our work useful for your research, please con

96 Jan 04, 2023