Giter Club home page Giter Club logo

hrshtv / statistical-shape-analysis Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 5.27 MB

Statistical analysis of 2D shapes based on "Generalized Procrustes Analysis" (Gower, J.C.) and "Active Shape Models - Their Training and Application" (Cootes et al.)

License: MIT License

MATLAB 92.68% Shell 2.70% Python 4.61%
shape-analysis statistical-shape-model generalized-procrustes-analysis procrustes-alignment active-shape-models asm face-images matlab

statistical-shape-analysis's Introduction

Statistical Shape Analysis

First Mode of Variation

Second Mode of Variation

Third Mode of Variation

Statistical analysis of 2D shapes based on "Generalized Procrustes Analysis" (Gower, J.C.) and "Active Shape Models - Their Training and Application" (Cootes et al.)

Data:

The dataset of 2D face images is publicly available here: IMM Face Database.
Download the data from the above link, place the files data_clean.sh and to_mat.py in the root directory of the downloaded data and run:

  1. bash data_clean.sh
  2. python3 to_mat.py

This will create faces2D.mat in the data directory.

Usage:

Documentation:

  • code/main_1.mlx : Main script for the approach based on Generalized Procrustes Analysis
  • code/main_2.mlx : Main script for approach based on Active Shape Models
  • code/align1.m : Align two given pointsets of equal cardinality via similarity transformations assuming that the pointset representations are standardized to pre-shape space
  • code/align2.m : Align two given pointsets of equal cardinality via similarity transformations, solving for the scale, translation, and rotation jointly
  • code/optimize1.m : Runs the algorithm in the pre-shape space and uses align1.m
  • code/optimize2.m : Runs the algorithm in the original space and uses align2.m
  • code/toPreshape.m : Standardizes the pointset to pre-shape space
  • code/updateMean.m : Finds the optimal shape mean given the aligned pointsets
  • code/plotPointsets.m : Plots the set of pointsets as a scatter plot, each pointset in a different color
  • code/plotWithMode.m : Plots the pointsets along with two sets of variation about the mean along the given mode of variation

statistical-shape-analysis's People

Contributors

hrshtv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.