Giter Site home page Giter Site logo

ml-graphology's Introduction

ml-graphology

About

Graphology is a method of identifying, evaluating, and understanding human personality traits through the strokes and patterns revealed by handwriting. Although human intervention in handwriting analysis has been effective, it is costly and prone to error. The project is a small attempt on developing a program that can predict the personality traits with the aid of machine learning without human intervention.

The details of the project is contained in the dissertation report Psychological Analysis based on Handwriting Pattern with ML.pdf provided in this repository.

Support Vector Machines (SVM) are used to classify the following handwriting features into a few selected personality traits.

  1. Top margin
  2. Pen pressure
  3. Baseline angle
  4. Letter size
  5. Line spacing
  6. Word spacing
  7. Slant angle

Project Structure

  1. The extract_routine.py reads the handwriting images from a folder named images in the same directory and extracts all the features by calling extract.py. The extracted raw feature values are stored in a file raw_feature_list.
  2. The raw_feature_list is read by feature_routine.py and mapped into discrete values. The discrete values are put into a file feature_list.
  3. The label_routine.py generates the personality traits of the handwriting features into a file label_list by reading the feature_list. This is where principles of graphology comes into picture. The label_list is used for training the classifiers.
  4. Combinations of the selected handwriting features are used to train eight SVM classifiers to predict eight personality traits of a handwriting image input. train_predict.py trains the SVM classifiers by reading the label_list and predicts input handwriting image.

Training Data

For my own educational purpose, I am using the handwriting samples provided by https://fki.tic.heia-fr.ch/databases/iam-handwriting-database for non-profit usage.

The images obtained from the above non-profit source need to be cropped and resized to have similar resolutions of 850 pixels width and ~850 pixels length so that they can be used in the program. Images modification is not in the scope of this project. You can use photoshop or any method of your choice to modify the images en masse.

As there is limit to the size of a commit in Github, I cannot put the data in this repository. The prepared data can be downloaded here https://drive.proton.me/urls/CCFB5R73RG#XUfhPiyr8ZBM

ml-graphology's People

Contributors

art3m1s-dev avatar dhirajlotlikar avatar dohejo avatar titangrit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ml-graphology's Issues

Convert to python 3?

Would love to see this converted to Python 3, and maybe the list of images used in the initial training? I've updated all the "print"s in the code, but I receive errors that I'm not sure how to fix depending on the images I use, from:

mean_angle = angle_sum / countour_count
ZeroDivisionError: float division by zero

...to

TypeError: slice indices must be integers or None or have an index method

Are there certain types of images that work better? Thanks!

how to run the code

can you please tell me how to run the code step by step , i read the read.me file but didn't understand how to run the code as i am a complete beginner can u explain how and where ( like vs code , atom ) to run the code on my laptop ,,

I've updated this project for Python 3

Hey, there! I really wanted to try out your project, but this OpenCV doesn't work on Python 2 anymore. So I managed to patch it for python 3.9 (version I'm currently on). I added some parenthesis around all the print functions, modified new functions, fixed one typo in the name of a variable, added some if statements for variables trying to divide themselves by 0 and got it up and running! I've submitted two pull requests: one for train_predict.py, and one for extract.py. Take a look and merge them if you approve

Understanding related to labeling

I just want simple explanation regarding to the outcomes of the proposed algorithim. Just clarify that what is the interpretation of the following outcome
Result_1
For example my question is that if Result states that Emotional stability is [1]. Can we deduce that person is Emotionaly stable or not ?. Or if Lack of Discipline is [0]. So Can we interept that the person has No Issue regariding to discipline?

images

hello can you send a link for the images used

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.