Skip to content

Commit

Permalink
Merge pull request #8 from DefTruth/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
DefTruth authored Feb 13, 2022
2 parents a2b1993 + c65d690 commit e9f0460
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@
* albumentations>=1.1.0

### Installation
you can install **torchlm** directly from pip.
you can install **torchlm** directly from [pypi](https://pypi.org/project/torchlm/).
```shell
pip3 install torchlm
# install from specific pypi mirrors use '-i'
pip3 install torchlm -i https://pypi.org/simple/
```
or install from source.
```shell
# clone torchlm repository locally
git clone --depth=1 https://github.com/DefTruth/torchlm.git
cd torchlm
# install in editable mode
pip install -e .
```

### Data Augmentation
**torchlm** provides 30+ native data augmentations for landmarks and is compatible with 80+ transforms from torchvision and albumations, 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.
Expand Down Expand Up @@ -176,7 +184,7 @@ LandmarksUnNormalize() Execution Flag: True
But, is ok if your pass a Tensor to a np.ndarray like transform, **torchlm** will automatically be compatible with different data types and then wrap back to the original type through a autodtype wrapper.


* Supported Transforms Sets, see [transforms.md](docs/api/transfroms.md). A detail example can be found at [test/transforms.py](test/transforms.py).
* Supported Transforms Sets, see [transforms.md](https://github.com/DefTruth/torchlm/blob/main/docs/api/transfroms.md). A detail example can be found at [test/transforms.py](https://github.com/DefTruth/torchlm/blob/main/test/transforms.py).

### Training(TODO)
* [ ] YOLOX
Expand Down
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import setuptools
from pathlib import Path

with open("README.md", "r") as fh:
long_description = fh.read()
PATH_ROOT = Path(__file__).parent.resolve()


def get_long_description():
# Get the long description from the README file
description = (PATH_ROOT / "README.md").read_text(encoding="utf-8")
# replace relative repository path to absolute link to the release
static_url = f"https://github.com/DefTruth/torchlm/blob/main/"
description = description.replace("docs/res/", f"{static_url}/docs/res/")
return description

setuptools.setup(
name="torchlm",
version="0.1.0",
version="0.1.1",
author="DefTruth",
author_email="qyjdef@163.com",
description="A PyTorch landmarks-only library with 100+ data augmentations, training and inference.",
long_description=long_description,
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/DefTruth/torchlm",
packages=setuptools.find_packages(),
Expand Down
2 changes: 1 addition & 1 deletion torchlm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Versions
__version__ = '0.1.0'
__version__ = '0.1.1'
# Transforms Module: 100+ transforms available, can bind torchvision and
# albumentations into torchlm pipeline with autodtype wrapper.
from .transfroms import *
Expand Down

0 comments on commit e9f0460

Please sign in to comment.