Code Monkey home page Code Monkey logo

ear-alignment-cpr's Introduction

Ear alignment using Cascaded Pose Regression

Description

This library is fork of Piotrs Dollar Cascaded Pose Regression library(download link). Library successfully determines orientation and position of predefined model on picture from trained regression. Based on model position and orientation algorithm then align ear in its natural position. This library and research was part of my bachelor degree and it is available here (in Slovene)

Alignment process image Image shows process from annotating ear to alignment, cropping and masking.

This library and research was part of my bachelor thesis and it is available here (in Slovene)

Requirements

Library requires Matlab Image Processing Toolbox and Piotr's Matlab Toolbox (version 3.00 or later). The code was tested on Matlab R2015b.

How to use

  • Use poseLabeler.m to label your train (to label ground truth pose)

  • cprDemo.m is main function for running CPR

    • You should change parameters depending on your input data (train or test) inside cprDemo:
    	% number of sample images devided by 2
    	n0, n1 = 50 
    
    	% number of all input images !!!min. is 100!!!
    	d = 100 
    
    	% train images, should contain result attribute which stores images
    	data = load('trainImages.mat'); 
    
    	% train annotations from poseLabeler.m, should contain result atribute which stores annotations
    	$ primarily annotations from poseLabeler are in .txt files, you should use txt_to_mat_converter.m to convert .txt files into one .mat file
    	annotation = load('trainImages_annotations.mat');
    
    	% train or load/apply regressor
    
      if( 0 ) 
      	% training
      else
      	% alignment
      end

    NOTE: All code inside alignment block should be customized based on your needs. For my research was crucial to have unaligned set and therefore I needed map matrix to know how to save images.

  • Images are aligned based on enclosing rectangle of ellipse get from CPR algorithm.

  • If you want to define new model update poseGt.m (this script is original from CPR library and was not change for this research)

Resources

  1. Piotr Dollár, Peter Welinder, and Pietro Perona. Cascaded pose regression. In Computer Vision and Pattern Recognition (CVPR), IEEE Conference on, pages 1078{1085, 2010.

  2. Anika Pflug and Christoph Busch. Segmentation and normalization of human ears using cascaded pose regression. In Nordic Conference on Secure IT Systems, (NordSec), pages 261-272, 2014.

  3. Žiga Emeršič, Vitomir Štruc, and Peter Peer. Ear recognition: More than a survey. Accepted in Neurocomputing, 2016.

ear-alignment-cpr's People

Contributors

metodribic 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.