Skip to content

Commit

Permalink
Merge pull request #23 from xica369/feature/dynamic_path
Browse files Browse the repository at this point in the history
[fix] add dynamic path
  • Loading branch information
divait authored Oct 6, 2020
2 parents c1c770e + d9b5103 commit b3729e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The first step to make this example work is gather the objects as segmented imag
and unzip in a folder call `raw_data/` inside `examples/`.
2. Run all the blocks of the `crop_image_from_mask.ipynb` notebook.
3. Check all images were created and are in the folder `examples/data/objects/` divide in 10 categories.
4. Download [some textures](http://textures.forrest.cz/) and place them in `examples/data/background/`.
4. Download [some textures](http://textures.forrest.cz/) and place them in `examples/data/backgrounds/`.

![Object](https://github.com/linkedai/flip/blob/master/docs/images/object.png)

Expand Down Expand Up @@ -79,7 +79,7 @@ el = tr.Element(image=..., objects=...)
To try the `data_generator.py` run:

```batch
python3 example/data_generator.py
python3 examples/data_generator.py
```

![Object](https://github.com/linkedai/flip/blob/master/docs/images/generated.jpg)
Expand Down
13 changes: 12 additions & 1 deletion flip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
flip
"""
from . import transformers, utils
import os

APP_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

about = {}
with open('flip/__about__.py') as fp:
with open(f'{APP_ROOT}/flip/__about__.py') as fp:
exec(fp.read(), about)

__version__ = about['__version__']
__title__ = about['__title__']
__package_name__ = about['__package_name__']
__description__ = about['__description__']
__email__ = about['__email__']
__author__ = about['__author__']
__github__ = about['__github__']
__pypi__ = about['__pypi__']
__license__ = about['__license__']

0 comments on commit b3729e3

Please sign in to comment.