Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
VanshKachhwal committed Aug 15, 2021
2 parents a1aec1a + cf6bb3c commit 28e1d10
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# ILib
# ILib
This repository contains the development code for the ILib package

## Package installation:
1. Open the command prompt
2. Run `pip install git+https://github.com/VanshKachhwal/ILib` in the cmd prompt

## Various Functions:
* **To Remove Background:**

Copy the path where the photos are present (Only photos must be present in the respective folder) - `input_path` ; specify where you want the images with background removed to get stored - `output_path` ; the background color to set in form of color_channels eg. - `(255,255,255)`, `model` type 0 or 1 - 0 is general, 1 is landscape (faster) ; `threshold` (between 0 and 1) to define the degree of accurate background cuts (more the threshold more will be the time taken) and then execute the following code -
```python
from ILib.BackgroundModule import remove_background
remove_background(r'input_path', r'output_path', color_channels, model, threshold)
##default :- color_channels - (255,255,255), model - 0, threshold - 0.1
```
* **To Auto-Align Images:**

Copy the path where the photos are present (Only photos must be present in the respective folder) - `input_path` ; specify where you want the images with background removed to get stored - `output_path` ; `min_face_detection_confidence` ; `min_pose_detection_confidence` and then execute the following code -
```python
from ILib.AutoAlignerModule import auto_align
auto_align(r'input_path', r'output_path', min_face_detection_confidence, min_pose_detection_confidence)
##default :- min_face_detection_confidence - 0.5, min_pose_detection_confidence - 0,5
```
* **To Create Collage:**

Copy the path where the photos are present (Only photos must be present in the respective folder) - `input_path` ; specify the final collage `file_name` with the required extension ; `width` ; `height` and then execute the following code -
```python
from ILib.CollageModule import make_collage
make_collage(r'input_path', 'file_name', width, height)
```


4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
author = 'Vansh Kachhwal',
author_email = '[email protected]',
url = 'https://github.com/VanshKachhwal',
download_url = 'https://github.com/user/reponame/archive/v_01.tar.gz',
download_url = 'https://github.com/VanshKachhwal/ILib/archive/refs/tags/0.3.tar.gz',
keywords = ['PoseDetector', 'AutoAligner', 'BackgroundRemover', 'MosaicMaker', 'CollageMaker'], # Keywords that define your package best
install_requires=[
'opencv-contrib-python',
Expand All @@ -22,4 +22,4 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)
)

0 comments on commit 28e1d10

Please sign in to comment.