Skip to main content

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

Metadata

Release files for easycnn 0.1.0

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

Source distribution (sdist)

Source distribution for easycnn 0.1.0
File Size Uploaded
easycnn-0.1.0.tar.gz 4.6 kB Details

Built distribution (wheel)

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

Total release size: 10.2 kB

Release files / easycnn-0.1.0.tar.gz

Download URL easycnn-0.1.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0122ff5e98f9fd8ca225cfbebd73a9b28e78c02235661606e743696452b7a066
BLAKE2b-256 checksum
How to use checksums
ee6c5ad1ae313338c7a96bb2183b73e2d96a91cf7a692fe16fc81ab34c4978a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / easycnn-0.1.0-py3-none-any.whl

Download URL easycnn-0.1.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56ca7713694d03b326049ac740b45d8a70e714756c9cc50587a5364a72276686
BLAKE2b-256 checksum
How to use checksums
35e7ab3137b2ed67354d64a0f2cdcffdad5ebf674a19691fcf7ccdbe63610c2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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