-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/merger' into develop
- Loading branch information
Showing
15 changed files
with
748 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## Create And Configure `Resizer` Object | ||
_Note: This usage demo can be found in `Resizing_Demo.ipynb` in the project's [repo](https://github.com/acl21/image_bbox_slicer)._ | ||
|
||
### Setting Paths To Source And Destination Directories | ||
You must configure paths to source and destination directories like the following. | ||
By default it takes the current working directory as the source folder for both images and annotations and also creates new folders: | ||
|
||
* `/resized_images` and | ||
* `/resized_annotation` | ||
|
||
in the current working directory. | ||
|
||
```python | ||
import image_bbox_slicer as ibs | ||
|
||
im_src = './src/images' | ||
an_src = './src/annotations' | ||
im_dst = './dst/images' | ||
an_dst = './dst/annotations' | ||
|
||
resizer = ibs.Resizer() | ||
resizer.config_dirs(img_src=im_src, ann_src=an_src, | ||
img_dst=im_dst, ann_dst=an_dst) | ||
``` | ||
|
||
### Images and Bounding Box Annotations Simultaneously | ||
|
||
** By Specific Size ** | ||
|
||
|
||
```python | ||
resizer.resize_by_size(new_size=(500,200)) | ||
resizer.visualize_resized_random() | ||
``` | ||
|
||
|
||
 | ||
|
||
|
||
 | ||
|
||
|
||
** By A Resize Factor ** | ||
|
||
|
||
```python | ||
resizer.resize_by_factor(resize_factor=0.05) | ||
resizer.visualize_resized_random() | ||
``` | ||
|
||
 | ||
|
||
|
||
 | ||
|
||
_Note:_ | ||
*`visualize_resized_random()` randomly picks a recently resized image from the destination directory for plotting.* | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.