Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pvlbzn/kot-or-not
Logistic regression (shallow neural network) which predicts whether input image is a cat or not.
https://github.com/pvlbzn/kot-or-not
classification-algorithm image-classification logistic-regression machine-learning neural-network numpy
Last synced: 8 days ago
JSON representation
Logistic regression (shallow neural network) which predicts whether input image is a cat or not.
- Host: GitHub
- URL: https://github.com/pvlbzn/kot-or-not
- Owner: pvlbzn
- Created: 2017-09-13T18:53:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-13T19:28:44.000Z (about 7 years ago)
- Last Synced: 2024-10-30T03:32:18.550Z (22 days ago)
- Topics: classification-algorithm, image-classification, logistic-regression, machine-learning, neural-network, numpy
- Language: Python
- Homepage:
- Size: 2.46 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kot or Not
Kot or Not (from Russian word Кот, a Cat, wordplay) project is an implementation
of a [logistic regression](https://en.wikipedia.org/wiki/Logistic_regression)
algorithm using `numpy` for matrix arithmetics.Algorithm uses [`sigmoid`](https://en.wikipedia.org/wiki/Sigmoid_function)
function, forward and backward propagations as well as vectorization techniques.## Data
Current implementation has training set with cardinality 209. Images scaled
down to `64 x 64 x 3` and processed as a feature vector `(64 * 64 * 3, 1)`.## Usage
```
usage: main.py [-h] [-d] [-r] [-i INPUT]Cat or not neural network
optional arguments:
-h, --help show this help message and exit
-d, --dump use model dump
-r, --retrain retrain model
-i INPUT, --input INPUT
path to input image
```To classify your image first you need to train a model
```
python3 main.py -r
```The model will be dumped into a flat text files: `weights` column vector
and `bias` literal.After training `--dump` can be used together with `--input` image path
```
python3 main.py -d -i images/moon.jpg
```Baby can Moon is certainly a cat, and `kot-or-not` NN things the same.
## Roadmap
* Implement a self learning feature from input images