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
- Host: GitHub
- URL: https://github.com/sajalkmr/notesseparator
- Owner: sajalkmr
- License: mit
- Created: 2023-01-04T18:07:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-18T19:05:27.000Z (over 3 years ago)
- Last Synced: 2025-01-22T08:12:43.669Z (over 1 year ago)
- Topics: deep-learning, image-classification, machine-learning, python, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 39.8 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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
- Clone this repository to your local machine.
- Install the required packages listed in the
requirements.txtfile by runningpip install -r requirements.txt. - Place the images you want to classify in the
test_imagesdirectory. - Put your model in the
modelsdirectory. The model should be saved in the.h5format. - Run the
NotesSeparator.pyscript to classify the images:NotesSeparator.ipynbif you are running in Jupyter Notebook. - The classified images will be saved in the
outputdirectory.
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:
- Conv2D layer with 16 filters and a kernel size of (3,3)
- MaxPooling2D layer
- Conv2D layer with 32 filters and a kernel size of (3,3)
- MaxPooling2D layer
- Conv2D layer with 16 filters and a kernel size of (3,3)
- MaxPooling2D layer
- Flatten layer
- Dense layer with 256 neurons
- 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.