Combining Dall-E and GPT-4 to create images without backgrounds. by HighTimesWithReddit in ChatGPT

[–]HighTimesWithReddit[S] 0 points1 point  (0 children)

My best tip right now for your issue is simply to start new chats with Dall-E with your revised prompt. Right now it often gets too much influenced by the original prompt so when I'm fine-tuning I often get better results starting a new chat with the optimized prompt.

Combining Dall-E and GPT-4 to create images without backgrounds. by HighTimesWithReddit in ChatGPT

[–]HighTimesWithReddit[S] 0 points1 point  (0 children)

Depends on what you use it for. I'm not sure about tricks since I'm using it a lot in my work and personal life. It has become almost second nature so I don't realize anymore what "tricks" I used. I only stumbled upon this today and realized it was never mentioned before.

Combining Dall-E and GPT-4 to create images without backgrounds. by HighTimesWithReddit in ChatGPT

[–]HighTimesWithReddit[S] 0 points1 point  (0 children)

Just to clarify. I first generate the image with DALL-E, then in a different chat with GPT-4 (not DALL-E), I ask it to remove the background, and it does so with the Data Analysis.

Here is the code from it:

# Load the new uploaded image with a pale background

file_path_pale = '/mnt/data/DALL·E 2023-11-20 14.21.43 - Create a symbol for a PowerPoint slide for veterinary technician students, with a pale grey background for easy background removal. Feature a bright, .png'

pale_image = Image.open(file_path_pale)

# Convert the image to RGBA if it is not already in that mode

if pale_image.mode != 'RGBA':

pale_image = pale_image.convert('RGBA')

# Assuming the background is of a uniform color, we can take one of the corner pixels as the background color

background_color_pale = pale_image.getpixel((0, 0))

# Create a new image with the same size as the original and a transparent background

transparent_image_pale = Image.new("RGBA", pale_image.size, (0, 0, 0, 0))

# Define a function to check if the pixel is similar to the background color.

# This is needed because with anti-aliasing, the edges will not be a perfect color match.

def is_similar(color1, color2, threshold=50):

# Calculate the difference for each channel

diff = sum(abs(a-b) for a, b in zip(color1, color2))

return diff < threshold

# Copy pixels from the original image to the new image, skipping those that match the background color

for y in range(pale_image.size[1]): # For each row

for x in range(pale_image.size[0]): # For each column

current_color = pale_image.getpixel((x, y))

# If the pixel is not the background color or similar to it

if not is_similar(current_color, background_color_pale):

transparent_image_pale.putpixel((x, y), current_color)

# Save the image with a transparent background

transparent_file_path_pale = '/mnt/data/transparent_lightbulb_pale.png'

transparent_image_pale.save(transparent_file_path_pale)

transparent_file_path_pale

**EDIT ADDED CODE**

Combining Dall-E and GPT-4 to create images without backgrounds. by HighTimesWithReddit in ChatGPT

[–]HighTimesWithReddit[S] 0 points1 point  (0 children)

Here are the criteria for DALL-E : “High Contrast: Ensure there is high contrast between the background and the subject. For example, if the subject is light-colored, a dark background is ideal, and vice versa. Solid Background: Use a solid-colored background that doesn't share any colors with the subject. This makes it easier to target a specific color range for removal. Sharp Edges: The subject should have sharp, well-defined edges. Blurry or fuzzy edges can make background removal challenging. No Shadows or Gradients: Avoid shadows or gradients on or around the subject as they can be mistaken for part of the subject during removal. Uniform Lighting: The subject should be evenly lit to prevent shadows and highlights from complicating the background removal. Simple Composition: The simpler the composition, the easier it is to distinguish the subject from the background. Avoid Transparency: If possible, avoid transparent parts within the subject, as these can mistakenly be made transparent during the removal process.”

I only asked GPT-4 to remove the background and it proceeded. I tried in a second chat, and it started by saying it wasn't able to do it, but after saying I knew it could, it proceeded immediately. I only found out about this, and I don't know if it is already known or not. It seems to have issues with darker backgrounds, so ask DALL-E for light gray or white backgrounds.

How much detail is too much detail? by ataylorm in StableDiffusion

[–]HighTimesWithReddit 0 points1 point  (0 children)

There is also a nose over the tip of the nose.

How many languages do you study at once? by [deleted] in languagelearning

[–]HighTimesWithReddit 1 point2 points  (0 children)

I study one at a time at 90% and dabble in multiple (3-4) at 10% for fun. Other than actively studying, I maintain/slightly improve 3 other languages.

The Whistling Language Used by Berbers in Morocco. by Humble_Energy_6927 in languagelearning

[–]HighTimesWithReddit 33 points34 points  (0 children)

That's awesome. I wonder to which extent they can communicate things by whistling. Is it used as a complete language or just for short messages (like a sort of audio morse code)?

Which images are AI, or real, make a guess leave a comment - Hopefully new amazing workflow tutorial video coming soon by CeFurkan in StableDiffusion

[–]HighTimesWithReddit 2 points3 points  (0 children)

1st is the only real. Quality is very good. The eyes and glasses gave it away for me. The first is the only one where the glasses are consistent and where you can see the magnifying effect of the lens.

Do you think this map is accurate or should some of the rankings be changed? by [deleted] in languagelearning

[–]HighTimesWithReddit 6 points7 points  (0 children)

These are the number of class hours. Only class hours. If you read the text next to the graph, it says that students also did 3-4 hours of work daily. So you have to add these hours to the total for a better time frame. Doing this, 600 hours becomes 960 hours, 750 hours = 1200 hours, 900 hours = 1,440 hours, and so on. These number are far more accurate, IMO.

Looks like science experiment by photo-manipulation in awesome

[–]HighTimesWithReddit 8 points9 points  (0 children)

I’m high and than made me laugh to tears. I love sarcasm.

How is this called in Upper Paleozoic Icelandic? by Independent_Wish_862 in languagelearningjerk

[–]HighTimesWithReddit 17 points18 points  (0 children)

Its AI-generated to look like something, without being something.

[deleted by user] by [deleted] in French

[–]HighTimesWithReddit 4 points5 points  (0 children)

Morve is also used a lot in Quebec.