DEV Community

Cover image for Imagine and create: Get started with generative AI on AWS - Part 1
Wendy Wong for AWS Heroes

Posted on • Edited on

Imagine and create: Get started with generative AI on AWS - Part 1

The future is bright for AI in 2023

In the latest report HAI Stanford University Human Centered Artificial Intelligence report 2023 State of AI in 14 Charts AI job postings in the US are most prominent in the information, professional, scientific, technical and finance industries.

Ai job postings

As startups, professional services and enterprise transform with a data strategy, data governance and the right tooling there are a few key considerations for AI:

  • Do I have executive sponsorship?
  • Do I have qualified AI practitioners or do I need to upskill my staff?
  • Do I have huge amounts of data readily available?
  • Do I have enough compute power to train the models?
  • Can I use AI to solve my business problem?

HAI Stanford University Human Centered Artificial Intelligence report also outline the demographic trends in AI with computer science graduate representation increasing for females at 22%.

grad

We will focus on the exciting field of generative AI and how it can inspire human creativity with computers.

Lesson Objectives

In this lesson you will learn about:

  • Generative AI
  • Why should I explore generative AI?
  • The common use cases for generative AI
  • Solution Architecture
  • Getting started with generative AI on AWS
  • Responsible AI
  • Global generative AI accelerator for startups - closing on April 17, 2023
  • Amazon Research Awards call for proposals in generative AI - closing on April 26, 2023

What is generative AI?

Generative AI includes algorithms such as Generative Adversarial Networks (GANs), Autoregressive Convolutional Neural Networks (AR-CNNs) and Autoregressive(AR) models.

Generative models help computers to understand the patterns of underlying data and take the 'learning' to create new content for sound, video, image, songs and text.

Generative AI in AWS DeepComposer uses unsupervised learning techniques to understand the underlying patterns of generated music and explore algorithms such clustering to find similarities where the dataset is not labelled.

Why should I explore generative AI?

Generative AI combines creativity to imagine future possibilities with machine learning models. You may get started on AWS using the AWS Free Tier.

You may easily get started with machine learning in a fun environment with your imagination such as creating:

  • New content for marketing

  • Unique customer experiences

  • New data e.g. sound, videos, text, images

What are the common use cases?

a) Large Language Models used in Finance

In the research paper published on arXiv on 30 March 2023 the authors propose to implement BloombergGPT a large language model trained on Bloomberg's data source a 363 billion token dataset.

b) Virtual Fashion-styling - Image-to-text generation

Retail businesses that provide personal styling services to their customers can take a desired input as a photo and upload it into Amazon SageMaker using pre-trained models DreamBooth to generate an AI image from learned patterns from the dataset.

You may read more about the implementation of virtual fashion styling with generative AI using Amazon SageMaker in the AWS blog.

c) Text-to-image generation

Last week at the AWS Sydney Summit 2023, keynote speaker Cameron Adams the Co-Founder of Aussie unicorn startup Canva spoke about using generative AI to weave imagination and create visuals from text inputs. You may watch on demand his keynote here.

You may take a look at the demo of the text to image creation from the Canva UI

canva AI

You may hear from the designers, storytellers and creators on the panel speak about the future of film making from the recent AI Film Festival hosted by Amazon customer the startup Runway. Runway used a text prompt to generate images.

Generative AI is used by NASA to design processes for space exploration, in dentistry to create 3D models from an image, compose sound and edit images for film making.

In recent times, Hollywood blockbusters have incorporated generative AI into film making such as Shrek, science fiction film Everything, everywhere all at once and Avatar.

Film director James Cameron incorporated generative AI into the movie sequel Avatar: The Way of Water.

“[Dreams] are kind of like a generative AI. I think they’re making imagery from a vast dataset that’s our entire experience in life, and … then another part of our brain is supplying a narrative that goes along with it and the narrative doesn’t always make much sense.” - James Cameron speaking to CNN.

Solution Architecture

GAN architecture includes creating new images based on learning from training real images. This network architecture is relevant for creating sound, text and new images.

Under this unsupervised learning technique, the network takes a corpus of training inputs such as real images and builds a generative neural network and outputs data similar to the training data.

The general architecture of GANs is shown in the image provided by AWS:

archi

AWS DeepComposer concepts and terminology includes the following definitions:

Discriminator Network

