Giter Site home page Giter Site logo

j-christl / mnisttoimgfiles Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 39 KB

Small python 3 tool to load the MNIST dataset from keras and save each entry to a *.png file

Python 100.00%
machine-learning neural-networks neural-network mnist mnist-dataset mnist-data mnist-handwriting-recognition mnist-image-dataset tool tools python python3 keras tensorflow matplotlib

mnisttoimgfiles's Introduction

MnistToImgFiles

Small python 3 tool to load the MNIST dataset from keras and save each entry to a .png file using matplotlib. This might be helpful if you are building a neural network for handwriting detection using the MNIST dataset and want to look at the numbers represented by the data quickly.

Usage

python3 main.py [destination dir] [mode] [start index] [end index]
        where   destination dir must be a valid directory name (default: ./mnist_images/)
                    (if it does not exist, it will be created)
                mode must be either test or train (default: test)
                start index must be an integer (default: 0)
                end index must be an integer (default: 50)

Example usage

python3 main.py ./mnist_images/ test 0 5

This will create 5 png files in ./mnist_images/ containing the first 5 handwritten numbers of the MNIST dataset

Result

.
├── main.py
└── mnist_images
    └── test
        ├── mnist_test_0-7.png
        ├── mnist_test_1-2.png
        ├── mnist_test_2-1.png
        ├── mnist_test_3-0.png
        └── mnist_test_4-4.png

Images

The resulting images are created using matplotlib and look like the following: (mnist_test_0-7.png) alt text

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.