GitXplorerGitXplorer
m

portrait-mode

public
33 stars
5 forks
0 issues

Commits

List of commits on branch master.
Verified
f083e3394bc80c53ec2eb96fb90e71f064235201

fixed typo

mmayank26saxena committed 7 years ago
Verified
0fc5c5495f33bb1af99546ef2e5395731fa598f8

Added demo website links

mmayank26saxena committed 7 years ago
Verified
4162b521aaded72eb2cb5ce7523cbdb5c4b2d51f

Update README.md

mmayank26saxena committed 7 years ago
Verified
1cdca56440c5d6f1a98a2b4d880a1447626adc7f

Added third example

mmayank26saxena committed 7 years ago
Unverified
be7457c9ec677e5d7dee447919d9197e3acca3cb

added another sample image

mmayank26saxena committed 7 years ago
Verified
30c77a6f894b1c03992137b509159c1397ba6bec

Added examples

mmayank26saxena committed 7 years ago

README

The README file for this repository.

Portrait Mode

This project implements the portrait mode effect on images using Neural Networks.

How it works?

Traditionally, the portrait mode effect has been achieved using 2 lenses which detect objects present in the foreground and in the background. With advances in the field of ML, this effect can also be implemented using only image segmentation. Using the pretrained DeepLab-v3+ open source model, we can find the objects in the foreground of the image and blur the background to replicate this effect.

Check out the demo website - Demo (Source Code: https://github.com/mudit9/portraitmode-flask)

Setup

This project relies on a handful of dependencies, use the following command to install your dependencies:

pip install -r requirements.txt

Note: Depending on your environment, you may need to use sudo. You may also want to use virtualenv.

Usage

Portrait Mode Effect is used from the command line:

python portrait-mode.py -i samples/input-1.jpg

-i/--image: specifies the image file.

The script outputs one image in the same directory with the name: input-1-portrait.jpg

Examples

python portrait-mode.py -i samples/input-1.jpg

python portrait-mode.py -i samples/input-2.jpg

python portrait-mode.py -i samples/input-3.jpg

To Do

  • [ ] Develop API.
  • [ ] Develop website.

Developers

This project has been developed by:

License

MIT License - see the LICENSE file for details.

Credits

  1. https://ai.googleblog.com/2018/03/semantic-image-segmentation-with.html
  2. https://github.com/tensorflow/models/tree/master/research/deeplab
  3. https://github.com/minimaxir/person-blocker