Skip to content

dharmilshah99/ThugLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThugLife

Script that overlays sick thug life glasses on people in images. Script takes help from DLib bro's Facial Keypoint and Bounding Box detection models. Keypoints detected from these models are used as references to overlay the dope glasses. Check out the Pictures folder for more of Script dude's work.

Contents

Getting Started

First, download thuglife.yml, ThugLife.py, transparent.png, and shape_predictor_68_face_landmarks.dat. Store all of these files in a directory you are comfortable with. Then using Anaconda, navigate to them. If you have stored your files within \Downloads, your feed into the prompt should look something like this.

(base) C:\Users\[Name]> cd C:\Users\[Name]\Downloads 

Now, we need to create an environment with the needed dependencies for the script to function.

Environment

There were quite a few dependencies, and it was a pain to get them all into one environment. To make things easier, I have exported the environment into thuglife.yml through which you can create environment with all the needed dependencies. With Anaconda this is simple.

(base) C:\Users\[Name]\Downloads> conda env create -f thuglife.yml 

Then, make sure you activate the environment you have created.

(base) C:\Users\[Name]\Downloads> conda activate thuglife

That's it. This will create an environment will all the needed dependencies to run the script.

Running the Script

Now, we just need to tell the script where the image we want to ThugLife is. Obtain it's path and put this into the prompt as such. Don't forget to put the double quotes and make sure your image contains people.

(thuglife) C:\Users\[Name]\Downloads> python ThugLife.py -path "C:\Users\[Name]\Downloads\Baby.jpg"

Cue the Thug Life song! We have Thug Life'd some people with some dope glasses. To exit the image, simply press any key.

About

Monkey ThugLifes Images of People

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages