Skip to main content

EasyCNN: A library to create, train, and use custom CNN models with ease.

Project description

EasyCNN

EasyCNN is a Python library that simplifies the creation, training, and usage of custom Convolutional Neural Networks (CNNs) for image processing. It allows users to input their own datasets and metadata files, select from a variety of popular CNN architectures, and visualize training results, all with minimal code.

Features

  • Easy Model Selection: Choose from over 20 popular CNN architectures.
  • Custom Training: Train your models using your own datasets and metadata.
  • Visualization: Visualize training and validation accuracy and loss.
  • Predictions: Make predictions on new images using your trained model.
  • Automated Publishing: Publish your models with GitHub Actions and PyPI.

Installation

Install EasyCNN using pip:

pip install easycnn

Usage

Training a Model

To train a model using your own dataset and metadata:

from easycnn import train_model, visualize_training

metadata_path = 'path/to/your/metadata.csv'
image_dir = 'path/to/your/images'
model_name = 'ResNet50'
epochs = 10
batch_size = 32

history, model = train_model(metadata_path, image_dir, model_name, epochs, batch_size)
visualize_training(history)
print("Model saved as 'trained_model.h5'")

Making Predictions

To make predictions on new images using your trained model:

from easycnn import predict_image

model_path = 'trained_model.h5'
image_path = 'path/to/your/image.jpg'

predicted_class = predict_image(model_path, image_path)
print(f"The predicted class is: {predicted_class}")

Supported Model Architectures

EasyCNN supports 22 of the following CNN architectures:

  • VGG16
  • VGG19
  • ResNet50
  • ResNet101
  • ResNet152
  • InceptionV3
  • InceptionResNetV2
  • MobileNet
  • MobileNetV2
  • DenseNet121
  • DenseNet169
  • DenseNet201
  • NASNetMobile
  • NASNetLarge
  • EfficientNetB0
  • EfficientNetB1
  • EfficientNetB2
  • EfficientNetB3
  • EfficientNetB4
  • EfficientNetB5
  • EfficientNetB6
  • EfficientNetB7

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any inquiries, please contact Sidhant Yadav at supersidhant10@gmail.com

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

easycnn-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

easycnn-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file easycnn-0.1.0.tar.gz.

File metadata

  • Download URL: easycnn-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for easycnn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0122ff5e98f9fd8ca225cfbebd73a9b28e78c02235661606e743696452b7a066
MD5 43a1053f67888b02fc1d50cbf72ed77b
BLAKE2b-256 ee6c5ad1ae313338c7a96bb2183b73e2d96a91cf7a692fe16fc81ab34c4978a0

See more details on using hashes here.

File details

Details for the file easycnn-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: easycnn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for easycnn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56ca7713694d03b326049ac740b45d8a70e714756c9cc50587a5364a72276686
MD5 e996d2bfa31a0d006e8a5d39a4c51d58
BLAKE2b-256 35e7ab3137b2ed67354d64a0f2cdcffdad5ebf674a19691fcf7ccdbe63610c2f

See more details on using hashes here.

Supported by

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