banner_image ×
SeaArt AI Entreprise

A close up of a cell phone with multiple colors of stars

import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image

# Función para cargar y preprocesar la imagen de entrada
def load_image(image_path):
    img = tf.io.read_file(image_path)
    img = tf.image.decode_image(img, channels=3)
    img = tf.image.convert_image_dtype(img, tf.float32)
    img = tf.image.resize(img, (256, 256))  # Ajustar al tamaño adecuado para el modelo
    img = img[tf.newaxis, :]  # Añadir dimensión del lote
    return img

# Función para preprocesar la imagen generada por el modelo
def preprocess_image(image):
    image = image.numpy().squeeze()
    image = np.clip(image, 0, 1)
    return image

# Función para visualizar la imagen generada
def visualize_image(image):
    plt.figure(figsize=(8, 8))
    plt.imshow(image)
    plt.axis('off')
    plt.show()

# Cargar el modelo de estilo (puedes elegir un modelo que imite el estilo de Van Gogh)
hub_module = hub.load('https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2')

# Cargar la imagen de la noche estrellada de Van Gogh
input_image = load_image('night_starry.jpg')  # Reemplaza con la ruta de la imagen de la noche estrellada

# Generar la imagen en el estilo abstracto
stylized_image = hub_module(tf.constant(input_image), tf.constant(input_image))[0]

# Preprocesar y visualizar la imagen generada
stylized_image = preprocess_image(stylized_image)
visualize_image(stylized_image)
chatIcon
J'ai des idées audacieuses, osez-vous les écouter ?
Créer un Compagnon AI
image
avatar
R
rox
Prompts
Copier les Paramètres
import tensorflow as tf import tensorflow_hub as hub import numpy as np import matplotlib . pyplot as plt from PIL import Image # Función para cargar y preprocesar la imagen de entrada def load_image(image_path): img = tf . io . read_file(image_path) img = tf . image . decode_image(img , channels=3) img = tf . image . convert_image_dtype(img , tf . float32) img = tf . image . resize(img , (256 , 256)) # Ajustar al tamaño adecuado para el modelo img = img[tf . newaxis , :] # Añadir dimensión del lote return img # Función para preprocesar la imagen generada por el modelo def preprocess_image(image): image = image . numpy() . squeeze() image = np . clip(image , 0 , 1) return image # Función para visualizar la imagen generada def visualize_image(image): plt . figure(figsize=(8 , 8)) plt . imshow(image) plt . axis('off') plt . show() # Cargar el modelo de estilo (puedes elegir un modelo que imite el estilo de Van Gogh) hub_module = hub . load('https://tfhub . dev/google/magenta/arbitrary-image-stylization-v1-256/2') # Cargar la imagen de la noche estrellada de Van Gogh input_image = load_image('night_starry . jpg') # Reemplaza con la ruta de la imagen de la noche estrellada # Generar la imagen en el estilo abstracto stylized_image = hub_module(tf . constant(input_image) , tf . constant(input_image))[0] # Preprocesar y visualizar la imagen generada stylized_image = preprocess_image(stylized_image) visualize_image(stylized_image)
Info
Prompts
import tensorflow as tf import tensorflow_hub as hub import numpy as np import matplotlib.pyplot as plt from PIL import Image # Función para cargar y preprocesar la imagen de entrada def load_image(image_path): img = tf.io.read_file(image_path) img = tf.image.decode_image(img, channels=3) img = tf.image.convert_image_dtype(img, tf.float32) img = tf.image.resize(img, (256, 256)) # Ajustar al tamaño adecuado para el modelo img = img[tf.newaxis, :] # Añadir dimensión del lote return img # Función para preprocesar la imagen generada por el modelo def preprocess_image(image): image = image.numpy().squeeze() image = np.clip(image, 0, 1) return image # Función para visualizar la imagen generada def visualize_image(image): plt.figure(figsize=(8, 8)) plt.imshow(image) plt.axis('off') plt.show() # Cargar el modelo de estilo (puedes elegir un modelo que imite el estilo de Van Gogh) hub_module = hub.load('https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2') # Cargar la imagen de la noche estrellada de Van Gogh input_image = load_image('night_starry.jpg') # Reemplaza con la ruta de la imagen de la noche estrellada # Generar la imagen en el estilo abstracto stylized_image = hub_module(tf.constant(input_image), tf.constant(input_image))[0] # Preprocesar y visualizar la imagen generada stylized_image = preprocess_image(stylized_image) visualize_image(stylized_image)
Prompts Négatives
CyberRealistic_Negative, (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation
Échelle CFG
7
Étapes
40
Échantillonneur
DPM++ SDE Karras
Graine Aléatoire
3953120478
Clip Skip
1
Dimension de l'Image
512 X 768
Intensité de Repaint
0.2
Modèle
CyberRealistic
Créer
Taille
1024X1536
Date
Jul 3, 2024
Mode
Par Défaut
Type
upscale
Checkpoint & LoRA
CyberRealistic
Checkpoint
CyberRealistic
#Paysage
#Conception d'Article
0 commentaire(s)
0
0
0

Apps AI Rapides de SeaArt

ai_video_generationimg
Génération de Vidéos AI

Libérez votre imagination, l'AI crée des miracles visuels pour vous.

face_swap_titleimg
Échangez le visage gratuitement en ligne

Créez des vidéos et des photos hilarantes & réalistes en échangeant le visage rapidement

cartoon_avatar_h1img
Créateur d'Avatar Cartoon

Transformez vos photos en avatars cartoon uniques instantanément.

ai_tools_4img
Filtres AI

Transformer chaque photo en œuvre d'art

ai_tools_2img
Suppression de l'arrière-plan

Supprimez les arrière-plans de n'importe quelle image en quelques secondes.

video_face_swapimg
Échange de Visage Vidéo

Créez des vidéos amusantes en échangeant les visages dans n'importe quel clip vidéo.

Explorer plus d'applications AI 

Suggestions

ControlNet
logo
Français
Applications
Générer l'image Compagnons AI IA Swift Entraînement de modèle Canvas Outil Rapide Flux de Travail
À propos de lui/elle
Studio Classement AI Chat Blog AI Actualités AI
Aide
Tutoriel Service clientèle
Obtenir l'Application
icon
Download on the
APP Store
icon
GET IT ON
Google Play
Suivez-Nous
iconiconiconiconiconiconiconicon
© 2025 SeaArt, Inc.
Copyright Policy
Conditions d'utilisation
Politique de confidentialité 特定商取引法 資金決済法に基づく表示
Plus