This project automates graphological analysis using machine learning to predict personality traits from handwriting. It processes handwritten images, extracts relevant features, and applies machine learning models to determine psychological attributes.
- Clone the repository:
git clone https://github.com/yourusername/handwriting-analysis.git
- Navigate to the project directory:
cd HBPA
- Install the required packages:
pip install -r requirements.txt
- Ensure your handwriting samples are in the
data/samples
directory. - Run the analysis script:
python train_predict_v3.py
- The results will be displayed in the terminal.
Data obtained from the IAM Handwriting Database of Research Group on Computer Vision and Artificial Intelligence, INF University of Bern, Switzerland.
-
Contains 1538 pages of scanned text.
-
657 writers contributed samples of their handwriting.
-
Each handwriting sample is labeled with corresponding psychological traits by manually studying each document.
-
Sample data from IAM Handwriting Database
-
Images are cropped and saved as PNG images with an automatic action script.
-
The width of all the images is 850 pixels, and the height varies according to the content of the handwriting in the image.
Data sample after image processing
- Resolution enhancement
- Noise reduction
- Grayscale conversion
- Contour detection
- Warp affine transformation
- Horizontal and vertical projections
- Baseline
- Top margin
- Letter size
- Line spacing
- Word spacing
- Pen pressure
- Slant angle
The system predicts eight key psychological attributes:
- Emotional Stability
- Mental Energy or Will Power
- Modesty
- Personal Harmony and Flexibility
- Lack of Discipline
- Poor Concentration
- Non-communicativeness
- Social Isolation
Screenshots of actual terminal output of the model along with it's respective handwriting sample:
- Aim to design and implement an intuitive UI that facilitates easy access for the general public, enabling them to utilize the handwriting biometrics system effectively.
- Transition from using Support Vector Machines (SVM) to employing CNNs for direct handwriting analysis, leveraging their advanced pattern recognition capabilities to enhance the system’s accuracy.
- Focus on reducing the model’s execution time without compromising accuracy, ensuring a more efficient and responsive system for real-time applications.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit them:
git commit -m "Add new feature"
- Push to the branch:
git push origin feature-branch
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.