Skip to main content

Alpha Hybrid CNN model for Image classification tasks Developed By Ihtesham Jahangir at Alpha Networks

Project description

AlphaNetworks

PyPI Version Python Versions License

AlphaNetworks is a Python package designed to train advanced image classification models using hybrid architectures like ResNet50V2 and DenseNet169. It provides a seamless interface for training, evaluating, and deploying deep learning models.


Table of Contents


Introduction

AlphaNetworks combines state-of-the-art architectures to offer superior performance in image classification tasks. By leveraging pre-trained weights and advanced optimization techniques, it ensures robust feature extraction and better generalization.


Features

  • Hybrid Architecture: Integrates ResNet50V2 and DenseNet169.
  • Data Augmentation: Enhances model robustness.
  • CLI Support: Train and configure models via the command line.
  • Customizable Hyperparameters: Adjust learning rate, batch size, etc.
  • Download Pretrained Weights: Automatically fetch required weights.

Installation

Prerequisites

  • Python: Version 3.6 or higher.
  • TensorFlow: Version 2.x or later.
  • pip: Latest version recommended.

Installation via Pip

Install AlphaNetworks directly from PyPI:

pip install alphanetworks

Usage

Command-Line Interface

Basic Usage

alphanetworks --train TRAIN --val VAL [OPTIONS]

Options

  • --train or -t: Path to the training dataset.
  • --val or -v: Path to the validation dataset.
  • --epochs or -e: Number of training epochs (default: 30).
  • --batch_size or -b: Batch size for training and validation (default: 32).
  • --lr or -l: Initial learning rate for the Adam optimizer (default: 0.001).
  • --output_dir or -o: Directory to save model weights and reports.
  • --nc: Number of target classes for classification (default: inferred from data).

Help

For a detailed list of options, run:

alphanetworks --help

Examples

Example 1: Basic Training

alphanetworks --train ./data/train --val ./data/val --epochs 20

Example 2: Custom Parameters

alphanetworks --train ./data/train --val ./data/val --epochs 50 --batch_size 64 --lr 0.0005 --nc 10

Programmatic Usage

from alphanetworks import alphanet

# Build the model
model = alphanet(input_shape=(224, 224, 3), num_classes=10)

# Compile the model
model.compile(
    optimizer="adam",
    loss="categorical_crossentropy",
    metrics=["accuracy"]
)

# Train the model
model.fit(train_data, validation_data=val_data, epochs=30)

Troubleshooting

Download Errors

During runtime, pre-trained weights for ResNet50V2 or DenseNet169 are automatically downloaded. Ensure you have a stable internet connection.


Project Structure

alphanetworks/
├── alphanet.py
├── utils.py
├── scripts/
│   └── train.py
├── setup.py
└── README.md

Documentation

For detailed documentation, visit the GitHub repository.


Contributing

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


License

This project is licensed under the MIT License.


Contact

For any queries, reach out to the author at mail.


Acknowledgments

  • TensorFlow and Keras Teams
  • Researchers of ResNet and DenseNet

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

alphanetworks-0.1.5.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alphanetworks-0.1.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file alphanetworks-0.1.5.tar.gz.

File metadata

  • Download URL: alphanetworks-0.1.5.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for alphanetworks-0.1.5.tar.gz
Algorithm Hash digest
SHA256 54c4c5ea3cc54d75e3805e55a9e19fbab70e1f8eee803c30ce7a580e8c9466ab
MD5 a6043e556bf4c1075379e84014148e61
BLAKE2b-256 206cf3a907ac9f78d21e0fbfadadf5f82a276a7124341e78ac615b1b0d0a3fc0

See more details on using hashes here.

File details

Details for the file alphanetworks-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: alphanetworks-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for alphanetworks-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7f585b7fa23cbf13d449dfbc7404453130a4656735095fcd0ac3b03d015fd5d5
MD5 7e74a2c0af421c2555118e364927a007
BLAKE2b-256 99c26c19d2d2c2a432642916c47085459d86bfc825a787d4d875ed6cdcc09e86

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