Image-to-Video
PyTorch
android
File size: 7,255 Bytes
45f5a12
 
fdc1454
45f5a12
 
 
 
 
 
 
 
8671cc5
45f5a12
 
 
8671cc5
2bf14eb
45f5a12
8671cc5
45f5a12
8671cc5
 
5719e8d
8671cc5
45f5a12
8671cc5
45f5a12
8671cc5
 
2bf14eb
 
45f5a12
8671cc5
45f5a12
 
8671cc5
45f5a12
2bf14eb
8671cc5
 
 
45f5a12
8671cc5
45f5a12
2bf14eb
45f5a12
8671cc5
45f5a12
8671cc5
45f5a12
8671cc5
 
511bd0a
f324b8f
 
45f5a12
8671cc5
 
 
2bf14eb
 
 
 
c714f8b
2bf14eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c714f8b
2bf14eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45f5a12
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
library_name: pytorch
license: mit
tags:
- android
pipeline_tag: image-to-video

---

![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/fomm/web-assets/model_demo.png)

# First-Order-Motion-Model: Optimized for Qualcomm Devices

FOMM is a machine learning model that animates a still image to mirror the movements from a target video.

This is based on the implementation of First-Order-Motion-Model found [here](https://github.com/AliaksandrSiarohin/first-order-model/tree/master).
This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.67.0/src/qai_hub_models/models/fomm) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).

Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device.

## Getting Started
There are two ways to deploy this model on your device:

### Option 1: Download Pre-Exported Models

Below are pre-exported model assets ready for deployment.

| Runtime | Precision | Chipset | SDK Versions | Download |
|---|---|---|---|---|
| ONNX | float | Universal | QAIRT 2.51, ONNX Runtime 1.30.0 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/fomm/releases/v0.67.0/fomm-onnx-float.zip)
| TFLITE | float | Universal | QAIRT 2.51 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/fomm/releases/v0.67.0/fomm-tflite-float.zip)

For more device-specific assets and performance metrics, visit **[First-Order-Motion-Model on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/fomm)**.


### Option 2: Export with Custom Configurations

Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.67.0/src/qai_hub_models/models/fomm) Python library to compile and export the model with your own:
- Custom weights (e.g., fine-tuned checkpoints)
- Custom input shapes
- Target device and runtime configurations

This option is ideal if you need to customize the model beyond the default configuration provided here.

See our repository for [First-Order-Motion-Model on GitHub](https://github.com/qualcomm/ai-hub-models/blob/v0.67.0/src/qai_hub_models/models/fomm) for usage instructions.

## Model Details

**Model Type:** Model_use_case.video_generation

**Model Stats:**
- Input resolution: 256x256
- Model checkpoint: vox-256
- Model size (detector) (float): 54.2 MB
- Model size (generator) (float): 174 MB

## Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit
|---|---|---|---|---|---|---
| detector | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.781 ms | 0 - 29 MB | NPU
| detector | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 2.932 ms | 0 - 30 MB | NPU
| detector | ONNX | float | Snapdragon® X2 Elite | 2.68 ms | 2 - 2 MB | NPU
| detector | ONNX | float | Snapdragon® X Elite | 4.63 ms | 28 - 28 MB | NPU
| detector | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 3.345 ms | 0 - 36 MB | NPU
| detector | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 7.376 ms | 1 - 42 MB | NPU
| detector | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 6.556 ms | 1 - 5 MB | NPU
| detector | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 4.51 ms | 0 - 34 MB | NPU
| detector | ONNX | float | Qualcomm® QCS8450 | 7.376 ms | 1 - 42 MB | NPU
| detector | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 5.676 ms | 1 - 4 MB | NPU
| detector | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 4.63 ms | 28 - 28 MB | NPU
| detector | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 2.932 ms | 0 - 30 MB | NPU
| detector | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 2.392 ms | 1 - 30 MB | NPU
| detector | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 2.529 ms | 1 - 28 MB | NPU
| detector | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 2.729 ms | 0 - 26 MB | NPU
| detector | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 2.881 ms | 0 - 26 MB | NPU
| detector | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 2.881 ms | 0 - 26 MB | NPU
| detector | TFLITE | float | Qualcomm® SA7255P | 21.724 ms | 0 - 26 MB | NPU
| detector | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 2.347 ms | 0 - 26 MB | NPU
| detector | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 2.486 ms | 0 - 27 MB | NPU
| generator | ONNX | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 10.678 ms | 18 - 183 MB | NPU
| generator | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 13.281 ms | 17 - 180 MB | NPU
| generator | ONNX | float | Snapdragon® X2 Elite | 12.348 ms | 23 - 23 MB | NPU
| generator | ONNX | float | Snapdragon® X Elite | 22.198 ms | 89 - 89 MB | NPU
| generator | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 15.907 ms | 0 - 188 MB | NPU
| generator | ONNX | float | Snapdragon® 8 Gen 1 Mobile | 35.904 ms | 17 - 202 MB | NPU
| generator | ONNX | float | Qualcomm® Dragonwing™ IQ-8275 | 37.996 ms | 18 - 23 MB | NPU
| generator | ONNX | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 21.479 ms | 18 - 20 MB | NPU
| generator | ONNX | float | Qualcomm® QCS8450 | 35.904 ms | 17 - 202 MB | NPU
| generator | ONNX | float | Qualcomm® Dragonwing™ IQ-9075 | 34.588 ms | 19 - 23 MB | NPU
| generator | ONNX | float | Qualcomm® Dragonwing™ IQ-X7181 | 22.198 ms | 89 - 89 MB | NPU
| generator | ONNX | float | Qualcomm® Dragonwing™ Q-8750 | 13.281 ms | 17 - 180 MB | NPU
| generator | ONNX | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 8.653 ms | 16 - 173 MB | NPU
| generator | ONNX | float | Snapdragon® 8 Elite Gen 6 Mobile | 9.922 ms | 0 - 156 MB | NPU
| generator | TFLITE | float | Snapdragon® 8 Elite Gen 5 For Galaxy Mobile | 17.399 ms | 1 - 595 MB | NPU
| generator | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 20.977 ms | 0 - 560 MB | NPU
| generator | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 20.977 ms | 0 - 560 MB | NPU
| generator | TFLITE | float | Qualcomm® SA7255P | 2871.232 ms | 21 - 38 MB | CPU
| generator | TFLITE | float | Snapdragon® 8 Elite Extreme Gen 6 Mobile | 14.899 ms | 1 - 626 MB | NPU
| generator | TFLITE | float | Snapdragon® 8 Elite Gen 6 Mobile | 19.29 ms | 1 - 540 MB | NPU

## License
* The license for the original implementation of First-Order-Motion-Model can be found
  [here](https://github.com/AliaksandrSiarohin/first-order-model/blob/master/LICENSE.md).

## References
* [First Order Motion Model for Image Animation](https://arxiv.org/abs/2003.00196)
* [Source Model Implementation](https://github.com/AliaksandrSiarohin/first-order-model/tree/master)

## Community
* Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
* For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).