Skip to main content

A lightweight binary image classification system built with scikit‑learn, focusing on k‑Nearest Neighbors (kNN) and classical ML models. It features dynamic, model‑aware image preprocessing (HOG, scaling, PCA) that adapts automatically to image characteristics, enabling efficient training and reliable inference for custom datasets.

Project description

DynamicML 🚀

Dynamic, model‑aware classical machine learning for image classification

CREATED BY SUNKARA SAI GANESH , KARROTHU MOURYA , KUDIRELLA SANMUKA SAI, DONTALA. KIRAN KUMAR.

Train powerful machine learning models for image classification with built-in preprocessing, feature extraction, scaling, dimensionality reduction, evaluation, and model serialization — all through a clean Python API. DynamicML is an intelligent image-based ML framework focused on classical machine learning pipelines for computer vision tasks. It automates the difficult parts of image preprocessing using techniques like HOG (Histogram of Oriented Gradients), LBP (Local Binary Patterns), PCA, feature scaling, label encoding, and model persistence, allowing developers to focus on experimentation instead of boilerplate code. The framework currently supports a wide collection of supervised image classification algorithms including SVMs, Random Forests, Boosting models, Naive Bayes, Neural Networks, Ensemble models, and more.


✨ Features Category Capabilities Image Processing Automatic image resizing, grayscale conversion, normalization Feature Extraction HOG (Histogram of Oriented Gradients), LBP (Local Binary Patterns), flattened pixel features Feature Engineering PCA dimensionality reduction, StandardScaler, MinMaxScaler Machine Learning SVM, Random Forest, RidgeClassifier, KNN, Gradient Boosting, AdaBoost, MLP, GaussianNB, and many more Evaluation Accuracy score, classification report, confusion matrix Model Persistence Save trained models using Joblib Dataset Handling Folder-based image dataset loading Prediction Pipeline Reusable preprocessing objects for inference Classical CV Pipeline Optimized preprocessing strategies tailored per model


🚀 Why DynamicML? Traditional image ML workflows usually require manually writing: • image preprocessing pipelines • feature extraction logic • PCA transformation • scaling pipelines • label encoding • model saving/loading • evaluation code DynamicML combines all of these into a unified framework. DynamicML Traditional Workflow Automatic preprocessing Manual OpenCV pipelines Built-in HOG/LBP extraction Custom feature engineering Automatic scaling & PCA Separate preprocessing scripts One-function model training Multiple training files Saved preprocessing bundles Manual artifact management Ready for inference Rebuild preprocessing pipeline manually


🧠 Supported Models DynamicML currently includes support for: Classification Models • GaussianNB • ComplementNB • MultinomialNB • RidgeClassifier • LinearSVC • SVC • NuSVC • RandomForestClassifier • DecisionTreeClassifier • ExtraTreesClassifier • GradientBoostingClassifier • HistGradientBoostingClassifier • AdaBoostClassifier • BaggingClassifier • VotingClassifier • KNeighborsClassifier • RadiusNeighborsClassifier • GaussianProcessClassifier • MLPClassifier • NearestCentroid Implemented inside the training pipeline system.


🖼️ Image Processing Pipeline DynamicML uses intelligent preprocessing strategies depending on the model type. HOG Feature Extraction DynamicML heavily utilizes: • HOG (Histogram of Oriented Gradients) • PCA dimensionality reduction • Standard scaling • grayscale normalization Example HOG extraction pipeline: LBP Texture Features For texture-sensitive models like AdaBoost, DynamicML uses: • Local Binary Patterns (LBP) • histogram-based texture encoding Implemented preprocessing:


📦 Installation pip install dynamicml Development Installation git clone https://github.com/yourusername/dynamicml.git

cd dynamicml

pip install -e .


📂 Dataset Structure DynamicML expects datasets in folder-based format: dataset/ ├── cats/ │ ├── cat1.jpg │ ├── cat2.jpg │ └── ... ├── dogs/ │ ├── dog1.jpg │ ├── dog2.jpg │ └── ... Each folder name becomes the class label automatically using LabelEncoder.


