Skip to content

Commit

Permalink
DynamiCrafter animating images (#2003)
Browse files Browse the repository at this point in the history
CVS-139504
  • Loading branch information
aleksandr-mokrov authored May 14, 2024
1 parent 31a83ff commit 935c2f8
Show file tree
Hide file tree
Showing 7 changed files with 782 additions and 1 deletion.
1 change: 1 addition & 0 deletions .ci/ignore_treon_docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ stable-video-diffusion
llm-agent-langchain
hello-npu
stable-cascade-image-generation
dynamicrafter-animating-images
1 change: 1 addition & 0 deletions .ci/ignore_treon_linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ stable-video-diffusion
llm-agent-langchain
hello-npu
stable-cascade-image-generation
dynamicrafter-animating-images
3 changes: 2 additions & 1 deletion .ci/ignore_treon_mac.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ llm-rag-langchain
stable-video-diffusion
llm-agent-langchain
hello-npu
stable-cascade-image-generation
stable-cascade-image-generation
dynamicrafter-animating-images
1 change: 1 addition & 0 deletions .ci/ignore_treon_win.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ stable-video-diffusion
llm-agent-langchain
hello-npu
stable-cascade-image-generation
dynamicrafter-animating-images
3 changes: 3 additions & 0 deletions .ci/spellcheck/.pyspelling.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ adaptively
adas
ADE
adversarially
AE
aeroplane
affective
ai
Expand Down Expand Up @@ -56,6 +57,7 @@ bert
BERT's
BetterTransformer
Bewley
bfloat
BGE
bge
BGR
Expand Down Expand Up @@ -202,6 +204,7 @@ dpredictor
DreamBooth
Dreamshaper
dropdown
DynamiCrafter
ECCV
editability
EfficientNet
Expand Down
38 changes: 38 additions & 0 deletions notebooks/dynamicrafter-animating-images/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Animating Open-domain Images with DynamiCrafter and OpenVINO

Animating a still image offers an engaging visual experience. Traditional image animation techniques mainly focus on animating natural scenes with stochastic dynamics (e.g. clouds and fluid) or domain-specific motions (e.g. human hair or body motions), and thus limits their applicability to more general visual content. To overcome this limitation, [DynamiCrafter team](https://doubiiu.github.io/projects/DynamiCrafter/) explores the synthesis of dynamic content for open-domain images, converting them into animated videos. The key idea is to utilize the motion prior of text-to-video diffusion models by incorporating the image into the generative process as guidance. Given an image, DynamiCrafter team first projects it into a text-aligned rich context representation space using a query transformer, which facilitates the video model to digest the image content in a compatible fashion. However, some visual details still struggle to be preserved in the resultant videos. To supplement with more precise image information, DynamiCrafter team further feeds the full image to the diffusion model by concatenating it with the initial noises. Experimental results show that the proposed method can produce visually convincing and more logical & natural motions, as well as higher conformity to the input image.

<table class="center">
<tr>
<td colspan="2">"bear playing guitar happily, snowing"</td>
<td colspan="2">"boy walking on the street"</td>
</tr>
<tr>
<td>
<img src=https://github.com/Doubiiu/DynamiCrafter/blob/main/assets/showcase/guitar0.jpeg_00.png?raw=True width="170">
</td>
<td>
<img src=https://github.com/Doubiiu/DynamiCrafter/blob/main/assets/showcase/guitar0.gif?raw=True width="170">
</td>
<td>
<img src=https://github.com/Doubiiu/DynamiCrafter/blob/main/assets/showcase/walk0.png_00.png?raw=True width="170">
</td>
<td>
<img src=https://github.com/Doubiiu/DynamiCrafter/blob/main/assets/showcase/walk0.gif?raw=True width="170">
</td>
</tr>
</table >

## Notebook contents
This tutorial consists of the following steps:
- Prerequisites
- Load the original model
- Convert the model to OpenVINO IR
- Compiling models
- Building the pipeline
- Interactive inference

## Installation instructions
This is a self-contained example that relies solely on its own code.</br>
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start.
For details, please refer to [Installation Guide](../../README.md).
Loading

0 comments on commit 935c2f8

Please sign in to comment.