An open API service indexing awesome lists of open source software.

https://github.com/sajalkmr/notesseparator

A simple deep learning model to separate Handwritten notes and non notes images with Python and Tensorflow
https://github.com/sajalkmr/notesseparator

deep-learning image-classification machine-learning python tensorflow

Last synced: about 2 months ago
JSON representation

A simple deep learning model to separate Handwritten notes and non notes images with Python and Tensorflow

Awesome Lists containing this project

README

          

# HandwrittenNotesClassification
A deep learning model to separate Handwritten notes and non notes images with Python and Tensorflow.

Requirements



  • Python 3.6+

  • TensorFlow 2.0+

  • OpenCV 4.0+

  • Numpy

  • Json

Usage



  1. Clone this repository to your local machine.

  2. Install the required packages listed in the requirements.txt file by running pip install -r requirements.txt.

  3. Place the images you want to classify in the test_images directory.

  4. Put your model in the models directory. The model should be saved in the .h5 format.

  5. Run the NotesSeparator.py script to classify the images: NotesSeparator.ipynb if you are running in Jupyter Notebook.

  6. The classified images will be saved in the output directory.

Example File Structure



├── classify_notes.py
├── models
│ └── notesmodel.h5
├── output
│ ├── non_notes
│ ├── notes
│ └── results
│ ├── image1.png
│ ├── image1.json
│ ├── image2.png
│ ├── image2.json
│ └── results.json
├── README.md
└── test_images
├── image1.jpg
└── image2.jpg

Model Architecture


The model used for this project is a Convolutional Neural Network (CNN) with the following layers:



  1. Conv2D layer with 16 filters and a kernel size of (3,3)

  2. MaxPooling2D layer

  3. Conv2D layer with 32 filters and a kernel size of (3,3)

  4. MaxPooling2D layer

  5. Conv2D layer with 16 filters and a kernel size of (3,3)

  6. MaxPooling2D layer

  7. Flatten layer

  8. Dense layer with 256 neurons

  9. Dense layer with 1 neuron (output layer) with a sigmoid activation function

Files Saved After Classification


The classified images are saved in either the notes or non_notes directory in the output folder depending on their classification. Additionally, a results.json file is created in the output/results folder that contains the results of the classification for each image.

Contributing


Contributions are welcome. Please fork the repository and submit a pull request.

License


This project is licensed under the MIT License.