API
If you're looking for an API, you can choose from your desired programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/segmind-relighting"
# Request payload
data = {
"image": image_url_to_base64("https://segmind-resources.s3.amazonaws.com/output/53d92d7d-b9fe-49e4-a1b8-84fcac2c396a-dull_image.jpg"), # Or use image_file_to_base64("IMAGE_PATH")
"light_direction": "top",
"light_type": "ambient",
"light_temperature": "neutral",
"light_intensity": "medium"
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Input Image.
Specifies direction of the light coming in.
Allowed values:
Specifies source of the light coming in.
Allowed values:
Specifies temprature or color of the light coming in.
Allowed values:
Specifies the intensity of the light coming in.
Allowed values:
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Relighting
Relighting transforms image illumination with unparalleled control and realism. Relighting model is based on IC-Light, short for "Imposing Consistent Light," leverages cutting-edge AI to manipulate lighting within your images, ensuring seamless integration with existing light conditions.
Text-Driven Illumination Control: Imagine effortlessly adjusting the lighting in your photos using simple text prompts. Relighting model operates as a text-conditioned relighting model, allowing you to specify the desired lighting direction – left, right, top, or bottom. With this intuitive interface, you can instantly relight your images, creating dramatic shadows, adding warmth, or creating a bright and airy feel.
Realism at its Finest: Relighting model goes beyond basic manipulation. The underlying AI models are meticulously trained to understand the physics of light, ensuring that relit images maintain a natural and believable appearance. This translates to seamless merging with existing lighting conditions within the image, eliminating awkward transitions or unrealistic shadows.
Benefits of Relighting in AI Photo Editing
-
Effortless Lighting Control: Text-based prompts provide a user-friendly way to adjust image illumination, empowering even non-technical users to achieve stunning results.
-
Unparalleled Realism: Relighting model leverages advanced AI, trained on real-world lighting scenarios, to produce photorealistic relighting effects.
-
Enhanced Image Storytelling: With the ability to manipulate lighting, Relighting unlocks a world of creative possibilities. Craft specific moods and atmospheres, emphasize key elements, or simply add a touch of artistic flair to your images.
-
Increased Efficiency: Eliminate time-consuming manual editing processes. Relighting automates relighting, allowing you to focus on the creative aspects of image manipulation.
Whether you're a professional photographer, a creative hobbyist, or simply looking to enhance your existing photos, Relighting provides the tools to bring your vision to life.
Other Popular Models
sdxl-controlnet
SDXL ControlNet gives unprecedented control over text-to-image generation. SDXL ControlNet models Introduces the concept of conditioning inputs, which provide additional information to guide the image generation process

sadtalker
Audio-based Lip Synchronization for Talking Head Video

codeformer
CodeFormer is a robust face restoration algorithm for old photos or AI-generated faces.

sd2.1-faceswapper
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training
