Skip to main content

MakeCNN

More and more people each day want to apply machine learning and AI into their products. As ML expands beyond the traditional fields, those who do want to jump into the fun may find themselves confused with the technical concepts involved and amount of learning required to successfully apply ML to their job. MakeCNN isto make this simple. All you do is just give data, and we take care of the rest!

The way it works is that you have a folder of image data from various classes, and MakeCNN simply extracts that data, trains a Convolutional Neural Network off of it, and then allows you to use it to make predictions on more data and apply it. That way instead of learning what a convolutional neural network is, you can instead apply it ASAP.

Installation

To install simply make sure you are using Python3 and do :

pip install mcnn

More details :

You must have a folder of data with this exact structure for MakeCNN to work (this is pretty standard in the ML world) :

Folder_name (you can choose this) :

  • Training (subfolder)
    • class_1 (subfolder) > contains images
    • class_2 (subfolder) > contains images
    • class_3 (subfolder) > contains images
  • Testing (subfolder)
    • class_1 (subfolder) > contains images
    • class_2 (subfolder) > contains images
    • class_3 (subfolder) > contains images

where the "Training" and "Testing" directories are for the training and testing data. Also note that MakeCNN can handle however many number of classes you want!

To make this easier to understand, if you wanted to use MakeCNN to predict between cats, dogs, and horses you should have a folder like this :

Any_name

  • Training
    • cat > contains cat images
    • dog > contains dog images
    • human > contains human images
  • Testing
    • cat > contains cat images
    • dog > contains dog images
    • human > contains human images

MakeCNN's main API, AutoWork, was designed to be extremely simple.

DEMO

from mcnn.make import AutoWork
aw = AutoWork(dataset_directory = "path_to_folder_containing_data") 

When you instantiate the AutoWork class, you give it the data (or really the string that has the path to the data), and all of that is processed. To control the image size of the images in your data when applied by the CNN model (if you so desire), you can change image_size from 150 (default) to whatever else. Don't worry - even if your images are not 150 x 150, they will be resized.

Then to train :

aw.train(epochs = 20)

Here we train our model for 20 epochs. Easy peasy, lemon squeezy.

If we want to use it, by say evaluating it or predicting it, we have some more stuff. To evaluate :

aw.test_evaluate() # this evaluates it on the test data given

Then to predict on a single image :

aw.predict(path_to_image = "give_path_to_image_file")

and you will get your prediction. It will either be "cat", "dog", or "human" for our example above. You can do this for every image in a file by :

aw.predict_directory(path_to_img_directory = "give_path_to_image_folders")

where you will instead get a list of predictions.

Simple, and easy-to-use - MakeCNN is how we make sure EVERYBODY can leverage ML.

Metadata

Release files for mcnn 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcnn 1.1.2
File Size Uploaded
mcnn-1.1.2.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcnn 1.1.2
File Interpreter ABI Platform
mcnn-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / mcnn-1.1.2.tar.gz

Download URL mcnn-1.1.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2fe1a70669efb8b7a111226deaad3ed039d0b64dbdc48bd835550351bf046ba9
BLAKE2b-256 checksum
How to use checksums
d55651deb9916e5ba9d10d6925543b4563e32dab5f33df13394b2499496999da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / mcnn-1.1.2-py3-none-any.whl

Download URL mcnn-1.1.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
838cf09debb12500b6ba3a9aba6c705119eadd88cb0158fef46f517abdd1dfb8
BLAKE2b-256 checksum
How to use checksums
f12f1a37e30359c7f392ede4ec3882b7506356b21d7604bc3b61b67498fed9d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1

2 release files

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page