LatexBeGone-inator
Abstract
Are you tired of the hassle and frustration of writing LaTeX equations? Do you find yourself longing for a simpler, more intuitive way to digitize your handwritten mathematical expressions? Well, worry no more because the LatexBeGone-inator (LBG) is here to save the day! Say goodbye to the hassle of writing LaTeX equations by hand! Introducing LBG, the revolutionary app that converts your handwritten mathematical expressions into perfectly formatted LaTeX code in seconds. Using cutting-edge machine learning algorithms, LBG accurately recognizes your equations and seamlessly integrates with your favourite LaTeX editors.
Author
Name: Atharv Krishn
Student Number: S4798636
Functionality
LBG aims to provide a user-friendly and efficient solution for converting handwritten mathematical expressions into LaTeX format. The system will offer a seamless experience through its web-based application, allowing users to easily digitize their handwritten work without the need for extensive LaTeX knowledge. This platform is structured around five pivotal functionalities:
- User Authentication and Account Management:
- A secure login mechanism ensures that users can safely access their accounts.
- Once logged in, users can manage their profiles.
- Image Upload and Preprocessing:
- Users can upload images of their handwritten mathematical expressions through the web interface.
- The uploaded images will undergo preprocessing techniques to enhance quality and remove noise.
- Symbol Recognition:
- Employ advanced machine learning algorithms to recognize and identify the individual mathematical symbols within the uploaded images.
- Four recognition algorithms will be explored and compared: Neural Network (NN), Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), and Random Forest Classifier. The most accurate and efficient algorithm will be selected.
- The data set “HASYV2” (Hand Written Alphanumeric Chars-Numbers, Letters, Mathematical & Scientific Symbols) will be used to train and test the model
- LaTeX Conversion:
- Once the symbols are recognized, it will convert them into their corresponding LaTeX code.
- Conversion History:
- Users have access to a history of their conversions, allowing for easy retrieval of past work.
Scope
The scope of the Minimum Viable Product (MVP) for LBG will focus on delivering the following core functionalities:
- Fundamental Image Upload through the Web Interface:
- Develop a user-friendly web interface that allows users to easily upload images of their handwritten mathematical expressions.
- Implement a simple and intuitive image upload functionality.
- Provide clear instructions and guidelines to assist users in uploading their images correctly.
- Symbol Recognition of Pre-processed Image using Convolutional Neural Network (CNN):
- Utilize a Convolutional Neural Network (CNN) architecture for accurate recognition of mathematical symbols from the pre-processed images.
- Train the CNN model on a diverse dataset of handwritten mathematical symbols, including digits, letters, and common mathematical operators.
- Optimize the CNN model’s architecture and hyperparameters to achieve high recognition accuracy and efficiency.
- Integrate the trained CNN model into the LBG system for real-time symbol recognition.
- Conversion of Recognized Symbols into LaTeX Code:
- Develop algorithms and techniques to convert the recognized mathematical symbols into their corresponding LaTeX code representations.
- Maintain the integrity and layout of the original handwritten expression.
- Support a small range of mathematical notation (basic algebra).
- Optimize the LaTeX code generation process for accuracy and efficiency.
- Display the generated LaTeX code on the web interface in a user-friendly format.
Quality Attributes
The design and development of the LBG system are guided by three critical quality attributes:
- Reliability:
- Reliability in LBG is paramount, ensuring consistent accuracy in symbol recognition across diverse handwriting styles and mathematical expressions.
- This reliability extends to the system’s performance, where every user interaction, from image upload to LaTeX conversion, adheres to the highest standards of precision and consistency.
- Scalability:
- Vertical scalability refers to the process of adding more resources to a single machine or server on which the CNN operates. This approach is often quicker to implement for immediate performance boosts but has its limits based on the maximum capabilities of a single machine.
- Horizontal scalability in CNN involves adding more machines or servers to your infrastructure, distributing the workload across multiple nodes.
- Anticipating a broad user base, LBG should be engineered for scalability so that the system is capable of managing fluctuating demands without compromising on performance.
- Testability:
- Testability refers to the ease with which a system can be tested. It is about how conveniently and effectively a system can be evaluated to ensure it functions as intended.
- In the context of a CNN, testability involves the ability to design and execute tests that can verify the correctness, performance, and robustness of the CNN model.
- The availability of appropriate testing datasets that cover various scenarios and edge cases.
Evaluation
An evaluation plan that covers all MVP functionality and all quality attributes, essentially outlines a systematic approach to assess whether the developed software meets its intended goals and adheres to specified quality standards:
- Reliability:
- The evaluation of reliability involves testing of recognition symbols using diverse handwritten datasets and testing of performance metrics such as:
- Accuracy: The ratio of correctly predicted instances to the total instances.
- Precision and Recall: Precision (the ratio of true positives to the sum of true and false positives) and recall (the ratio of true positives to the sum of true positives and false negatives).
- F1 Score: The harmonic mean of precision and recall.
- Scalability:
- Perform load testing usage at varying levels of intensity and observing the model’s response.
- Stress testing involves pushing the system to its limits to identify the maximum capacity it can handle before performance degrades.
- Testability:
- Testability is evaluated by measuring code coverage metrics, defect detection rates, and the efficiency of the testing process.
- Unit Testing of individual components of the CNN, such as layers, activation functions, and data preprocessing steps To ensure that each component functions correctly in isolation and that any changes or bugs in these components can be quickly identified.