Skip to content

Latest commit

 

History

History
98 lines (76 loc) · 2.09 KB

File metadata and controls

98 lines (76 loc) · 2.09 KB

CNN-powered Math Expression Translator

This web application (Project for Sistemas Inteligentes at UPM) uses a Convolutional Neural Network (CNN) to translate handwritten math equations into LaTeX and Python function code.

Demo

You can try out the demo here.

Table of Contents

API Endpoints

Upload File

  • URL: /upload
  • Method: POST
  • Description: Upload a file to the server.
  • Request:
    • file: The file to upload.
  • Response:
    {
        "message": "File uploaded successfully!"
    }

Process Image

  • URL: /process
  • Method: GET
  • Description: Process the uploaded image.
  • Response:
    {
        "message": "Image processed successfully!",
        "num_segments": "<number_of_segments>"
    }

Download Image

  • URL: /download
  • Method: GET
  • Description: Download processed images.
  • Parameters:
    • image: The type of image to download (processed, contours, segmented).
    • n: The segment number (for segmented images).
  • Response: The requested image file.

Predict

  • URL: /predict
  • Method: GET
  • Description: Get the LaTeX and Python function code for the predicted equation.
  • Response:
    {
        "latex": "<latex_code>",
        "python": "<python_function_code>"
    }

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.