Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Stable Diffusion Webui | 122,409 | 11 hours ago | 2 | January 17, 2022 | 1,903 | agpl-3.0 | Python | |||
Stable Diffusion web UI | ||||||||||
Transformers | 120,685 | 64 | 2,484 | 11 hours ago | 125 | November 15, 2023 | 1,012 | apache-2.0 | Python | |
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX. | ||||||||||
Pytorch | 75,644 | 3,341 | 8,272 | 10 hours ago | 39 | November 15, 2023 | 13,543 | other | Python | |
Tensors and Dynamic neural networks in Python with strong GPU acceleration | ||||||||||
Keras | 60,481 | 697 | 12 hours ago | 87 | December 06, 2023 | 183 | apache-2.0 | Python | ||
Deep Learning for humans | ||||||||||
Real Time Voice Cloning | 49,920 | a month ago | 187 | other | Python | |||||
Clone a voice in 5 seconds to generate arbitrary speech in real-time | ||||||||||
Yolov5 | 45,238 | 2 | 2 days ago | 3 | June 08, 2022 | 150 | agpl-3.0 | Python | ||
YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite | ||||||||||
Annotated_deep_learning_paper_implementations | 43,477 | 2 | 5 days ago | 79 | November 05, 2023 | 37 | mit | Jupyter Notebook | ||
🧑🏫 60 Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠 | ||||||||||
Made With Ml | 34,965 | 3 months ago | 5 | May 15, 2019 | 6 | mit | Jupyter Notebook | |||
Learn how to design, develop, deploy and iterate on production-grade ML applications. | ||||||||||
Gfpgan | 33,847 | 9 | a month ago | 11 | September 20, 2022 | 305 | other | Python | ||
GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration. | ||||||||||
Deepspeed | 31,486 | 87 | 12 hours ago | 79 | December 01, 2023 | 954 | apache-2.0 | Python | ||
DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective. |
State-of-the-art Deep Learning library for Time Series and Sequences.
tsai
is an open-source deep learning package built on top of Pytorch &
fastai focused on state-of-the-art techniques for time series tasks like
classification, regression, forecasting, imputation
tsai
is currently under active development by timeseriesAI.
During the last few releases, here are some of the most significant
additions to tsai
:
tsai
:
You can install the latest stable version from pip using:
pip install tsai
If you plan to develop tsai yourself, or want to be on the cutting edge, you can use an editable install. First install PyTorch, and then:
git clone https://github.com/timeseriesAI/tsai
pip install -e "tsai[dev]"
Note: starting with tsai 0.3.0 tsai will only install hard dependencies. Other soft dependencies (which are only required for selected tasks) will not be installed by default (this is the recommended approach. If you require any of the dependencies that is not installed, tsai will ask you to install it when necessary). If you still want to install tsai with all its dependencies you can do it by running:
pip install tsai[extras]
You can also install tsai using conda (note that if you replace conda with mamba the install process will be much faster and more reliable):
conda install -c timeseriesai tsai
Heres the link to the documentation.
Heres a list with some of the state-of-the-art models available in
tsai
:
plus other custom models like: TransformerModel, LSTMAttention, GRUAttention,
To get to know the tsai package, wed suggest you start with this notebook in Google Colab: 01_Intro_to_Time_Series_Classification It provides an overview of a time series classification task.
We have also develop many other tutorial notebooks.
To use tsai in your own notebooks, the only thing you need to do after you have installed the package is to run this:
from tsai.all import *
These are just a few examples of how you can use tsai
:
Training:
from tsai.basics import *
X, y, splits = get_classification_data('ECG200', split_data=False)
tfms = [None, TSClassification()]
batch_tfms = TSStandardize()
clf = TSClassifier(X, y, splits=splits, path='models', arch="InceptionTimePlus", tfms=tfms, batch_tfms=batch_tfms, metrics=accuracy, cbs=ShowGraph())
clf.fit_one_cycle(100, 3e-4)
clf.export("clf.pkl")
Inference:
from tsai.inference import load_learner
clf = load_learner("models/clf.pkl")
probas, target, preds = clf.get_X_preds(X[splits[1]], y[splits[1]])
Training:
from tsai.basics import *
X, y, splits = get_classification_data('LSST', split_data=False)
tfms = [None, TSClassification()]
batch_tfms = TSStandardize(by_sample=True)
mv_clf = TSClassifier(X, y, splits=splits, path='models', arch="InceptionTimePlus", tfms=tfms, batch_tfms=batch_tfms, metrics=accuracy, cbs=ShowGraph())
mv_clf.fit_one_cycle(10, 1e-2)
mv_clf.export("mv_clf.pkl")
Inference:
from tsai.inference import load_learner
mv_clf = load_learner("models/mv_clf.pkl")
probas, target, preds = mv_clf.get_X_preds(X[splits[1]], y[splits[1]])
Training:
from tsai.basics import *
X, y, splits = get_regression_data('AppliancesEnergy', split_data=False)
tfms = [None, TSRegression()]
batch_tfms = TSStandardize(by_sample=True)
reg = TSRegressor(X, y, splits=splits, path='models', arch="TSTPlus", tfms=tfms, batch_tfms=batch_tfms, metrics=rmse, cbs=ShowGraph(), verbose=True)
reg.fit_one_cycle(100, 3e-4)
reg.export("reg.pkl")
Inference:
from tsai.inference import load_learner
reg = load_learner("models/reg.pkl")
raw_preds, target, preds = reg.get_X_preds(X[splits[1]], y[splits[1]])
The ROCKETs (RocketClassifier, RocketRegressor, MiniRocketClassifier, MiniRocketRegressor, MiniRocketVotingClassifier or MiniRocketVotingRegressor) are somewhat different models. They are not actually deep learning models (although they use convolutions) and are used in a different way.
Youll also need to install sktime to be able to use them. You can install it separately:
pip install sktime
or use:
pip install tsai[extras]
Training:
from sklearn.metrics import mean_squared_error, make_scorer
from tsai.data.external import get_Monash_regression_data
from tsai.models.MINIROCKET import MiniRocketRegressor
X_train, y_train, *_ = get_Monash_regression_data('AppliancesEnergy')
rmse_scorer = make_scorer(mean_squared_error, greater_is_better=False)
reg = MiniRocketRegressor(scoring=rmse_scorer)
reg.fit(X_train, y_train)
reg.save('MiniRocketRegressor')
Inference:
from sklearn.metrics import mean_squared_error
from tsai.data.external import get_Monash_regression_data
from tsai.models.MINIROCKET import load_minirocket
*_, X_test, y_test = get_Monash_regression_data('AppliancesEnergy')
reg = load_minirocket('MiniRocketRegressor')
y_pred = reg.predict(X_test)
mean_squared_error(y_test, y_pred, squared=False)
You can use tsai for forecast in the following scenarios:
Youll need to: * prepare X (time series input) and the target y (see documentation) * select PatchTST or one of tsais models ending in Plus (TSTPlus, InceptionTimePlus, TSiTPlus, etc). The model will auto-configure a head to yield an output with the same shape as the target input y.
Training:
from tsai.basics import *
ts = get_forecasting_time_series("Sunspots").values
X, y = SlidingWindow(60, horizon=1)(ts)
splits = TimeSplitter(235)(y)
tfms = [None, TSForecasting()]
batch_tfms = TSStandardize()
fcst = TSForecaster(X, y, splits=splits, path='models', tfms=tfms, batch_tfms=batch_tfms, bs=512, arch="TSTPlus", metrics=mae, cbs=ShowGraph())
fcst.fit_one_cycle(50, 1e-3)
fcst.export("fcst.pkl")
Inference:
from tsai.inference import load_learner
fcst = load_learner("models/fcst.pkl", cpu=False)
raw_preds, target, preds = fcst.get_X_preds(X[splits[1]], y[splits[1]])
raw_preds.shape
# torch.Size([235, 1])
This example show how to build a 3-step ahead univariate forecast.
Training:
from tsai.basics import *
ts = get_forecasting_time_series("Sunspots").values
X, y = SlidingWindow(60, horizon=3)(ts)
splits = TimeSplitter(235, fcst_horizon=3)(y)
tfms = [None, TSForecasting()]
batch_tfms = TSStandardize()
fcst = TSForecaster(X, y, splits=splits, path='models', tfms=tfms, batch_tfms=batch_tfms, bs=512, arch="TSTPlus", metrics=mae, cbs=ShowGraph())
fcst.fit_one_cycle(50, 1e-3)
fcst.export("fcst.pkl")
Inference:
from tsai.inference import load_learner
fcst = load_learner("models/fcst.pkl", cpu=False)
raw_preds, target, preds = fcst.get_X_preds(X[splits[1]], y[splits[1]])
raw_preds.shape
# torch.Size([235, 3])
The input format for all time series models and image models in tsai is the same. An np.ndarray (or array-like object like zarr, etc) with 3 dimensions:
[# samples x # variables x sequence length]
The input format for tabular models in tsai (like TabModel, TabTransformer and TabFusionTransformer) is a pandas dataframe. See example.
We welcome contributions of all kinds. Development of enhancements, bug fixes, documentation, tutorial notebooks,
We have created a guide to help you start contributing to tsai. You can read it here.
Want to make the most out of timeseriesAI/tsai in a professional setting? Let us help. Send us an email to learn more: [email protected]
If you use tsai in your research please use the following BibTeX entry:
@Misc{tsai,
author = {Ignacio Oguiza},
title = {tsai - A state-of-the-art deep learning library for time series and sequential data},
howpublished = {Github},
year = {2023},
url = {https://github.com/timeseriesAI/tsai}
}