Lädt...

🔧 Generate Stunning Visuals in Your Android Apps with Imagen 3 via Vertex AI in Firebase


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: android-developers.googleblog.com

Posted by Thomas Ezan Sr. – Android Developer Relation Engineer (@lethargicpanda)


Imagen 3, our most advanced image generation model, is now available through Vertex AI in Firebase, making it even easier to integrate it to your Android apps.

Designed to generate well-composed images with exceptional details, reduced artifacts, and rich lighting, Imagen 3 represents a significant leap forward in image generation capabilities.

Hot air balloons float over a scenic desert landscape with unique rock formations.
Image generated by Imagen 3 with prompt: “Shot in the style of DSLR camera with the polarizing filter. A photo of two hot air balloons over the unique rock formations in Cappadocia, Turkey. The colors and patterns on these balloons contrast beautifully against the earthy tones of the landscape below. This shot captures the sense of adventure that comes with enjoying such an experience.”

A wooden robot stands in a field of yellow flowers, holding a small blue bird on its outstretched hand.
Image generated by Imagen 3 with prompt: A weathered, wooden mech robot covered in flowering vines stands peacefully in a field of tall wildflowers, with a small blue bird resting on its outstretched hand. Digital cartoon, with warm colors and soft lines. A large cliff with a waterfall looms behind.

Imagen 3 unlocks exciting new possibilities for Android developers. Generated visuals can adapt to the content of your app, creating a more engaging user experience. For instance, your users can generate custom artwork to enhance their in-app profile. Imagen can also improve your app's storytelling by bringing its narratives to life with delightful personalized illustrations.

You can experiment with image prompts in Vertex AI Studio, and learn how to improve your prompts by reviewing the prompt and image attribute guide.

Get started with Imagen 3

The integration of Imagen 3 is similar to adding Gemini access via Vertex AI in Firebase. Start by adding the gradle dependencies to your Android project:

dependencies {
    implementation(platform("com.google.firebase:firebase-bom:33.10.0"))

    implementation("com.google.firebase:firebase-vertexai")
}

Then, in your Kotlin code, create an ImageModel instance by passing the model name and optionally, a model configuration and safety settings:

val imageModel = Firebase.vertexAI.imagenModel(
  modelName = "imagen-3.0-generate-001",
  generationConfig = ImagenGenerationConfig(
    imageFormat = ImagenImageFormat.jpeg(compresssionQuality = 75),
    addWatermark = true,
    numberOfImages = 1,
    aspectRatio = ImagenAspectRatio.SQUARE_1x1
  ),
  safetySettings = ImagenSafetySettings(
    safetyFilterLevel = ImagenSafetyFilterLevel.BLOCK_LOW_AND_ABOVE
    personFilterLevel = ImagenPersonFilterLevel.ALLOW_ADULT
  )
)

Finally generate the image by calling generateImages:

val imageResponse = imageModel.generateImages(
  prompt = "An astronaut riding a horse"
)

Retrieve the generated image from the imageResponse and display it as a bitmap as follow:

val image = imageResponse.images.first()
val uiImage = image.asBitmap()

Next steps

Explore the comprehensive Firebase documentation for detailed API information.

Access to Imagen 3 using Vertex AI in Firebase is currently in Public Preview, giving you an early opportunity to experiment and innovate. For pricing details, please refer to the Vertex AI in Firebase pricing page.

Start experimenting with Imagen 3 today! We're looking forward to seeing how you’ll leverage Imagen 3's capabilities to create truly unique, immersive and personalized Android experiences.

...

🔧 Generate Stunning Visuals in Your Android Apps with Imagen 3 via Vertex AI in Firebase


📈 103.44 Punkte
🔧 Programmierung

🎥 Firebase After Hours #7: Firebase + Vertex AI: Level up your app with AI


📈 42.13 Punkte
🎥 IT Security Video

🔧 MS-SQL, React, Fetch ... Mostrar imagen desde un campo tipo Imagen


📈 37.89 Punkte
🔧 Programmierung

🎥 February 2024: Genkit is GA, Imagen 3 support in Vertex AI SDKs, and Apple SDK updates!


