-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add product advertising video generation use case preserving logo and text #22
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File organization: Let's follow the patterns already used in the "multimodal-understanding" subfolder:
- Change "use-cases" folder name to "repeatable-patterns".
- Change "product-ad" to "01-product-video-ad".
Consistency: Multi-word folder names should use hyphens rather than underscores.
Consistency: Multi-word code files should use underscores rather than hyphens.
Remove extra files: We shouldn't store any contents of the "output" folder in this repo. Please delete the output folder and its contents.
@@ -0,0 +1,22 @@ | |||
# Amazon Nova Use Cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change title to "Amazon Nova Canvas and Nova Reel Repeatable Patterns".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
2. **Controlled Video Motion**: Generating videos with background movement while keeping the product stationary, ideal for product showcases. | ||
3. **Logo and Text Preservation**: Implementing a frame-by-frame overlay technique to prevent logo and text distortion during video generation. | ||
|
||
By combining Amazon Bedrock's Nova Canvas and Reel models, we'll walk through a step-by-step process that enables creators and marketers to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to use the full name of the models on first mention. So rephrase to something like "By combining Amazon Nova Canvas and Nova Reel, accessed through Amazon Bedrock, we'll..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
- Social media advertising | ||
- Product demonstration videos | ||
|
||
This repository includes code examples for creating videos for product advertising using both Amazon Canvas image generation model and AmazonNova Reel video generation model. Follow the Jupyter Notebook [01_product_ad_generation.ipynb](01_product_ad_generation.ipynb) step by step guide. Sample images for use with these Jupyter Notebook have also been provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some model name, grammar, and formatting errors here. Should be "...both the Amazon Nova Canvas image generation model and Amazon Nova Reel video generation model."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, for consistency with the other read me, change "step by step" to "step-by-step".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small grammar error: Change "...with these Jupyter Notebook..." to "..with this Jupyter Notebook..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
### Prerequisites | ||
|
||
- Your AWS account has been allow-listed for access to the model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide links whenever possible to help the customers who don't already have these prerequisites in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be a duplicate of "/multimodal-generation/image-generation/python/amazon_image_gen.py". I'd prefer that we don't duplicate code throughout the amazon-nova-samples repo due to the complexity in maintaining it. Is it possible to update your scripts to reference the other file instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I understand. Done, added:
sys.path.append('../../image-generation/python')
from amazon_image_gen import BedrockImageGenerator
import file_utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete all files in the "output" folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete all files in the "output" folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 1: Let's not refer to the models as "Amazon Bedrock's Nova Canvas", etc. We wouldn't say "Amazon Bedrock's Claude Haiku" and we shouldn't attributed ownership of the Nova models to the Bedrock team, either. Just refer to them as "Amazon Nova Canvas" and "Amazon Nova Reel" (shortening to "Nova Canvas" and "Nova Reel" after first mention.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 2: Fix this copy-paste error:
It will replace the background behind the coffee maker...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 3: Clear all cell outputs before committing the file to Git. When a user opens the Notebook, they shouldn't see any stale cell output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 4: In the resize_and_pad_image
function definition, the pad_bottom
and pad_right
variables are set but never referenced, therefore, they are unnecessary and should be removed. If this doesn't seem correct, then there is a problem with that function's definition (Tip: I used VS Code to view this code and it pointed this out automatically to me.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice-to-have (not critical!): It would be nice if the user could provide horizontal placement percentage rather than just "left", "center", "right" padding values. That way the user could shift the product anywhere they like, including 33% of the way from the left or right which is very common. See Rule of Thirds. Bonus points if they can also specify vertical position in the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 5: Find this sentence:
Modify the
s3_destination_bucket
andvideo_prompt
variables at the start of the code below and then run the cell to start generating your video.
The video_prompt
variable doesn't appear until one cell later. And the s3_destination_bucket
variable doesn't appear until two cells later. Move the narrative references to these variables to immediately before the cell each appears in. Also, explain to the reader what you mean by "modify the (variable)". In the case of the S3 bucket, for example, the user has to specify the name of either a bucket that already exists in their account or a bucket name that is not likely to have already been used by another user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 6: Find the Markdown cell that begins...
The next code configures an asynchronous video generation process using Amazon Bedrock.
Move this to right above the cell it is describing. (Currently, it's appearing one cell too soon.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request 7: When I ran through the notebook, when I finished generating the first video (before adding the overlay) there was some slight camera movement. Because of that, when I completed the overlay step, I got a video where. the overlay stood still but the rest of the video didn't which looked like a mistake. I suggest adding a note to the step where the initial video is create that warns users to regenerate the video if the output has camera movement in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this video included in the repo? If it isn't needed, please remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the folder, since it will get generated when generating the final video with the overlayed image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this video included in the repo? If it isn't needed, please remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the folder, since it will get generated when generating the final video with the overlayed image
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update after review as per suggested comments
This PR introduces a new structure for image and video generation use cases with Amazon Nova Canvas and Amazon Nova Reel, including:
This use case focuses on addressing common challenges in product videography using Generative AI, specifically:
By combining Amazon Bedrock's Nova Canvas and Reel models, we'll walk through a step-by-step process that enables creators and marketers to:
This workflow is particularly useful for: