https://github.com/adamouization/binary-image-classifier
:black_large_square: :white_large_square: Binary Image Classifier using Gaussian Mixture Models written in MatLab (2017)
https://github.com/adamouization/binary-image-classifier
artificial-intelligence binary-image classifier matlab matlab-script pattern pattern-classification pattern-matching pattern-recognition
Last synced: 12 months ago
JSON representation
:black_large_square: :white_large_square: Binary Image Classifier using Gaussian Mixture Models written in MatLab (2017)
- Host: GitHub
- URL: https://github.com/adamouization/binary-image-classifier
- Owner: Adamouization
- License: mit
- Created: 2017-03-08T11:29:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-20T16:37:06.000Z (almost 8 years ago)
- Last Synced: 2025-01-05T01:43:24.696Z (about 1 year ago)
- Topics: artificial-intelligence, binary-image, classifier, matlab, matlab-script, pattern, pattern-classification, pattern-matching, pattern-recognition
- Language: Matlab
- Homepage:
- Size: 1.7 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Binary Image Classifier
===========
This program is a classifier that is trained to classify labeled binary images (image bits can only have two values: 0 and 1 for black and white), also known as supervised training.
The classifier is trained by fitting a GMM (Gaussian Mixture Model) based on each image's feature vector from the training set, which will allow us to classify new binary images (different from the training set) using a Maximum a Posteriori classification technique by comparing each of the new images' feature vector to the ones stored in the GMM.
The results can be viewed in a confusion matrix, which is a table that is incremented after each new image has been classified. It allows us to visualize how many images have been correctly classified over the total set.
After optimization by calculating the ideal feature vector length (8 was the chosen length), a classifying precision of **83%** was achieved.
You can read a more detailed explanation of how the classifier was built, optimized and the mathematics used here: [report](https://github.com/Adamouization/Binary-Image-Classifier/blob/master/report.pdf).
## Screenshots
###### Confusion matrix screenshot - assessing the classifier's quality

###### Gaussian Mixture Model screenshot - the results of the classifier's training used to classify new images

## Usage
Clone this repository and open the project in MatLab:
```
git clone https://github.com/Adamouization/Binary-Image-Classifier
```
#### MatLab application usage
Once you have the project opened in MatLab, move to the `src` directory and open the `script.m`. Run the `script.m` file directly from within MatLab
#### Command line usage
Once you have cloned the repository, `cd` into `Binary-Image-Classifier/src` directory:
```
cd Binary-Image-Classifier/src
```
Then run the following command:
```
"C:\\matlab.exe" -nodisplay -nosplash -nodesktop -r "run('script.m');"
```
where `C:\\matlab.exe` is the path to your MatLab executable.
## License
* see [LICENSE](https://github.com/Adamouization/Binary-Image-Classifier/blob/master/LICENSE) file
## Contact
* email: adam@jaamour.com
* website: www.adam.jaamour.com
* twitter: [@Adamouization](https://twitter.com/Adamouization)