⚡ Quick Start Train a Random Forest Classifier from dynamicml import Scikit_Img_Classif_Supervised

model = Scikit_Img_Classif_Supervised.RandomForest_Classifier( dataset_path="dataset/" )


Train an SVC Model from dynamicml import Scikit_Img_Classif_Supervised

model = Scikit_Img_Classif_Supervised.SVC( dataset_path="dataset/", C_val=5.0, kernel_val="rbf" )


Train a Neural Network from dynamicml import Scikit_Img_Classif_Supervised

model = Scikit_Img_Classif_Supervised.MLP_Classifier( dataset_path="dataset/", hidden_layer_sizes_val=(256, 128), max_iter_val=500 )


📊 Example Output Loading and preprocessing data... Training Random Forest Classifier... Fitting the Model.... Model Training Completed!

Accuracy: 96.4%

Classification Report:

          precision    recall  f1-score   support

   cats       0.97      0.95      0.96
   dogs       0.96      0.98      0.97

Confusion Matrix:

[[95 5] [ 2 98]]

Model saved at: RandomForestClassifier_MN.joblib


🧩 Architecture Dataset ↓ Preprocessing ↓ Classifier (Single Model) ↓ Evaluation ↓ Model Saving


🔬 Core Technologies Used DynamicML is powered by: • OpenCV • scikit-learn • NumPy • Joblib • scikit-image


🧠 Intelligent Preprocessing Different models use different optimized pipelines internally. Examples: Model Preprocessing Strategy SVC HOG + PCA + StandardScaler RandomForest HOG features AdaBoost LBP texture features MLP Flattened pixels + StandardScaler KNN HOG + PCA + Scaling GaussianNB HOG + PCA Implemented dynamically inside preprocessing pipelines.


💾 Model Saving DynamicML automatically saves: • trained model • PCA object • scaler • label encoder using Joblib bundles. Example save pipeline:


📈 Evaluation Metrics DynamicML automatically provides: • Accuracy Score • Classification Report • Confusion Matrix Integrated evaluation helper:


🎯 Project Vision DynamicML aims to become a complete classical computer vision machine learning framework that simplifies image classification workflows while still giving developers deep control over preprocessing and model configuration. The goal is to make traditional ML for computer vision: • faster • cleaner • reusable • production-friendly • beginner accessible without sacrificing flexibility.


🛣️ Roadmap Planned Features • Prediction API • Batch inference system • Deep learning integration • Automatic model selection • Hyperparameter tuning • Experiment tracking • Streamlit dashboard • CLI interface • ONNX export • FastAPI deployment • GPU acceleration • Explainable AI visualizations


🤝 Contributing Contributions are welcome! You can contribute by: • adding new ML models • improving preprocessing pipelines • optimizing feature extraction • improving documentation • adding deployment integrations


📜 License DynamicML is released under the MIT License.

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

dynamicml-1.1.6.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

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

dynamicml-1.1.6-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file dynamicml-1.1.6.tar.gz.

File metadata

  • Download URL: dynamicml-1.1.6.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for dynamicml-1.1.6.tar.gz
Algorithm Hash digest
SHA256 7192079cf219c5df7e147bf2b3b965b5acb4d46acb7de386a73a09e874d20b13
MD5 41c2684227aad648a41ee9730ba2e63f
BLAKE2b-256 fe76b38d3479115ca81dd2cbbe7e5ac36e957e37fc714c525e5a9cef5646378f

See more details on using hashes here.

File details

Details for the file dynamicml-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: dynamicml-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for dynamicml-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ece3948693ffecbbef446cf5b673bdce17bc9747b210a41ede813ffc235d3e61
MD5 5178691cb9c2379c43698756b95d2a17
BLAKE2b-256 8d3d510105212dbe3dbf5b0172b55e4b6ae3b98576f02554b5298be8b0fc0ae2

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