diff --git a/README.md b/README.md index 8a5692a..f08d8b2 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/setup.py b/setup.py index d36bddd..5bd0c1a 100644 --- a/setup.py +++ b/setup.py @@ -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(), diff --git a/torchlm/__init__.py b/torchlm/__init__.py index d5bed03..249201d 100644 --- a/torchlm/__init__.py +++ b/torchlm/__init__.py @@ -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 *