Skip to content

Python script to apply some basic knowledge regarding tensorflow/keras and OpenCV.

Notifications You must be signed in to change notification settings

StevenMacias/webcam_fashion_mnist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Webcam Fashion MNIST

Python script to apply some basic knowledge regarding Tensorflow/Keras and OpenCV.

This script takes a picture using the webcam and then predicts the object with a simple neural network trained using the Fasion MNIST dataset.

Results

Here you can find some successful results:

Virtual enviroment

It is really recommended to use a virtual environment:

sudo apt update
sudo apt install python3-dev python3-pip
sudo pip3 install -U virtualenv  # system-wide install

Then create a new virtual environment

virtualenv --system-site-packages -p python3 ./venv

And activate it

source ./venv/bin/activate  # sh, bash, ksh, or zsh

Packages required:

Install the following packages

pip install --upgrade tensorflow
pip install matplotlib
sudo apt install python3-opencv

How to use:

  1. Run python webcam_fashion_mnist.py.
  2. The webcam will start running.
  3. If you want to quit, just press 'q'.
  4. Bring the picture that you want to predict.
  5. Once the object is in the right frame, press the key 's' to save a picture.
  6. After hitting 's' the program will show the image in a 28x28 resolution and its prediction.
  7. Press 'q' to close the result.

You can exit from the virtual environment using the command deactivate.

Author

  • Steven Macías - webcam_fashion_mnist script - StevenMacias

Sources

About

Python script to apply some basic knowledge regarding tensorflow/keras and OpenCV.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages