Skip to main content

No project description provided

Project description

AutoAI

This repository is a compilation of scripts that I have created in my time working with machine learning. These scripts aim to automate the annoying and silly parts of ML, allowing you to focus on what is important. PyPi: https://pypi.org/project/AutoAILib/
$ pip install autoailib

AutoAi.manual_test(model, testing_dir, labels)

This function tests a model given labels and testing data. It then compiles the results in a CSV file, and groups the results by class, and by correct and incorrect.
  • Model - Path of model that you want to test or model object.
  • Testing_dir - Path to the directory with your testing data.
  • Labels - Dictionary of the classes, in form (index:class_name)
Example csv:

AutoAi.compile_data(src, dest, num_imgs_per_class=0, train_ratio=.7, validation_ratio=.2, test_ratio=.1)

This function takes 2 required arguments, an original data source file, and a path to the desired data directory. Given just these two arguments, this function will create a new testing data folder at dest with training, validation, and testing folders, containing folders for each class. You can alter the ratio with the ratio arguments, as well as provide a number of img transforms to do if you are using images.
  • Src - Path to a folder that contains a folder for each class and then data examples in those class folders.
  • Dest - Path to a folder where you want the data to end up.
  • Num_imgs_per_class - This number of images will be added to the original set for each class through transforms. The theoretical limit for this would be 3! * original images per class
Demo:
Given the a path to the following folder: If augmentation used the following results will be yielded: Then these images will be copied to the dest folder with copied file structure, but an added upper layer: Example showing the images made it:

AutoAi.image_predict(model_path, image_path, labels)

This function takes 3 arguments: a path to a keras model, a path to an image, and a list of labels.
Demo:
Given a the correct arguments, we get the following output, as well as this image saved to our model directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AutoAILib-0.3.4.dev0.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file AutoAILib-0.3.4.dev0.tar.gz.

File metadata

  • Download URL: AutoAILib-0.3.4.dev0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for AutoAILib-0.3.4.dev0.tar.gz
Algorithm Hash digest
SHA256 d8bd5ea8440911018372f8d28c2c209df1f5588066c8b62268cdee04cdf0ad43
MD5 0149cb3e79aedc674c9989f04d46b798
BLAKE2b-256 932966c106f6c4117263973afceacc76c1d41c7340e302478d67800f4552bbab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page