This project trains a neural network model to classify Excel sheets into four categories:
- Summary (0)
- Transaction (1)
- Others (2)
- Cheque (3)
- Clone the repository or download the script.
- Install dependencies using:
pip install -r requirements.txt
- Place your
.xlsx
files inside thetrain-excel/
directory. - Run the script:
python train.py
- The trained model will be saved as
trained_model.h5
. - The scaler used for normalization will be saved as
scaler.pkl
.
- 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.
trained_model.h5
→ Saved Keras modelscaler.pkl
→ StandardScaler object for data normalization
After training, the model is evaluated using test data, and the accuracy is displayed.
- Load the trained model
model = keras.models.load_model("trained_model.h5")
in inference. - Load the new
.xlsx
file insidetest-excel/
directory. - Run the script:
python infer.py
Final result excel will be saved in predicted_sheets.xlsx
.