- Added exception in
mltu.dataProvider.DataProvider
to raise ValueError when dataset is not iterable - Added custom training code for YoloV8 object detector:
Tutorials\11_Yolov8\train_yolov8.py
- Added custom trained inference code for YoloV8 object detector:
Tutorials\11_Yolov8\test_yolov8.py
- Fixed
RandomElasticTransform
inmltu.augmentors
to handle elastic transformation not to exceed image boundaries - Modified
YoloPreprocessor
inmltu.torch.yolo.preprocessors
to output dictionary with np.arrays istead of lists
- Added
RandomElasticTransform
tomltu.augmentors
to work withImage
objects - Added
xyxy_abs
tomltu.annotations.detections.Detection
object to return absolute bounding boxes
- Changed
ImageShowCV2
transformer inmltu.transformers
to display images when running with multiple threads
- Added Tutorial how to run YOLOv8 pretrained Object Detection model
Tutorials.11_Yolov8.README.md
- Bug fixed with
loss_info
local variable inmltu.torch.model.Model
object
- Added
RandomColorMode
andRandomZoom
intomltu.augmentors
- Fixed many minor bugs
- Added
mltu.transformers.ImageNormalizer
to normalize and transpose images - Added
mltu.torch.yolo.annotation.VOCAnnotationReader
to read VOC annotation files - Added
mltu.torch.yolo.preprocessors.YoloPreprocessor
to preprocess images and annotations for YoloV8 detection model
- Creating code to work with Ultralytics YoloV8 Detection model (training and inference)
- Updated previous tutorials to work with the latest mltu changes
- Updated
mltu.augmentors.RandomRotate
to work withDetections
objects - Changed to use
importlib
to importlibrosa
inmltu.preprocessors
to avoid import errors - Changed
mltu.torch.model.Model
object to provide more flexibility in training and validation - Improved
mltu.torch.callbacks
to provide more flexibility in training and validation
- Added
mltu.torch.detection
module, that containsDetections
andDetection
objects, to handle detection annotations - Added
RandomDropBlock
andRandomDropBlock
augmentors intomltu.augmentors
to work withDetections
objects - Added
ModelEMA
intomltu.torch.model
to work with EMA (Exponential Moving Average) model - Added
FpsWrapper
intomltu.inferenceModel
to automatically calculate FPS (Frames Per Second) when using inference model - Added
mltu.torch.yolo.detector.BaseDetector
as a base class for preprocessing and postprocessing detection models - Added
mltu.torch.yolo.detector.onnx_detector.Detector
as a class to handle YoloV8 onnx model detection inference - Added
mltu.torch.yolo.detector.torch_detector.Detector
as a class to handle YoloV8 torch model detection inference - Added
mltu.torch.yolo.loss.v8DetectionLoss
as a class to handle YoloV8 detection loss in training - Added
mltu.torch.yolo.metrics.YoloMetrics
as a class to handle YoloV8 detection metrics in training and validation - Added
mltu.torch.yolo.optimizer
module, that containsAccumulativeOptimizer
object andbuild_optimizer
function, to handle YoloV8 detection optimizer in training - Added YoloV8 Detection tutorial in
Tutorials.11_yolov8
that shows how to do basic inference with torch and exported onnx models
- Fixed
setup.py
to includemltu.torch
andmltu.tensorflow
packages and other packages that are required formltu
to work properly
- Fixed bug in
mltu.torch.dataProvider.SequenceHandler
, to handlelen sequence < queue_size
case
- Fixed dependencies with
librosa
library
- Fixed dependencies with
librosa
library
- Improoved
mltu.torch.dataProvider.DataProvider
to hanglemultiprocessing
when it doesn't work to switch tomultithreading
- Removed
Librosa
library dependency in requirements, now it is optional and required only with modules that use librosa
- Created
Tutorials.05_sound_to_text.train_no_limit.py
that demonstrates how to train audio recognition model withmltu
without audio length limit
- Included
self._executor
as generator inmltu.dataProvider.DataProvider
object, to enable functionality to modify batch preprocessing without changing original code - Introduced changes in
mltu.torch.dataProvider.py
to handle data in multiprocessing and multithreading modes, for faster preprocessing while torch models - Modified
mltu.transformers.AudioPadding
object, to work with batches of raw audio data
- Created tutorial
10_wav2vec2_torch
(Audio to Text model) that shows how to train wav2vec2 model with mltu
- Changed
mltu.transformers.SpectrogramPadding
object, to pad spectrogram end with zeros instead of start
- Created
Tutorials/09_translation_transformer
tutorial, that shows how to train translation transformer model - Created
mltu.tensorflow.tokenizers
module, that containsCustomTokenizer
for text data - Created
mltu.tensorflow.transformer.attention
module, that containsBaseAttention
,CrossAttention
,GlobalSelfAttention
andCausalSelfAttention
layers - Created
mltu.tensorflow.transformer.layers
module, that containspositional_encoding
function,PositionalEmbedding
,FeedForward
,EncoderLayer
,DecoderLayer
,Encoder
,Decoder
layers andTransformer
model - Created
mltu.tensorflow.transformer.callbacks
module, that containsEncDecSplitCallback
callback, to split Transformer model into separate encoder and decoder models - Created
mltu.tensorflow.transformer.utils
module, that containsMaskedLoss
loss andMaskedAccuracy
metric, used for training Transformer models
- Fixed bug in
mltu.dataProvider.DataProvider
to work withbatch_postprocessors
.
- Included
augment_annotation
bool option to allmltu.augmentors
to be able to choose whether to augment annotation or not - Changed
mltu.augmentors.RandomRotate
to have@staticmethod
ofrotate_image
to be able to use it without creating object
- Added
batch_postprocessor
option tomltu.dataProvider.DataProvider
to be able to postprocess batch after augmentation
- Removed because of bad build
- Moved
onnx
andtf2onnx
import insidemltu.tensorflow.callbacks.Model2onnx
to avoid import errors when not using this callback - Removed
onnx
andtf2onnx
install requirements from global requirements
- Added
RandomMirror
andRandomFlip
augmentors intomltu.augmentors
- Added
u2net
segmentation model intomltu.tensorflow.models
- Downgrade
tf2onnx
andonnx
versions, they don't work with newest TensorFlow version
- Updated
BaseModelConfigs
inmltu.configs.py
to include instance_attributes - Some minor changes
- Fixed styling, changed all string from single quotes to double quotes, corrected comments, etc.
- Added
CVImage
andPillowImage
objects inmltu.annotations.image
to handle image annotations
- Added
RandomSaltAndPepper
augmentor intomltu.augmentors
- Added
SelfAttention
layer intomltu.tensorflow.layers
to use with Conv2D layers (need more testings).
- Fixed bug in
mltu.dataProvider.DataProvider
object to work withoutdata_preprocessors
when feeding loaded data in memory
- Added
RandomGaussianBlur
augmentor intomltu.augmentors
- Fix
ImageReader
to work either with image path ornp.ndarray
- Added
metadata
support tocallbacks/tf2onnx
when converting to onnx format
- Changed
mltu.augmentors
to work only withImage
objects
- Created
Image
object inmltu.annotations.image
to handle image annotations
- changes
OnnxInferenceModel
inmltu.torch.inferenceModels
to load custom metadata from saved ONNX model - improved
mltu.dataProvider
to remove bad samples from dataset on epoch end
- added
mltu.torch.losses
, used to create PyTorch losses, that may be used in training and validation - added CTC loss to
mltu.torch.losses
that can be used for training CTC based models - added
Model2onnx
andTensorboard
callbacks tomltu.torch.callbacks
, used to create PyTorch callbacks, that may be used in training and validation - added
CERMetric
andWERMetric
tomltu.torch.metrics
, used to create PyTorch metrics, that may be used in training and validation - created 08 pytorch tutorial, that shows how to use
mltu.torch
to train CTC based models
- In all tutorials removed stow dependency and replaced with os package, to make it easier to use on Windows 11
- added
mltu.torch
, that contains PyTorch utilities for training machine learning models - added
mltu.torch.dataProvider
, used to create PyTorch data loaders for training and validation - added
mltu.torch.models
, used to create PyTorch models, that wrapps whole model pipeline (training, validation, metrics, callbacks, etc.) - added
mltu.torch.callbacks
, used to create PyTorch callbacks, that may be used in training and validation - added
mltu.torch.metrics
, used to create PyTorch metrics, that may be used in training and validation - added
07_pytorch_tutorial
tutorial
- detaching TensorFlow from mltu, now mltu is only a collection of utilities for training machine learning models
- added 06_pytorch_introduction tutorial
- added
mltu.tensorflow
andmltu.torch
into built package
- added 05_sound_to_text tutorial
- added
WavReader
tomltu/preprocessors
, used to read wav files and convert them to numpy arrays
- added
mltu.utils
into built package
- seperated
CWERMetric
toCER
andWER
Metrics inmltu.metrics
, Character/word rate was calculatted in a wrong way - created @setter for augmentors and transformers in DataProvider, to properlly add augmentors and transformers to the pipeline
- augmentors and transformers must inherit from
mltu.augmentors.base.Augmentor
andmltu.transformers.base.Transformer
respectively - updated ImageShowCV2 transformer documentation
- fixed OnnxInferenceModel in
mltu.inferenceModels
to use CPU even if GPU is available with force_cpu=True flag
- added RandomSharpen to mltu.augmentors, used for simple image augmentation;
- added ImageShowCV2 to mltu.transformers, used to show image with cv2 for debugging purposes;
- added better explained documentation
- created unittests for CER and WER in mltu.utils.text_utils and TensorFlow verion of CER and WER mltu.metrics
- added mltu.augmentors (RandomBrightness, RandomRotate, RandomErodeDilate) - used for simple image augmentation;
Initial release of mltu (Machine Learning Training Utilities)
- Project to help with training machine learning models