Skip to main content

NaMAZU: Pretty Usefull Library

Project description

Libray including many(not yet) utilities

PyPI - Python Version PyPI version pl st numpy sklearn


NaMAZU

Lightning API

PyTorch PL

They are all written in PyTorch and following best practice to be used with pytorch lightning. They are all GPU enabled controlled by Lightning API.

import pytorch_lightning as pl
from NaMAZU import KNN

class YourLitModule(pl.LightningModule):
    def __init__(self,*args, **kwargs):
        ...
        self.encoder = SomeEncoder()
        self.head_classifier = KNN(
            n_neighbors=5, 
            distance_measure="cosine", 
            training_data=some_known_data
        )
        self.estimator = GMM(5, 10)

    def training_step(self, batch):
        x, t = batch
        y = self.encoder(x)
        neighbors = self.head_classifier(y)
        probability = self.estimator(y)

Statistical Model

  • KNN: Available with euqlidean, manhattan, cosine and mahalanobis distance.
  • NBC: GPU enabled naive bayes classifier.
  • GMM: Gaussian Mixture probabability estimator. Of course GPU enabled.

Deep Learning

  • LitU2Net: LightningModule U2Net. Trainable and ready for prediction.
  • AniNet: LightningModule image classifier pretrained for japanese animations.
  • PredictionAssistant: Coming soon.

Functional API

NumPy FFmpeg OpenCV

You can use below functions via

import NaMAZU.functional as F

F.change_frame_rates_in("./test_data.mp4",fps=5)

image_control

  • npy_to_img
  • img_to_npy
  • split_image
  • compose_two_png
  • apply_to_all
  • change_frame_rates_in
  • save_all_frames

file_control

  • rename_file
  • collect_file_pathes_by_ext
  • zip_files

Coming

  1. st_integration. Usuful snipets and fast deoployment of LitModule to streamlit. (clf_template)

TODO

Debug AniNet

  1. Video Recognition Model
  2. Feature Learning
  3. Few-shot Learning
  4. Audio-Visual Multimodal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

NaMAZU-0.0.20-py3-none-any.whl (76.4 kB view hashes)

Uploaded Python 3

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