Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.07 KB

README.md

File metadata and controls

46 lines (29 loc) · 1.07 KB

Change-Background

Change background of image using semantic segmentation implemented in Pytorch trained on HRNet (Link)

Click and try here (Link)

Steps to run

  1. Clone this repository
git clone https://github.com/Garvit-32/BG-changer.git
  1. Install all the dependencies
pip install -r requirements.txt 
  1. Download weights from here
  2. Run inference
python main.py --image <path to foreground image> --bg_image <path to background image> --weights <path to weights>

Example

python main.py --image demo_images/image1.jpg --bg_image demo_images/background1.jpg --weights hrnetv2_hrnet18_person_dataset_120.pth

DEMO

Input

Background image

Foreground image

Output