{"id":15290484,"url":"https://github.com/amogh7joshi/deeptoolkit","last_synced_at":"2026-01-05T05:49:50.044Z","repository":{"id":62567476,"uuid":"331779415","full_name":"amogh7joshi/deeptoolkit","owner":"amogh7joshi","description":"A deep learning library containing implementations of popular algorithms and extensions to TensorFlow and Keras, with an in-built computer vision module.","archived":false,"fork":false,"pushed_at":"2021-06-17T17:41:27.000Z","size":8729,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T17:48:02.326Z","etag":null,"topics":["deep-learning","keras","neural-networks","python","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amogh7joshi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-21T23:10:06.000Z","updated_at":"2021-06-17T17:41:30.000Z","dependencies_parsed_at":"2022-11-03T16:30:27.899Z","dependency_job_id":null,"html_url":"https://github.com/amogh7joshi/deeptoolkit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amogh7joshi%2Fdeeptoolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amogh7joshi%2Fdeeptoolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amogh7joshi%2Fdeeptoolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amogh7joshi%2Fdeeptoolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amogh7joshi","download_url":"https://codeload.github.com/amogh7joshi/deeptoolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245232913,"owners_count":20581703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","keras","neural-networks","python","tensorflow"],"created_at":"2024-09-30T16:08:20.537Z","updated_at":"2026-01-05T05:49:50.007Z","avatar_url":"https://github.com/amogh7joshi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepToolKit\n\n![PyPI](https://img.shields.io/pypi/v/deeptoolkit)\n[![Downloads](https://pepy.tech/badge/deeptoolkit)](https://pepy.tech/project/deeptoolkit)\n![GitHub](https://img.shields.io/github/license/amogh7joshi/deeptoolkit)\n![Travis (.com)](https://img.shields.io/travis/com/amogh7joshi/deeptoolkit?label=Travis%20CI)\n[![Build Status](https://dev.azure.com/joshiamoghn/deeptoolkit/_apis/build/status/amogh7joshi.deeptoolkit?branchName=master)](https://dev.azure.com/joshiamoghn/deeptoolkit/_build/latest?definitionId=1\u0026branchName=master)\n![CodeQL](https://github.com/amogh7joshi/deeptoolkit/workflows/CodeQL/badge.svg)\n\nDeepToolKit provides implementations of popular machine learning algorithms, extensions to existing\ndeep learning pipelines using TensorFlow and Keras, and convenience utilities to speed up the process\nof implementing, training, and testing deep learning models. In addition, DeepToolKit includes an inbuilt \ncomputer vision module containing implementations of facial detection and image processing algorithms. \n\n## Installation\n\n### Python Package\n\nDeepToolKit can be installed directly from the command line:\n\n```shell script\npip install deeptoolkit\n```\n\nYou can then work with it either by importing the library as a whole, or by importing \nthe functionality you need from the relevant submodules.\n\n```python\n# Complete library import.\nimport deeptoolkit as dtk\n\n# Module and function imports.\nfrom deeptoolkit.data import plot_data_cluster\nfrom deeptoolkit.blocks import SeparableConvolutionBlock\nfrom deeptoolkit.losses import CategoricalFocalLoss\n```\n\n### From Source\n\nIf you want to install DeepToolKit directly from source, (i.e. for local development), then first\ninstall the git source:\n\n```shell script\ngit clone https://github.com/amogh7joshi/deeptoolkit.git\n```\n\nThen install system requirements and activate the virtual environment. A Makefile is included for installation:\n\n```shell script\nmake install\n```\n\n\n## Features\n\nDeepToolKit provides a number of features to either use standalone or integrated in a deep learning model \nconstruction pipeline. Below is a high-level list of features in the module. Proper documentation is under construction.\n\n### Model Architecture Blocks: `deeptoolkit.blocks`\n\n- Generic model architecture blocks, including convolution and depthwise separable convolution blocks, implemented as \n`tf.keras.layers.Layer` objects so you can directly use them in a Keras model.\n- Applied model architecture blocks, including squeeze and excitation blocks and ResNet identity blocks.\n\n**For Example**:\n\n```python\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.layers import MaxPooling2D\nfrom tensorflow.keras.layers import Input, Dense, Flatten\nfrom deeptoolkit.blocks import ConvolutionBlock\n\n# Construct a Keras Functional model like normal.\ninp = Input((256, 256, 3))\nx = ConvolutionBlock(32, kernel_size = (3, 3), activation = 'relu')(inp)\nx = MaxPooling2D(pool_size = (2, 2))(x)\nx = ConvolutionBlock(16, kernel_size = (3, 3), activation = 'relu')(x)\nx = MaxPooling2D(pool_size = (2, 2))(x)\nx = Flatten()(x)\nx = Dense(1024, activation = 'relu')(x)\nx = Dense(10, activation = 'relu')(x)\nmodel = Model(inp, x)\n```\n\n### Loss Functions: `deeptoolkit.losses`\n\n- Custom loss functions including binary and categorical focal loss, built as `tf.keras.losses.Loss` objects\nso you can use them in a Keras model training pipeline as well.\n\n**For Example**:\n\n```python\nfrom tensorflow.keras.optimizers import Adam\nfrom deeptoolkit.losses import BinaryFocalLoss\n\n# Using the model from the above example.\nmodel.compile(\n   optimizer = Adam(),\n   loss = BinaryFocalLoss(),\n   metrics = ['accuracy']\n)\n```\n\n### Data Processing and Visualization: `deeptoolkit.data`\n\n- Data preprocessing, including splitting data into train, validation, and test sets, and \nshuffling datasets while keeping data-label mappings intact.\n- Data visualization, including cluster visualizations. \n\n**For Example:**\n\n```python\nimport numpy as np\nfrom deeptoolkit.data import train_val_test_split\n\nX = np.random.random(100)\ny = np.random.random(100)\nX_train, X_val, X_test, y_train, y_val, y_test = train_val_test_split(X, y, split = [0.6, 0.2, 0.2])\n```\n\n### Model Evaluation: `deeptoolkit.evaluation`\n\n- Model evaluation resources, including visualization of model training metrics over time.\n\n### Computer Vision: `deeptoolkit.vision`\n\n - A pre-built facial detection model: `deeptoolkit.vision.FacialDetector`. A large number of modern \n computer vision algorithms include a facial detection component, and DeepToolKit's facial detection module\n provides fast and accurate face detection using OpenCV's DNN implementation. To use it, simply execute the \n following: \n \n ```python\nimport cv2\nfrom deeptoolkit.vision import FacialDetector\n\n# Initialize detector.\ndetector = FacialDetector()\n\n# Detect face from image path and save image to path.\ndetector.detect_face('image/path', save = 'image/save/path')\n\n# Detect face from existing image and continue to use it.\nimage = cv2.imread('image/path')\nannotated_image = detector.detect_face(image)\n```\n\n![Facial Detection Cartoon](examples/vision-example-image.png)\n\n## License\n\nAll code in this repository is licensed under the [MIT License](https://github.com/amogh7joshi/deeptoolkit/blob/master/LICENSE).\n\n## Issue Reporting \n\nIf you notice any issues or bugs in the library, please create an issue under the issues tab. To get started \nand for more information, see the [issue templates](https://github.com/amogh7joshi/deeptoolkit/tree/master/.github/ISSUE_TEMPLATE).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famogh7joshi%2Fdeeptoolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famogh7joshi%2Fdeeptoolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famogh7joshi%2Fdeeptoolkit/lists"}