From dd53dfdae69542b387b74b3627aecf265dfafd9f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 6 Apr 2019 21:09:33 +0530 Subject: [PATCH] for release 0.1.3 --- HISTORY.md | 9 ++++ README.md | 2 +- docs/DESC.md | 114 --------------------------------------------------- setup.py | 6 +-- 4 files changed, 13 insertions(+), 118 deletions(-) delete mode 100644 docs/DESC.md diff --git a/HISTORY.md b/HISTORY.md index f289452..9bac46d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,2 +1,11 @@ +### 0.1.3 (04/06/2019) +* More PyPi issues fixed + +### 0.1.2 (04/06/2019) +* PyPi issues fixed + +### 0.1.1 (04/06/2019) +* No useful changes + ### 0.1.0 (04/06/2019) * Initial release. diff --git a/README.md b/README.md index e8fb8cc..ea4830a 100644 --- a/README.md +++ b/README.md @@ -131,4 +131,4 @@ slicer.slice_bboxes_by_number(number_tiles=4) #### By Specifc Size ```python slicer.slice_bboxes_by_size(tile_size=(418,279), tile_overlap=0) -``` \ No newline at end of file +``` diff --git a/docs/DESC.md b/docs/DESC.md deleted file mode 100644 index 6833037..0000000 --- a/docs/DESC.md +++ /dev/null @@ -1,114 +0,0 @@ -[![PyPI version](https://badge.fury.io/py/image-bbox-slicer.svg)](https://badge.fury.io/py/image-bbox-slicer) [![](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE) -# image_bbox_slicer - -This easy-to-use library splits images and its bounding box annotations into tiles, both into specific sizes and into any arbitrary number of equal parts. Read the docs [here](https://image-bbox-slicer.readthedocs.io/en/latest/). - -Currently, this library only supports bounding box annotations in [PASCAL VOC](http://host.robots.ox.ac.uk/pascal/VOC/) format. And as of now, there is **no command line execution support**. - -## Installation -```python -$ pip install image_bbox_slicer -``` - -Works with Python 3.4 and higher versions and requires: -```python -Pillow==5.4.1 -numpy==1.16.2 -pascal-voc-writer==0.1.4 -matplotlib==3.0.3 -``` - -## A Quick Demo - -```python -import image_bbox_slicer as ibs -``` - -### Create And Configure `Slicer` Object - -#### Setting Paths To Source And Destination Directories. -You must configure paths to source and destination directories like the following. - -```python -im_src = './src/images' -an_src = './src/annotations' -im_dst = './dst/images' -an_dst = './dst/annotations' - -slicer = ibs.Slicer() -slicer.config_dirs(img_src=im_src, ann_src=an_src, - img_dst=im_dst, ann_dst=an_dst) -``` - -#### Dealing With Partial Labels -
-Partial Labels Example -
- -The above images show the difference in slicing with and without partial labels. In the image on the left, all the box annotations masked in **green** are called Partial Labels. Configure your slicer to either ignore or consider them by setting `Slicer` object's `keep_partial_labels` instance variable to `True` or `False` respectively. By default it is set to `False`. - - -```python -slicer.keep_partial_labels = True -``` - -#### Before-After Mapping - -You can choose to store the mapping between file names of the images before and after slicing by setting the `Slicer` object's `save_before_after_map` instance variable to `True`. By default it is set to `False`. - -Typically, `mapper.csv` looks like the following: -``` -| old_name | new_names | -|------------|---------------------------------| -| 2102 | 000001, 000002, 000003, 000004 | -| 3931 | 000005, 000005, 000007, 000008 | -| test_image | 000009, 000010, 000011, 000012 | -| ... | ... | -``` - - -```python -slicer.save_before_after_map = True -``` - -### Slicing - -#### Images and Bounding Box Annotations Simultaneously - -#### By Number Of Tiles - - -```python -slicer.slice_by_number(number_tiles=4) -``` - -#### By Specific Size - -```python -slicer.slice_by_size(tile_size=(418,279), tile_overlap=0) -``` - -### Other Slicing Functions - -#### Slicing Only Images - -#### By Number Of Tiles -```python -slicer.slice_images_by_number(number_tiles=4) -``` - -#### By Specific Size -```python -slicer.slice_images_by_size(tile_size=(418,279), tile_overlap=0) -``` - -#### Slicing Only Bounding Box Annotations -#### By Number Of Tiles -```python -slicer.slice_bboxes_by_number(number_tiles=4) -``` - -#### By Specifc Size -```python -slicer.slice_bboxes_by_size(tile_size=(418,279), tile_overlap=0) -``` diff --git a/setup.py b/setup.py index 1bfd4f2..ce44656 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,13 @@ setup( name = 'image_bbox_slicer', packages = ['image_bbox_slicer'], - version = '0.1.2', + version = '0.1.3', license='MIT', - long_description = open('docs/DESC.md').read() + '\n\n' + open('HISTORY.md').read(), + long_description = 'This easy-to-use library splits images and its bounding box annotations into tiles, both into specific sizes and into any arbitrary number of equal parts. Read the docs at https://image-bbox-slicer.readthedocs.io/en/latest/.', author = 'AKSHAY CHANDRA LAGANDULA', author_email = 'akshaychandra111@gmail.com', url = 'https://github.com/akshaychandra21/image_bbox_slicer/', - download_url = 'https://github.com/akshaychandra21/image_bbox_slicer/archive/v0.1.2.tar.gz', + download_url = 'https://github.com/akshaychandra21/image_bbox_slicer/archive/v0.1.3.tar.gz', keywords = ['IMAGE SLICER', 'BOUNDING BOX SLICER', 'SLICER', 'PASCAL VOC SLICER', 'OBJECT DETECTION'], install_requires=[ 'Pillow',