Skip to content

codeplugtech/keras-excel-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Excel Sheet Classification with Keras

This project trains a neural network model to classify Excel sheets into four categories:

  • Summary (0)
  • Transaction (1)
  • Others (2)
  • Cheque (3)

Installation

  1. Clone the repository or download the script.
  2. Install dependencies using:
    pip install -r requirements.txt

Usage

  1. Place your .xlsx files inside the train-excel/ directory.
  2. Run the script:
    python train.py
  3. The trained model will be saved as trained_model.h5.
  4. The scaler used for normalization will be saved as scaler.pkl.

Model Training

  • The script extracts features from each Excel sheet.
  • It normalizes data and trains a neural network with 64-32-4 dense layers.
  • Early stopping is enabled to prevent overfitting.
  • The final accuracy of the model is printed after evaluation.

Output

  • trained_model.h5 → Saved Keras model
  • scaler.pkl → StandardScaler object for data normalization

Evaluation

After training, the model is evaluated using test data, and the accuracy is displayed.

Inference

  1. Load the trained model model = keras.models.load_model("trained_model.h5") in inference.
  2. Load the new .xlsx file inside test-excel/ directory.
  3. Run the script:
    python infer.py

Result

Final result excel will be saved in predicted_sheets.xlsx .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages