NaMAZU: Pretty Usefull Library
Project description
NaMAZU
Lightning API
They are all written in PyTorch following best practice to be used with pytorch lightning. They are all GPU enabled controlled by Lightning API. You will never need to call to("cuda")
to use the model on any device even with multi-GPU training!
import pytorch_lightning as pl
from NaMAZU import KNN, GMM
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)
y_hat = self.head_classifier(y)
probability = self.estimator.predict_proba(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
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_mask_to
- apply_to_all
- change_frame_rates_in
- save_all_frames
file_control
- rename_file
- collect_file_pathes_by_ext
- zip_files
Coming
-
st_integration. Usuful snipets and fast deoployment of LitModule to streamlit. (clf_template)
-
Video Recognition Model
-
Feature Learning
-
Few-shot Learning
-
Audio-Visual Multimodal
TODO
Test U2Net
Project details
Release history Release notifications | RSS feed
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.31-py3-none-any.whl
(77.2 kB
view hashes)