Skip to content

A React and Flask-based web app for font recognition, allowing users to upload images, identify fonts, preview text in the detected font, and download the font file.

Notifications You must be signed in to change notification settings

ravindusenavirathna/fontReco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Font Recognition Web App

A web application for recognizing fonts in images, built with React and Flask. Users can upload images, identify fonts, preview sample text in the detected font, and download the corresponding font file.

Features

  • Image Upload: Upload an image containing text to identify its font.

  • Font Prediction: The app processes the image, recognizes the font, and displays its name.

  • Text Preview: Preview sample text using the identified font for visual reference.

  • Font Download: Download the identified font file directly from the app.

Tech Stack

  • Frontend: React

  • Backend: Flask (Python)

  • Machine Learning Model: Keras (.keras model file for font recognition)

  • Database: MySQL (optional, if database storage is required)

Setup and Installation

Prerequisites

  • Node.js and npm

  • Python 3.x

  • Flask

  • MySQL (if database is required)

  • keras, tensorflow, flask, and flask_cors Python packages

Clone the Repository

git clone https://github.com/ravindusenavirathna/font-recognition-app.git
cd font-recognition-app

Backend Setup (Flask)

  1. Navigate to the backend directory:
cd backend
  1. Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  1. Install the required packages:
pip install -r requirements.txt
  1. Place your trained model file (e.g., font_recognition_model.keras) in the model directory.
  2. Run the Flask server:
python app.py

Frontend Setup (React)

  1. Navigate to the frontend directory:
cd frontend
  1. Install dependencies:
npm install
  1. Start the React development server:
npm start

Configuration

  • Update the Flask server URL in frontend/src/ImageUpload.jsx if your backend runs on a different address or port.

  • Ensure the Flask CORS settings in app.py allow requests from your React frontend's address (usually http://localhost:3000).

Usage

  1. Launch both the Flask and React servers.

  2. In the React app, upload an image with text.

  3. The app will display the identified font on the right side, with a sample text preview and a download link for the font file.

License

This project is licensed under the MIT License.

Acknowledgements

About

A React and Flask-based web app for font recognition, allowing users to upload images, identify fonts, preview text in the detected font, and download the font file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published