Skip to content

Commit e9f0460

Browse files
authored
Merge pull request #8 from DefTruth/dev
Dev
2 parents a2b1993 + c65d690 commit e9f0460

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@
2727
* albumentations>=1.1.0
2828

2929
### Installation
30-
you can install **torchlm** directly from pip.
30+
you can install **torchlm** directly from [pypi](https://pypi.org/project/torchlm/).
3131
```shell
3232
pip3 install torchlm
3333
# install from specific pypi mirrors use '-i'
3434
pip3 install torchlm -i https://pypi.org/simple/
3535
```
36+
or install from source.
37+
```shell
38+
# clone torchlm repository locally
39+
git clone --depth=1 https://github.com/DefTruth/torchlm.git
40+
cd torchlm
41+
# install in editable mode
42+
pip install -e .
43+
```
3644

3745
### Data Augmentation
3846
**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
176184
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.
177185

178186

179-
* Supported Transforms Sets, see [transforms.md](docs/api/transfroms.md). A detail example can be found at [test/transforms.py](test/transforms.py).
187+
* 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).
180188

181189
### Training(TODO)
182190
* [ ] YOLOX

setup.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
import setuptools
2+
from pathlib import Path
23

3-
with open("README.md", "r") as fh:
4-
long_description = fh.read()
4+
PATH_ROOT = Path(__file__).parent.resolve()
5+
6+
7+
def get_long_description():
8+
# Get the long description from the README file
9+
description = (PATH_ROOT / "README.md").read_text(encoding="utf-8")
10+
# replace relative repository path to absolute link to the release
11+
static_url = f"https://github.com/DefTruth/torchlm/blob/main/"
12+
description = description.replace("docs/res/", f"{static_url}/docs/res/")
13+
return description
514

615
setuptools.setup(
716
name="torchlm",
8-
version="0.1.0",
17+
version="0.1.1",
918
author="DefTruth",
1019
author_email="qyjdef@163.com",
1120
description="A PyTorch landmarks-only library with 100+ data augmentations, training and inference.",
12-
long_description=long_description,
21+
long_description=get_long_description(),
1322
long_description_content_type="text/markdown",
1423
url="https://github.com/DefTruth/torchlm",
1524
packages=setuptools.find_packages(),

torchlm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Versions
2-
__version__ = '0.1.0'
2+
__version__ = '0.1.1'
33
# Transforms Module: 100+ transforms available, can bind torchvision and
44
# albumentations into torchlm pipeline with autodtype wrapper.
55
from .transfroms import *

0 commit comments

Comments
 (0)