- Added exception in
mltu.dataProvider.DataProviderto 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
RandomElasticTransforminmltu.augmentorsto handle elastic transformation not to exceed image boundaries - Modified
YoloPreprocessorinmltu.torch.yolo.preprocessorsto output dictionary with np.arrays istead of lists
- Added
RandomElasticTransformtomltu.augmentorsto work withImageobjects - Added
xyxy_abstomltu.annotations.detections.Detectionobject to return absolute bounding boxes
- Changed
ImageShowCV2transformer inmltu.transformersto 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_infolocal variable inmltu.torch.model.Modelobject
- Added
RandomColorModeandRandomZoomintomltu.augmentors
- Fixed many minor bugs
- Added
mltu.transformers.ImageNormalizerto normalize and transpose images - Added
mltu.torch.yolo.annotation.VOCAnnotationReaderto read VOC annotation files - Added
mltu.torch.yolo.preprocessors.YoloPreprocessorto 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.RandomRotateto work withDetectionsobjects - Changed to use
importlibto importlibrosainmltu.preprocessorsto avoid import errors - Changed
mltu.torch.model.Modelobject to provide more flexibility in training and validation - Improved
mltu.torch.callbacksto provide more flexibility in training and validation
- Added
mltu.torch.detectionmodule, that containsDetectionsandDetectionobjects, to handle detection annotations - Added
RandomDropBlockandRandomDropBlockaugmentors intomltu.augmentorsto work withDetectionsobjects - Added
ModelEMAintomltu.torch.modelto work with EMA (Exponential Moving Average) model - Added
FpsWrapperintomltu.inferenceModelto automatically calculate FPS (Frames Per Second) when using inference model - Added
mltu.torch.yolo.detector.BaseDetectoras a base class for preprocessing and postprocessing detection models - Added
mltu.torch.yolo.detector.onnx_detector.Detectoras a class to handle YoloV8 onnx model detection inference - Added
mltu.torch.yolo.detector.torch_detector.Detectoras a class to handle YoloV8 torch model detection inference - Added
mltu.torch.yolo.loss.v8DetectionLossas a class to handle YoloV8 detection loss in training - Added
mltu.torch.yolo.metrics.YoloMetricsas a class to handle YoloV8 detection metrics in training and validation - Added
mltu.torch.yolo.optimizermodule, that containsAccumulativeOptimizerobject andbuild_optimizerfunction, to handle YoloV8 detection optimizer in training - Added YoloV8 Detection tutorial in
Tutorials.11_yolov8that shows how to do basic inference with torch and exported onnx models
- Fixed
setup.pyto includemltu.torchandmltu.tensorflowpackages and other packages that are required formltuto work properly
- Fixed bug in
mltu.torch.dataProvider.SequenceHandler, to handlelen sequence < queue_sizecase
- Fixed dependencies with
librosalibrary
- Fixed dependencies with
librosalibrary
- Improoved
mltu.torch.dataProvider.DataProviderto hanglemultiprocessingwhen it doesn't work to switch tomultithreading
- Removed
Librosalibrary dependency in requirements, now it is optional and required only with modules that use librosa
- Created
Tutorials.05_sound_to_text.train_no_limit.pythat demonstrates how to train audio recognition model withmltuwithout audio length limit
- Included
self._executoras generator inmltu.dataProvider.DataProviderobject, to enable functionality to modify batch preprocessing without changing original code - Introduced changes in
mltu.torch.dataProvider.pyto handle data in multiprocessing and multithreading modes, for faster preprocessing while torch models - Modified
mltu.transformers.AudioPaddingobject, 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.SpectrogramPaddingobject, to pad spectrogram end with zeros instead of start
- Created
Tutorials/09_translation_transformertutorial, that shows how to train translation transformer model - Created
mltu.tensorflow.tokenizersmodule, that containsCustomTokenizerfor text data - Created
mltu.tensorflow.transformer.attentionmodule, that containsBaseAttention,CrossAttention,GlobalSelfAttentionandCausalSelfAttentionlayers - Created
mltu.tensorflow.transformer.layersmodule, that containspositional_encodingfunction,PositionalEmbedding,FeedForward,EncoderLayer,DecoderLayer,Encoder,Decoderlayers andTransformermodel - Created
mltu.tensorflow.transformer.callbacksmodule, that containsEncDecSplitCallbackcallback, to split Transformer model into separate encoder and decoder models - Created
mltu.tensorflow.transformer.utilsmodule, that containsMaskedLossloss andMaskedAccuracymetric, used for training Transformer models
- Fixed bug in
mltu.dataProvider.DataProviderto work withbatch_postprocessors.
- Included
augment_annotationbool option to allmltu.augmentorsto be able to choose whether to augment annotation or not - Changed
mltu.augmentors.RandomRotateto have@staticmethodofrotate_imageto be able to use it without creating object
- Added
batch_postprocessoroption tomltu.dataProvider.DataProviderto be able to postprocess batch after augmentation
- Removed because of bad build
- Moved
onnxandtf2onnximport insidemltu.tensorflow.callbacks.Model2onnxto avoid import errors when not using this callback - Removed
onnxandtf2onnxinstall requirements from global requirements
- Added
RandomMirrorandRandomFlipaugmentors intomltu.augmentors - Added
u2netsegmentation model intomltu.tensorflow.models
- Downgrade
tf2onnxandonnxversions, they don't work with newest TensorFlow version
- Updated
BaseModelConfigsinmltu.configs.pyto include instance_attributes - Some minor changes
- Fixed styling, changed all string from single quotes to double quotes, corrected comments, etc.
- Added
CVImageandPillowImageobjects inmltu.annotations.imageto handle image annotations
- Added
RandomSaltAndPepperaugmentor intomltu.augmentors
- Added
SelfAttentionlayer intomltu.tensorflow.layersto use with Conv2D layers (need more testings).
- Fixed bug in
mltu.dataProvider.DataProviderobject to work withoutdata_preprocessorswhen feeding loaded data in memory
- Added
RandomGaussianBluraugmentor intomltu.augmentors
- Fix
ImageReaderto work either with image path ornp.ndarray - Added
metadatasupport tocallbacks/tf2onnxwhen converting to onnx format
- Changed
mltu.augmentorsto work only withImageobjects
- Created
Imageobject inmltu.annotations.imageto handle image annotations
- changes
OnnxInferenceModelinmltu.torch.inferenceModelsto load custom metadata from saved ONNX model - improved
mltu.dataProviderto 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.lossesthat can be used for training CTC based models - added
Model2onnxandTensorboardcallbacks tomltu.torch.callbacks, used to create PyTorch callbacks, that may be used in training and validation - added
CERMetricandWERMetrictomltu.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.torchto 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_tutorialtutorial
- detaching TensorFlow from mltu, now mltu is only a collection of utilities for training machine learning models
- added 06_pytorch_introduction tutorial
- added
mltu.tensorflowandmltu.torchinto built package
- added 05_sound_to_text tutorial
- added
WavReadertomltu/preprocessors, used to read wav files and convert them to numpy arrays
- added
mltu.utilsinto built package
- seperated
CWERMetrictoCERandWERMetrics 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.Augmentorandmltu.transformers.base.Transformerrespectively - updated ImageShowCV2 transformer documentation
- fixed OnnxInferenceModel in
mltu.inferenceModelsto 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