📈 35.83 Punkte
🎥 IT Security Video

🪟 Google announces live image feature for Imagen 2.0 to enhance Vertex AI


📈 35.83 Punkte
🪟 Windows Tipps

📰 Google updates Gemini and Gemma on Vertex AI, and gives Imagen a text-to-live-image generator


📈 35.83 Punkte
📰 IT Nachrichten

📰 Googles Bildgenerator Imagen 2 jetzt in der Plattform Vertex AI verfügbar


📈 35.83 Punkte
📰 IT Nachrichten

🔧 Unleash Your Creativity with Reve AI: Transform Text into Stunning Visuals!


📈 34.04 Punkte
🔧 Programmierung

🔧 14 Code Snippet Image Generators to Turn Your Code into Stunning Visuals 😍🧑‍💻


📈 34.04 Punkte
🔧 Programmierung

🔧 Free AI Image Generators in 2025: Top Tools for Stunning Visuals


📈 31.48 Punkte
🔧 Programmierung

🔧 Free AI Image Generators in 2025: Top Tools for Stunning Visuals


📈 31.48 Punkte
🔧 Programmierung

🔧 Unlock Professional-Grade Photo Editing: How Imgkits Simplifies Stunning Visuals


📈 31.48 Punkte
🔧 Programmierung

🔧 HDR: The Secret to Stunning Visuals in Gaming Laptops


📈 31.48 Punkte
🔧 Programmierung

🔧 🚀 Explore the Relationship Status Across Sweden with Stunning Visuals! 🇸🇪


📈 31.48 Punkte
🔧 Programmierung

🔧 🚀 Explore the Relationship Status Across Sweden with Stunning Visuals! 🇸🇪


📈 31.48 Punkte
🔧 Programmierung

🍏 Computer Animated Pixels 1.4 - Create stunning visuals.


📈 31.48 Punkte
🍏 iOS / Mac OS

🐧 YouTuber Remakes ‘Subway Surfers’ For PC With Stunning Visuals


📈 31.48 Punkte
🐧 Linux Tipps

📰 Production-ready generative AI on Android with Vertex AI in Firebase


📈 30.32 Punkte
🤖 Android Tipps

📰 Production-ready generative AI on Android with Vertex AI in Firebase


📈 30.32 Punkte
🤖 Android Tipps

🎥 Use Vertex AI in Firebase to securely call Gemini from an Android app


📈 30.32 Punkte
🎥 IT Security Video

🎥 Add Vertex AI and Firebase to an iOS app in under a minute


📈 28.23 Punkte
🎥 IT Security Video

🎥 Learn how to create captivating descriptions for anything with Firebase and Vertex AI


📈 28.23 Punkte
🎥 IT Security Video

🎥 Armed with Firebase + Vertex AI, you too can revolutionize the way you write app descriptions


📈 28.23 Punkte
🎥 IT Security Video

🎥 Use Vertex AI in Firebase to securely call Gemini from an iOS app


📈 28.23 Punkte
🎥 IT Security Video

🎥 October 2024: Data Connect, Vertex AI, Gemini in Firebase and more!


📈 28.23 Punkte
🎥 IT Security Video

🎥 Google Generative AI vs @Firebase Vertex AI


📈 28.23 Punkte
🎥 Video | Youtube

🎥 Vertex AI SDKs for #Firebase


📈 28.23 Punkte
🎥 IT Security Video

🎥 Vertex AI for #Firebase


📈 28.23 Punkte
🎥 IT Security Video

🎥 Host your Next.js or Angular SSR application on Firebase with Firebase App Hosting


📈 25.25 Punkte
🎥 IT Security Video

🎥 Host your Next.js or Angular SSR application on Firebase with Firebase App Hosting


📈 25.25 Punkte
🎥 IT Security Video

🎥 Firebase Authentication & Android Credentials: What's New? - Firebase After Hours LIVE


📈 24.78 Punkte
🎥 IT Security Video

📰 How to use Leonardo AI to generate stunning artwork and images


📈 23.52 Punkte
📰 IT Nachrichten

matomo