Skip to content

Commit

Permalink
ready for v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
acl21 committed Dec 31, 2021
1 parent 6b05642 commit 3bc9897
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 21 deletions.
11 changes: 10 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/).

<div align="center">
<img src="imgs/ibs_demo2.jpg" alt="Partial Labels Example" />
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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.

<div align="center">
<img src="img/ibs_demo.jpg" alt="Overview" width="650" height="1200"/>
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions image_bbox_slicer/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions image_bbox_slicer/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions image_bbox_slicer/resizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
4 changes: 2 additions & 2 deletions image_bbox_slicer/slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
20 changes: 13 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
],
)

0 comments on commit 3bc9897

Please sign in to comment.