- Implementing the Logistic Regression Classifier with Neural Networks mindset to detect cats from images.
- Librabries used:
Matplotlib
,h5py
,numpy
,PIL
andscipy
. - We are given a dataset of cats images as h5 file and the task is to tell if the image is a cat or not.
- The user can clone the repo and test the model by giving it his images.
- The Model was trained on small dataset and its test accuracy is 70% while its training accuracy is approximatly 100%.
For one example
The cost is then computed by summing over all training examples:
The goal is to learn
We are able now to use w and b to predict the labels for a dataset X. Implement the predict()
function. There are two steps to computing predictions:
-
Calculate
$\hat{Y} = A = \sigma(w^T X + b)$ -
Convert the entries of a into 0 (if activation <= 0.5) or 1 (if activation > 0.5), stores the predictions in a vector
Y_prediction
. If you wish, you can use anif
/else
statement in afor
loop (though there is also a way to vectorize this).
To get started with Meow Meow Detector, follow these installation steps:
Python3
- Install libraries mentioned above using the following command:
pip3 install <library name>
- Clone this repository to your local machine:
git clone https://github.com/shehabomar/Meow-Detector.git
- Navigate to the project directory:
cd Meow-Detector
- Run the model:
python3 logistic-regression-cats.py