The discriminator classifies data as real or as generated using unsupervised learning. The discriminator is trained on real data or images.

Generative Network

The generative network generates data with a deconvolutional layer and a discriminator.

The generative network uses backward propagation to update the parameters for generating more realistic images. Supervised learning is used to identify generated images and the real training data - Which output data or image is True or False?

Tutorial 1: Generate music with AWS DeepComposer

  • Step 1: Sign into the AWS Management Console as an IAM user. If you do not have an AWS account you may create one here

  • Step 2: Navigate to AWS DeepComposer from the search bar and start typing the word 'deep'.

deep

Note: Switch to US East (N.Virginia) region to use AWS DeepComposer because this AWS service is not available in the Asia Pacific(Sydney) ap-southeast-2 region.

If you are a first-time user, you may access the AWS Free Tier which provides 12-months access to AWS DeepComposer sample models and this includes 30 day free trial.

  • Step 3: On the AWS DeepComposer homepage click Get Started to start composing music.

Icomposer

  • Step 4: You may click on Start learning Generative AI or Learning Capsules.

learning capsules

  • Step 5: Click Launch music studio to start creating music

music studio

  • Step 6: Click Start composing

composing

  • Step 7: Choose an input track, record your own track or you may upload your own track.

choose

  • Step 8: I chose an input track We wish you a merry Christmas and click Continue.

merry

  • Step 9: Under ML technique, I chose the Generative AI technique which is GANs. Select the Model, I chose pop music from the drop-down menu. Click Continue.

ML

  • Step 10: You may edit the melody by changing the Instruments, Instrument Type and Model from the drop-down menu and click Play to hear the composed music and make adjustments.

Once you are satisfied with the melody, click Continue.

set melody

  • Step 11: Music is generated. Hooray! 🎉

Click Share composition to publish the music on SoundCloud

share composition

  • Step 12: You may create an account or login to SoundCloud

connect

  • Step 13: Enter details of your generated music, you may provide a description and you may select if you would like to be included in a SoundCloud challenge.

share

  • Step 14: After you connect with SoundCloud, you will receive a status that your composed music has been uploaded successfully.

success

  • Step 15: You will navigate to the SoundCloud page and you may listen to the music generated by other creators and also view the ranking by popularity.

  • Step 16: Clean Up Resources

In AWS DeepComposer, navigate to Music Studio on the left-handside navigation pane and click Delete.

delete composition

At the confirmation, click Delete.

delete

Responsible AI Considerations

There are other consideration before implementing AI in your organization as an AI practitioner:

  • How do I store data securely?
  • How do I use AI ethically with data governance sign-off?
  • How do I ensure that my design is inclusive?
  • How do I remove algorithmic bias?

Conclusion

Generative AI models help creators, designers and developers to reimagine storytelling and design unique experiences. These experiences have the potential to transform space exploration, provide customer-centric experiences in retail, film-making, health care and more.

Tutorial 2: Imagine and create with generative AI: Get started on AWS - Part 2

In the next tutorial you will learn more about generative AI.
I encourage you to explore and create your own music with AWS DeepComposer with the pre-trained AI models.

Until the next lesson, happy learning! 🙂

References 📚

AWS Global Generative AI accelerator program - closing on 17 April 2023

On 4 April 2023, AWS CEO Adam Selipsky announced the global launch of generative AI for startups around the world here.

If you are a startup, you are invited to apply for the global generative AI accelerator which closes on 17 April 2023.

In this program, you will have access to:

  • Impactful AI models
  • Customized go-to-market strategies
  • ML optimization
  • Networking opportunities with potential investors and customers
  • $300,000 in AWS credits to build your product or service
  • Dedicated business and technical mentors

Amazon Research Awards Call for Proposals in Generative AI - Spring 2023

Are you a researcher? Amazon Research Awards for Generative AI is calling for proposals which is closing soon on April 26, 2023 you may apply here.

Amazon Science on LinkedIn: Amazon Research Awards issues spring 2023 call for proposals

Generative AI is the focus of this season’s call for proposals, where successful recipients will receive unrestricted funds and AWS Promotional Credits…

favicon linkedin.com

Hello World: Meet Generative AI - An interview with Dr. Werner Vogels, Amazon CTO and Swami Sivasubramanian, AWS VP of database, analytics, and ML

Top comments (0)

Some comments have been hidden by the post's author - find out more