diff --git a/HISTORY.md b/HISTORY.md index 5370ee0..4fb81e4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,13 @@ -### 0.1.6 (04/23/2019) +### 0.4 (12/31/2021) +* Split `main.py` into `slicer.py` and `resizer.py` +* Changed the demos and docs accordingly +* Code meets `pycodestyle` standards +* Changed the title + +### 0.3 (05/14/2021) +* Works seamlessly on Windows now + +### 0.2 (04/23/2019) * Fixed some bugs. ### 0.1.5 (04/23/2019) diff --git a/README.md b/README.md index 83958d8..24b21a4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![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 and Bounding Box Slicer-Resizer (image_bbox_slicer) -This easy-to-use library is a data transformer sometimes useful in Object Detection tasks. It splits images and their bounding box annotations into tiles, both into specific sizes and into any arbitrary number of equal parts. It can also resize them, both by specific sizes and by a resizing/scaling factor. Of course it goes without saying that just image slicing could in Segmentation tasks (where input and labels both are images). Read the docs [here](https://image-bbox-slicer.readthedocs.io/en/latest/). +This easy-to-use library is a data transformer sometimes useful in Object Detection and Segmentation tasks. With only a few lines of code, one can slice images and their bounding box annotations into smaller tiles, both into specific sizes and into any arbitrary number of equal parts. The tool also supports resizing of images and their bounding box annotations, both by specific sizes and by a resizing/scaling factor. Read the docs [here](https://image-bbox-slicer.readthedocs.io/en/latest/).
Partial Labels Example @@ -11,10 +11,10 @@ Currently, this library only supports bounding box annotations in [PASCAL VOC](h ## Installation ```python -$ pip install image_bbox_slicer +pip install image_bbox_slicer ``` -This tool was tested on both Windows and Linx. Works well with Python 3.8. +This tool was tested on both Windows and Linx. Works well with Python 3.4 and higher versions and requires: ```python Pillow numpy diff --git a/docs/index.md b/docs/index.md index 95f8955..b360d71 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ -# Image and Box Annotation Slicer-Resizer +# Image and Bounding Box Slicer-Resizer -This easy-to-use library is a data transformer sometimes useful in Object Detection tasks. It splits images and its bounding box annotations into tiles, both into specific sizes and into any arbitrary number of equal parts. It can also resize them, both by specific sizes and by a resizing/scaling factor. +This easy-to-use library is a data transformer sometimes useful in Object Detection and Segmentation tasks. With only a few lines of code, one can slice images and their bounding box annotations into smaller tiles, both into specific sizes and into any arbitrary number of equal parts. The tool also supports resizing of images and their bounding box annotations, both by specific sizes and by a resizing/scaling factor. Click `Next` to see a quick demo.
Overview @@ -10,10 +10,10 @@ Currently, this library only supports bounding box annotations in [PASCAL VOC](h ## Installation ```python -$ pip install image_bbox_slicer +pip install image_bbox_slicer ``` -Our tool was tested on both Windows and Linux. Works with Python 3.4 and higher versions and requires: +This tool was tested on both Windows and Linx. Works well with Python 3.4 and higher versions and requires. ``` Pillow numpy diff --git a/image_bbox_slicer/__init__.py b/image_bbox_slicer/__init__.py index b6a5c09..20de765 100644 --- a/image_bbox_slicer/__init__.py +++ b/image_bbox_slicer/__init__.py @@ -1,7 +1,7 @@ ''' -Image Bounding Box Slicer-Resizer +Image and Bounding Box Slicer-Resizer ~~~~~~~~~~~~ -Slice up or Resize images and their bounding boxes. +Slice up or Resize images and their bounding boxes. Basic usage instructions are available at Slicing_Demo.ipynb and Resizing_Demo.ipynb :copyright: (c) 2019 Akshay L Chandra, Vineeth N Balasubramanian diff --git a/image_bbox_slicer/helpers.py b/image_bbox_slicer/helpers.py index 41f354a..45c4893 100644 --- a/image_bbox_slicer/helpers.py +++ b/image_bbox_slicer/helpers.py @@ -19,6 +19,7 @@ # Source: Sam Dobson # https://github.com/samdobson/image_slicer + def calc_columns_rows(n): """Calculates the number of columns and rows required to divide an image into equal parts. diff --git a/image_bbox_slicer/resizer.py b/image_bbox_slicer/resizer.py index bbe168f..5d04e7f 100644 --- a/image_bbox_slicer/resizer.py +++ b/image_bbox_slicer/resizer.py @@ -78,8 +78,8 @@ def config_dirs(self, img_src, ann_src, self.ANN_DST = ann_dst def config_image_dirs(self, img_src, img_dst=os.path.join(os.getcwd(), 'resized_images')): - """Configures paths to source and destination directories after validating them. - Suitable when doing only image resizing. + """Configures paths to source and destination directories after validating them. + Suitable when doing only image resizing. Parameters ---------- diff --git a/image_bbox_slicer/slicer.py b/image_bbox_slicer/slicer.py index abc4763..3cb43b8 100644 --- a/image_bbox_slicer/slicer.py +++ b/image_bbox_slicer/slicer.py @@ -95,8 +95,8 @@ def config_dirs(self, img_src, ann_src, self.ANN_DST = ann_dst def config_image_dirs(self, img_src, img_dst=os.path.join(os.getcwd(), 'sliced_images')): - """Configures paths to source and destination directories after validating them. - Suitable when doing only image slicing. + """Configures paths to source and destination directories after validating them. + Suitable when doing only image slicing. Parameters ---------- diff --git a/setup.py b/setup.py index 0596216..8250bd4 100644 --- a/setup.py +++ b/setup.py @@ -2,18 +2,19 @@ setup( name='image_bbox_slicer', packages=['image_bbox_slicer'], - version='0.3', + version='0.4', license='MIT', - long_description='This easy-to-use library is a data transformer useful in Object Detection and Segmentation tasks. \ - It splits images and their bounding box annotations into tiles, both into specific sizes and into any \ - arbitrary number of equal parts. It can also resize them, both by specific sizes and by a \ - resizing/scaling factor. \n\nRead the docs at https://image-bbox-slicer.readthedocs.io/en/latest/.', + long_description='This easy-to-use library is a data transformer sometimes useful in Object Detection \ + and Segmentation tasks. With only a few lines of code, one can slice images and their bounding box annotations \ + into smaller tiles, both into specific sizes and into any arbitrary number of equal parts. \ + The tool also supports resizing of images and their bounding box annotations, both by specific sizes \ + and by a resizing/scaling factor.\n\nRead the docs at https://image-bbox-slicer.readthedocs.io/en/latest/.', author='Akshay L Chandra', author_email='research@akshaychandra.com', url='https://github.com/acl21/image_bbox_slicer/', - download_url='https://github.com/acl21/image_bbox_slicer/archive/refs/tags/v0.3.tar.gz', + download_url='https://github.com/acl21/image_bbox_slicer/archive/refs/tags/v0.4.tar.gz', keywords=['Image Slicer', 'Bounding Box Annotations Slicer', 'Slicer', 'PASCAL VOC Slicer', 'Object Detection', - 'Resize Images', 'Resize Bounding Box Annotations'], + 'Resize Images', 'Resize Bounding Box Annotations', 'Segmentation'], install_requires=[ 'Pillow', 'numpy', @@ -23,9 +24,14 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', + 'Intended Audience :: Deep Learning Engineers', + 'Intended Audience :: Machine Learning Engineers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ], )