Eddie - Person Generator is a GenAI tool designed to generate variations of people in images based on different geographical locations. It allows you to select a person in your photo and transform them to appear as if they were from another region of the world.
Eddie utilizes generative AI to create authentic-looking variations of people in photos. It's particularly useful for:
- Location-based variations: Change how a person appears based on different geographical regions (Africa, Middle East, East Asia, etc.)
- Photo customization: Quickly generate region-specific variations of your images
- Content creation: Create diverse representation in your visual content
Eddie works by transforming people based on geographical regions. The following keywords are available:
- Africa
- Central Africa
- Middle East
- East Asia
- North Europe
- South Europe
- North America
- South America
- Oceania
These keywords are defined in the editPerson_dict.py
file and must be used exactly as written when making API calls.
The following instructions suppose you have already installed a recent version of Python. To use any PiktID API, an access token is required.
Step 0 - Register here. 10 credits are given for free to all new users.
Step 1 - Clone the Eddie - Person Generator repository
# Installation commands
$ git clone https://github.com/piktid/eddie-person-generator.git
$ cd eddie-person-generator
Step 2 - Export your email and password as environmental variables
$ export EDDIE_EMAIL={Your email here}
$ export EDDIE_PASSWORD={Your password here}
Step 3 - Run the main function with a URL or local file path of the image and specify a keyword
# Using a URL with a keyword
$ python3 main.py --input_url 'your-url' --keyword 'Africa'
# Using a local file path with a keyword
$ python3 main.py --input_filepath '/path/to/your/image.jpg' --keyword 'North Europe'
You can customize the generation parameters with the following options:
# Generate a variation with specific parameters
$ python3 main.py --input_filepath '/path/to/your/image.jpg' --id_person 0 --keyword 'Middle East' --seed 12345 --output_filepath '/path/to/save/output.jpg'
Eddie supports two API workflows:
- v1 (default): Standard workflow for image processing
- v2: Enhanced workflow with improved upload handling, storage, and new notifications
To use the v2 workflow, add the --use_v2
flag:
# Using v2 workflow
$ python3 main.py --input_filepath '/path/to/your/image.jpg' --keyword 'East Asia' --use_v2
- input_url: URL of the image to process
- input_filepath: Local path to the image file
- output_filepath: Where to save the generated image
- id_person: Index of the person to modify in the image (default: 0)
- keyword: Geographical location to use for variation (REQUIRED - see Available Keywords section)
- seed: Random seed for reproducible results (default: random)
- use_v2: Use v2 workflow with enhanced features (optional flag)