From 0cf93ebdc34cc1d8b4dc64a1a18cfaf501760aa0 Mon Sep 17 00:00:00 2001 From: DefTruth Date: Sun, 13 Feb 2022 20:32:22 +0800 Subject: [PATCH] fix(setup): update pypi v0.1.0 (#6) --- README.md | 13 +++---------- test/transforms.py | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e8961e6..8a5692a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## 🤗 Introduction -**torchlm** is a PyTorch landmarks-only library with **100+ data augmentations**, **training** and **inference**. **torchlm** is only focus on any landmarks detection, such as face landmarks, hand keypoints and body keypoints, etc. It provides **30+** native data augmentations and compatible with **80+** torchvision and albumations's transforms, no matter the input is a np.ndarray or a torch Tensor, **torchlm** will **automatically** be compatible with different data types through a **autodtype** wrapper. Further, in the future **torchlm** will add modules for **training** and **inference**. +**torchlm** is a PyTorch landmarks-only library with **100+ data augmentations**, **training** and **inference**. **torchlm** is only focus on any landmarks detection, such as face landmarks, hand keypoints and body keypoints, etc. It provides **30+** native data augmentations and compatible with **80+** torchvision and albumations's transforms, no matter the input is a np.ndarray or a torch Tensor, **torchlm** will automatically be compatible with different data types and then wrap back to the original type through a autodtype wrapper. Further, in the future **torchlm** will add modules for **training** and **inference**. # 🆕 What's New @@ -95,7 +95,6 @@ def callable_array_noop( # Do some transform here ... return img.astype(np.uint32), landmarks.astype(np.float32) - def callable_tensor_noop( img: Tensor, landmarks: Tensor @@ -152,31 +151,25 @@ torchlm.set_transforms_debug(True) torchlm.set_transforms_logging(True) torchlm.set_autodtype_logging(True) ``` -Some details logs will show you at each runtime, just like the follows +some detail information will show you at each runtime, the infos might look like ```shell -LandmarksRandomHorizontalFlip() AutoDtype Info: AutoDtypeEnum.Array_InOut -LandmarksRandomHorizontalFlip() Execution Flag: True LandmarksRandomScale() AutoDtype Info: AutoDtypeEnum.Array_InOut LandmarksRandomScale() Execution Flag: False -... BindTorchVisionTransform(GaussianBlur())() AutoDtype Info: AutoDtypeEnum.Tensor_InOut BindTorchVisionTransform(GaussianBlur())() Execution Flag: True -... BindAlbumentationsTransform(ColorJitter())() AutoDtype Info: AutoDtypeEnum.Array_InOut BindAlbumentationsTransform(ColorJitter())() Execution Flag: True -... BindArrayCallable(callable_array_noop())() AutoDtype Info: AutoDtypeEnum.Array_InOut BindArrayCallable(callable_array_noop())() Execution Flag: True BindTensorCallable(callable_tensor_noop())() AutoDtype Info: AutoDtypeEnum.Tensor_InOut BindTensorCallable(callable_tensor_noop())() Execution Flag: True -... LandmarksUnNormalize() AutoDtype Info: AutoDtypeEnum.Array_InOut LandmarksUnNormalize() Execution Flag: True ``` * Execution Flag: True means current transform was executed successful, False means it was not executed because of the random probability or some Runtime Exceptions(torchlm will should the error infos if debug mode is True). * AutoDtype Info: * Array_InOut means current transform need a np.ndnarray as input and then output a np.ndarray. - * Tensor_InOut means current transform need a torch Tensor as input and then output torch Tensor. + * Tensor_InOut means current transform need a torch Tensor as input and then output a torch Tensor. * Array_In means current transform needs a np.ndarray input and then output a torch Tensor. * Tensor_In means current transform needs a torch Tensor input and then output a np.ndarray. diff --git a/test/transforms.py b/test/transforms.py index 14e4e19..006da41 100644 --- a/test/transforms.py +++ b/test/transforms.py @@ -48,7 +48,6 @@ def test_torchlm_transforms(): transform = torchlm.LandmarksCompose([ # use native torchlm transforms - torchlm.LandmarksRandomHorizontalFlip(prob=0.5), torchlm.LandmarksRandomScale(prob=0.5), torchlm.LandmarksRandomTranslate(prob=0.5), torchlm.LandmarksRandomShear(prob=0.5),