marlenezw commited on
Commit
22257c4
1 Parent(s): dd70547

changing face alignment and removing its docker file.

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitmodules +3 -0
  2. MakeItTalk/.DS_Store +0 -0
  3. MakeItTalk/.idea/.gitignore +2 -0
  4. MakeItTalk/.idea/MakeItTalk.iml +14 -0
  5. MakeItTalk/.idea/deployment.xml +22 -0
  6. MakeItTalk/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  7. MakeItTalk/.idea/misc.xml +7 -0
  8. MakeItTalk/.idea/modules.xml +8 -0
  9. MakeItTalk/.idea/remote-mappings.xml +16 -0
  10. MakeItTalk/.idea/vcs.xml +8 -0
  11. MakeItTalk/.ipynb_checkpoints/default-4ec17270-11b4-4718-86f3-8d1d348ae399-checkpoint.ipynb +6 -0
  12. MakeItTalk/.ipynb_checkpoints/default-76a81f5d-f4d0-4319-9e7b-74ebb7c9fd04-checkpoint.ipynb +6 -0
  13. MakeItTalk/.ipynb_checkpoints/default-7f93f412-0c92-4f62-a5a6-2d1f347fc303-checkpoint.ipynb +6 -0
  14. MakeItTalk/.ipynb_checkpoints/default-9467656a-4497-492f-8641-8461166897bb-checkpoint.ipynb +6 -0
  15. MakeItTalk/.ipynb_checkpoints/default-a117106a-6fff-4021-9ff4-f12948d5b152-checkpoint.ipynb +6 -0
  16. MakeItTalk/.ipynb_checkpoints/default-c7165d9a-515a-4b8a-918e-10a693ab77e0-checkpoint.ipynb +6 -0
  17. MakeItTalk/.ipynb_checkpoints/default-d2a2ec1a-c00c-4d54-a176-a2fdd9e80401-checkpoint.ipynb +6 -0
  18. MakeItTalk/.ipynb_checkpoints/default-dc2b1c78-9ea0-4efd-82ed-617b467184aa-checkpoint.ipynb +6 -0
  19. MakeItTalk/.vs/CMakeWorkspaceSettings.json +3 -0
  20. MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/458912a1-7520-417f-9226-526dc56d2846.vsidx +0 -0
  21. MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/6c70f8bd-b9ab-4f19-b752-845a2302f68d.vsidx +0 -0
  22. MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/8b11ef0c-8174-4e33-b8f1-cba6e4ee5f22.vsidx +0 -0
  23. MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/read.lock +0 -0
  24. MakeItTalk/.vs/MakeItTalk-main/v17/.wsuo +0 -0
  25. MakeItTalk/.vs/MakeItTalk-main/v17/Browse.VC.db +0 -0
  26. MakeItTalk/.vs/MakeItTalk-main/v17/workspaceFileList.bin +3 -0
  27. MakeItTalk/.vs/ProjectSettings.json +3 -0
  28. MakeItTalk/.vs/VSWorkspaceState.json +9 -0
  29. MakeItTalk/.vs/slnx.sqlite +0 -0
  30. MakeItTalk/CODE_OF_CONDUCT.md +74 -0
  31. MakeItTalk/CONTRIBUTING.md +47 -0
  32. MakeItTalk/LICENSE.md +159 -0
  33. MakeItTalk/PULL_REQUEST_TEMPLATE.md +45 -0
  34. MakeItTalk/README.md +185 -0
  35. MakeItTalk/_._/MakeItTalk-main/._MakeItTalk-main_in_audio.wav +0 -0
  36. MakeItTalk/_._/MakeItTalk-main/examples/._MakeItTalk-main_examples_in_image.jpg +0 -0
  37. MakeItTalk/_._/MakeItTalk/examples/._MakeItTalk_examples_in_audio.wav +0 -0
  38. MakeItTalk/_._/MakeItTalk/examples/._MakeItTalk_examples_in_image.jpg +0 -0
  39. MakeItTalk/__pycache__/animation_app.cpython-37.pyc +0 -0
  40. MakeItTalk/animated.py +277 -0
  41. MakeItTalk/app.py +38 -0
  42. MakeItTalk/doc/__init__.py +0 -0
  43. MakeItTalk/doc/landmark_adjust.png +0 -0
  44. MakeItTalk/doc/landmark_closemouth.png +0 -0
  45. MakeItTalk/doc/landmark_delauney.png +0 -0
  46. MakeItTalk/doc/teaser.png +0 -0
  47. MakeItTalk/examples/.DS_Store +0 -0
  48. MakeItTalk/examples/327-3275260_leonardo-dicaprio-png-famous-actor.png +0 -0
  49. MakeItTalk/examples/angelina.jpg +0 -0
  50. MakeItTalk/examples/anne.jpg +0 -0
.gitmodules ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [submodule "face-alignment"]
2
+ path = face-alignment
3
+ url = https://github.com/1adrianb/face-alignment
MakeItTalk/.DS_Store ADDED
Binary file (10.2 kB). View file
 
MakeItTalk/.idea/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # Default ignored files
2
+ /workspace.xml
MakeItTalk/.idea/MakeItTalk.iml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <sourceFolder url="file://$MODULE_DIR$/thirdparty/Wav2Lip_util/face_detection" isTestSource="false" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="Python 3.6 (makeittalk_env)" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="PyDocumentationSettings">
11
+ <option name="format" value="PLAIN" />
12
+ <option name="myDocStringFormat" value="Plain" />
13
+ </component>
14
+ </module>
MakeItTalk/.idea/deployment.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PublishConfigData" autoUpload="Always" serverName="[email protected]:22" autoUploadExternalChanges="true" showNewOnSourceInSync="false">
4
+ <serverData>
5
+ <paths name="Copy of project-level server 'makeittalk@stargazer'">
6
+ <serverdata>
7
+ <mappings>
8
+ <mapping deploy="/" local="$PROJECT_DIR$" web="/" />
9
+ </mappings>
10
+ </serverdata>
11
+ </paths>
12
+ <paths name="[email protected]:22">
13
+ <serverdata>
14
+ <mappings>
15
+ <mapping deploy="/home/yangzhou/Documents/Git/MakeItTalk_offical_repo_remote" local="$PROJECT_DIR$" />
16
+ </mappings>
17
+ </serverdata>
18
+ </paths>
19
+ </serverData>
20
+ <option name="myAutoUpload" value="ALWAYS" />
21
+ </component>
22
+ </project>
MakeItTalk/.idea/inspectionProfiles/profiles_settings.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
MakeItTalk/.idea/misc.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptSettings">
4
+ <option name="languageLevel" value="ES6" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (makeittalk_env)" project-jdk-type="Python SDK" />
7
+ </project>
MakeItTalk/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/MakeItTalk.iml" filepath="$PROJECT_DIR$/.idea/MakeItTalk.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
MakeItTalk/.idea/remote-mappings.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="RemoteMappingsManager">
4
+ <list>
5
+ <list>
6
+ <remote-mappings server-id="python@sftp://[email protected]:22/home/yangzhou/anaconda2/envs/makeittalk_env/bin/python">
7
+ <settings>
8
+ <list>
9
+ <mapping local-root="$PROJECT_DIR$" remote-root="/home/yangzhou/Documents/Git/MakeItTalk_offical_repo_remote" />
10
+ </list>
11
+ </settings>
12
+ </remote-mappings>
13
+ </list>
14
+ </list>
15
+ </component>
16
+ </project>
MakeItTalk/.idea/vcs.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$/thirdparty/face-of-art" vcs="Git" />
6
+ <mapping directory="$PROJECT_DIR$/thirdparty/face_of_art" vcs="Git" />
7
+ </component>
8
+ </project>
MakeItTalk/.ipynb_checkpoints/default-4ec17270-11b4-4718-86f3-8d1d348ae399-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-76a81f5d-f4d0-4319-9e7b-74ebb7c9fd04-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-7f93f412-0c92-4f62-a5a6-2d1f347fc303-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-9467656a-4497-492f-8641-8461166897bb-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-a117106a-6fff-4021-9ff4-f12948d5b152-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-c7165d9a-515a-4b8a-918e-10a693ab77e0-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-d2a2ec1a-c00c-4d54-a176-a2fdd9e80401-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.ipynb_checkpoints/default-dc2b1c78-9ea0-4efd-82ed-617b467184aa-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
MakeItTalk/.vs/CMakeWorkspaceSettings.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "enableCMake": false
3
+ }
MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/458912a1-7520-417f-9226-526dc56d2846.vsidx ADDED
Binary file (678 kB). View file
 
MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/6c70f8bd-b9ab-4f19-b752-845a2302f68d.vsidx ADDED
Binary file (697 kB). View file
 
MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/8b11ef0c-8174-4e33-b8f1-cba6e4ee5f22.vsidx ADDED
Binary file (851 kB). View file
 
MakeItTalk/.vs/MakeItTalk-main/FileContentIndex/read.lock ADDED
File without changes
MakeItTalk/.vs/MakeItTalk-main/v17/.wsuo ADDED
Binary file (59.9 kB). View file
 
MakeItTalk/.vs/MakeItTalk-main/v17/Browse.VC.db ADDED
Binary file (508 kB). View file
 
MakeItTalk/.vs/MakeItTalk-main/v17/workspaceFileList.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb2a1c58f37407cdaf9b26f6747db327bcb769c600b18e0ff04cbfceed9df10d
3
+ size 65916
MakeItTalk/.vs/ProjectSettings.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "CurrentProjectSetting": "No Configurations"
3
+ }
MakeItTalk/.vs/VSWorkspaceState.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "ExpandedNodes": [
3
+ "",
4
+ "\\src",
5
+ "\\src\\models"
6
+ ],
7
+ "SelectedNode": "\\src\\models\\model_audio2landmark.py",
8
+ "PreviewInSolutionExplorer": false
9
+ }
MakeItTalk/.vs/slnx.sqlite ADDED
Binary file (188 kB). View file
 
MakeItTalk/CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Adobe Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language.
18
+ * Being respectful of differing viewpoints and experiences.
19
+ * Gracefully accepting constructive criticism.
20
+ * Focusing on what is best for the community.
21
+ * Showing empathy towards other community members.
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances.
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks.
28
+ * Public or private harassment.
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission.
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting.
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at [email protected]. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version].
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
MakeItTalk/CONTRIBUTING.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing
2
+
3
+ Thanks for choosing to contribute!
4
+
5
+ The following are a set of guidelines to follow when contributing to this project.
6
+
7
+ ## Code Of Conduct
8
+
9
+ This project adheres to the Adobe [code of conduct](../CODE_OF_CONDUCT.md). By participating,
10
+ you are expected to uphold this code. Please report unacceptable behavior to
11
12
+
13
+ ## Have A Question?
14
+
15
+ Start by filing an issue. The existing committers on this project work to reach
16
+ consensus around project direction and issue solutions within issue threads
17
+ (when appropriate).
18
+
19
+ ## Contributor License Agreement
20
+
21
+ All third-party contributions to this project must be accompanied by a signed contributor
22
+ license agreement. This gives Adobe permission to redistribute your contributions
23
+ as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You
24
+ only need to submit an Adobe CLA one time, so if you have submitted one previously,
25
+ you are good to go!
26
+
27
+ ## Code Reviews
28
+
29
+ All submissions should come in the form of pull requests and need to be reviewed
30
+ by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/)
31
+ for more information on sending pull requests.
32
+
33
+ Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when
34
+ submitting a pull request!
35
+
36
+ ## From Contributor To Committer
37
+
38
+ We love contributions from our community! If you'd like to go a step beyond contributor
39
+ and become a committer with full write access and a say in the project, you must
40
+ be invited to the project. The existing committers employ an internal nomination
41
+ process that must reach lazy consensus (silence is approval) before invitations
42
+ are issued. If you feel you are qualified and want to get more deeply involved,
43
+ feel free to reach out to existing committers to have a conversation about that.
44
+
45
+ ## Security Issues
46
+
47
+ Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).
MakeItTalk/LICENSE.md ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Creative Commons Attribution-NonCommercial 4.0 International
2
+
3
+ Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
4
+
5
+ ### Using Creative Commons Public Licenses
6
+
7
+ Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
8
+
9
+ * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
10
+
11
+ * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
12
+
13
+ ## Creative Commons Attribution-NonCommercial 4.0 International Public License
14
+
15
+ By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
16
+
17
+ ### Section 1 – Definitions.
18
+
19
+ a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
20
+
21
+ b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
22
+
23
+ c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
24
+
25
+ d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
26
+
27
+ e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
28
+
29
+ f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
30
+
31
+ g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
32
+
33
+ h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
34
+
35
+ i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
36
+
37
+ j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
38
+
39
+ k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
40
+
41
+ l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. __Your__ has a corresponding meaning.
42
+
43
+ ### Section 2 – Scope.
44
+
45
+ a. ___License grant.___
46
+
47
+ 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
48
+
49
+ A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
50
+
51
+ B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
52
+
53
+ 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
54
+
55
+ 3. __Term.__ The term of this Public License is specified in Section 6(a).
56
+
57
+ 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
58
+
59
+ 5. __Downstream recipients.__
60
+
61
+ A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
62
+
63
+ B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
64
+
65
+ 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
66
+
67
+ b. ___Other rights.___
68
+
69
+ 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
70
+
71
+ 2. Patent and trademark rights are not licensed under this Public License.
72
+
73
+ 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
74
+
75
+ ### Section 3 – License Conditions.
76
+
77
+ Your exercise of the Licensed Rights is expressly made subject to the following conditions.
78
+
79
+ a. ___Attribution.___
80
+
81
+ 1. If You Share the Licensed Material (including in modified form), You must:
82
+
83
+ A. retain the following if it is supplied by the Licensor with the Licensed Material:
84
+
85
+ i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
86
+
87
+ ii. a copyright notice;
88
+
89
+ iii. a notice that refers to this Public License;
90
+
91
+ iv. a notice that refers to the disclaimer of warranties;
92
+
93
+ v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
94
+
95
+ B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
96
+
97
+ C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
98
+
99
+ 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
100
+
101
+ 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
102
+
103
+ 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
104
+
105
+ ### Section 4 – Sui Generis Database Rights.
106
+
107
+ Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
108
+
109
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
110
+
111
+ b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
112
+
113
+ c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
114
+
115
+ For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
116
+
117
+ ### Section 5 – Disclaimer of Warranties and Limitation of Liability.
118
+
119
+ a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
120
+
121
+ b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
122
+
123
+ c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
124
+
125
+ ### Section 6 – Term and Termination.
126
+
127
+ a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
128
+
129
+ b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
130
+
131
+ 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
132
+
133
+ 2. upon express reinstatement by the Licensor.
134
+
135
+ For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
136
+
137
+ c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
138
+
139
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
140
+
141
+ ### Section 7 – Other Terms and Conditions.
142
+
143
+ a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
144
+
145
+ b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
146
+
147
+ ### Section 8 – Interpretation.
148
+
149
+ a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
150
+
151
+ b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
152
+
153
+ c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
154
+
155
+ d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
156
+
157
+ > Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
158
+ >
159
+ > Creative Commons may be contacted at creativecommons.org
MakeItTalk/PULL_REQUEST_TEMPLATE.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--- Provide a general summary of your changes in the Title above -->
2
+
3
+ ## Description
4
+
5
+ <!--- Describe your changes in detail -->
6
+
7
+ ## Related Issue
8
+
9
+ <!--- This project only accepts pull requests related to open issues -->
10
+ <!--- If suggesting a new feature or change, please discuss it in an issue first -->
11
+ <!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
12
+ <!--- Please link to the issue here: -->
13
+
14
+ ## Motivation and Context
15
+
16
+ <!--- Why is this change required? What problem does it solve? -->
17
+
18
+ ## How Has This Been Tested?
19
+
20
+ <!--- Please describe in detail how you tested your changes. -->
21
+ <!--- Include details of your testing environment, and the tests you ran to -->
22
+ <!--- see how your change affects other areas of the code, etc. -->
23
+
24
+ ## Screenshots (if appropriate):
25
+
26
+ ## Types of changes
27
+
28
+ <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
29
+
30
+ - [ ] Bug fix (non-breaking change which fixes an issue)
31
+ - [ ] New feature (non-breaking change which adds functionality)
32
+ - [ ] Breaking change (fix or feature that would cause existing functionality to change)
33
+
34
+ ## Checklist:
35
+
36
+ <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
37
+ <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
38
+
39
+ - [ ] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html).
40
+ - [ ] My code follows the code style of this project.
41
+ - [ ] My change requires a change to the documentation.
42
+ - [ ] I have updated the documentation accordingly.
43
+ - [ ] I have read the **CONTRIBUTING** document.
44
+ - [ ] I have added tests to cover my changes.
45
+ - [ ] All new and existing tests passed.
MakeItTalk/README.md ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MakeItTalk: Speaker-Aware Talking-Head Animation
2
+
3
+ This is the code repository implementing the paper:
4
+
5
+ > **MakeItTalk: Speaker-Aware Talking-Head Animation**
6
+ >
7
+ > [Yang Zhou](https://people.umass.edu/~yangzhou),
8
+ > [Xintong Han](http://users.umiacs.umd.edu/~xintong/),
9
+ > [Eli Shechtman](https://research.adobe.com/person/eli-shechtman),
10
+ > [Jose Echevarria](http://www.jiechevarria.com) ,
11
+ > [Evangelos Kalogerakis](https://people.cs.umass.edu/~kalo/),
12
+ > [Dingzeyu Li](https://dingzeyu.li)
13
+ >
14
+ > SIGGRAPH Asia 2020
15
+ >
16
+ > **Abstract** We present a method that generates expressive talking-head videos from a single facial image with audio as the only input. In contrast to previous attempts to learn direct mappings from audio to raw pixels for creating talking faces, our method first disentangles the content and speaker information in the input audio signal. The audio content robustly controls the motion of lips and nearby facial regions, while the speaker information determines the specifics of facial expressions and the rest of the talking-head dynamics. Another key component of our method is the prediction of facial landmarks reflecting the speaker-aware dynamics. Based on this intermediate representation, our method works with many portrait images in a single unified framework, including artistic paintings, sketches, 2D cartoon characters, Japanese mangas, and stylized caricatures.
17
+ In addition, our method generalizes well for faces and characters that were not observed during training. We present extensive quantitative and qualitative evaluation of our method, in addition to user studies, demonstrating generated talking-heads of significantly higher quality compared to prior state-of-the-art methods.
18
+ >
19
+ > [[Project page]](https://people.umass.edu/~yangzhou/MakeItTalk/)
20
+ > [[Paper]](https://people.umass.edu/~yangzhou/MakeItTalk/MakeItTalk_SIGGRAPH_Asia_Final_round-5.pdf)
21
+ > [[Video]](https://www.youtube.com/watch?v=OU6Ctzhpc6s)
22
+ > [[Arxiv]](https://arxiv.org/abs/2004.12992)
23
+ > [[Colab Demo]](quick_demo.ipynb)
24
+ > [[Colab Demo TDLR]](quick_demo_tdlr.ipynb)
25
+
26
+ ![img](doc/teaser.png)
27
+
28
+ Figure. Given an audio speech signal and a single portrait image as input (left), our model generates speaker-aware talking-head animations (right).
29
+ Both the speech signal and the input face image are not observed during the model training process.
30
+ Our method creates both non-photorealistic cartoon animations (top) and natural human face videos (bottom).
31
+
32
+ ## Updates
33
+
34
+ - [x] Generate new puppet! (tested on Ubuntu)
35
+ - [x] Pre-trained models
36
+ - [x] Google colab quick demo for natural faces [[detail]](quick_demo.ipynb) [[TDLR]](quick_demo_tdlr.ipynb)
37
+ - [ ] Training code for each module
38
+
39
+ ## Requirements
40
+ - Python environment 3.6
41
+ ```
42
+ conda create -n makeittalk_env python=3.6
43
+ conda activate makeittalk_env
44
+ ```
45
+ - ffmpeg (https://ffmpeg.org/download.html)
46
+ ```
47
+ sudo apt-get install ffmpeg
48
+ ```
49
+ - python packages
50
+ ```
51
+ pip install -r requirements.txt
52
+ ```
53
+ - `winehq-stable` for cartoon face warping in Ubuntu (https://wiki.winehq.org/Ubuntu). Tested on Ubuntu16.04, wine==5.0.3.
54
+ ```
55
+ sudo dpkg --add-architecture i386
56
+ wget -nc https://dl.winehq.org/wine-builds/winehq.key
57
+ sudo apt-key add winehq.key
58
+ sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
59
+ sudo apt update
60
+ sudo apt install --install-recommends winehq-stable
61
+ ```
62
+
63
+ ## Pre-trained Models
64
+
65
+ Download the following pre-trained models to `MakeItTalk/examples/ckpt` folder for testing your own animation.
66
+
67
+ | Model | Link to the model |
68
+ | :-------------: | :---------------: |
69
+ | Voice Conversion | [Link](https://drive.google.com/file/d/1ZiwPp_h62LtjU0DwpelLUoodKPR85K7x/view?usp=sharing) |
70
+ | Speech Content Module | [Link](https://drive.google.com/file/d/1r3bfEvTVl6pCNw5xwUhEglwDHjWtAqQp/view?usp=sharing) |
71
+ | Speaker-aware Module | [Link](https://drive.google.com/file/d/1rV0jkyDqPW-aDJcj7xSO6Zt1zSXqn1mu/view?usp=sharing) |
72
+ | Image2Image Translation Module | [Link](https://drive.google.com/file/d/1i2LJXKp-yWKIEEgJ7C6cE3_2NirfY_0a/view?usp=sharing) |
73
+ | Non-photorealistic Warping (.exe) | [Link](https://drive.google.com/file/d/1rlj0PAUMdX8TLuywsn6ds_G6L63nAu0P/view?usp=sharing) |
74
+
75
+ ## Animate You Portraits!
76
+
77
+ - Download pre-trained embedding [[here]](https://drive.google.com/file/d/18-0CYl5E6ungS3H4rRSHjfYvvm-WwjTI/view?usp=sharing) and save to `MakeItTalk/examples/dump` folder.
78
+
79
+ ### _Nature Human Faces / Paintings_
80
+
81
+ - crop your portrait image into size `256x256` and put it under `examples` folder with `.jpg` format.
82
+ Make sure the head is almost in the middle (check existing examples for a reference).
83
+
84
+ - put test audio files under `examples` folder as well with `.wav` format.
85
+
86
+ - animate!
87
+
88
+ ```
89
+ python main_end2end.py --jpg <portrait_file>
90
+ ```
91
+
92
+ - use addition args `--amp_lip_x <x> --amp_lip_y <y> --amp_pos <pos>`
93
+ to amply lip motion (in x/y-axis direction) and head motion displacements, default values are `<x>=2., <y>=2., <pos>=.5`
94
+
95
+
96
+
97
+ ### _Cartoon Faces_
98
+
99
+ - put test audio files under `examples` folder as well with `.wav` format.
100
+
101
+ - animate one of the existing puppets
102
+
103
+ | Puppet Name | wilk | smiling_person | sketch | color | cartoonM | danbooru1 |
104
+ | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
105
+ | Image | ![img](examples_cartoon/wilk_fullbody.jpg) | ![img](examples_cartoon/smiling_person_full.png) | ![img](examples_cartoon/sketch.png) | ![img](examples_cartoon/color.jpg) | ![img](examples_cartoon/cartoonM.png) | ![img](examples_cartoon/danbooru1.jpg) |
106
+
107
+ ```
108
+ python main_end2end_cartoon.py --jpg <cartoon_puppet_name_with_extension> --jpg_bg <puppet_background_with_extension>
109
+ ```
110
+
111
+ - `--jpg_bg` takes a same-size image as the background image to create the animation, such as the puppet's body, the overall fixed background image. If you want to use the background, make sure the puppet face image (i.e. `--jpg` image) is in `png` format and is transparent on the non-face area. If you don't need any background, please also create a same-size image (e.g. a pure white image) to hold the argument place.
112
+
113
+ - use addition args `--amp_lip_x <x> --amp_lip_y <y> --amp_pos <pos>`
114
+ to amply lip motion (in x/y-axis direction) and head motion displacements, default values are `<x>=2., <y>=2., <pos>=.5`
115
+
116
+ ### _Generate Your New Puppet_
117
+
118
+ - put the cartoon image under `examples_cartoon`
119
+
120
+ - install conda environment `foa_env_py2` (tested on python 2) for Face-of-art (https://github.com/papulke/face-of-art).
121
+ Download the pre-trained weight [here](https://www.dropbox.com/sh/hrxcyug1bmbj6cs/AAAxq_zI5eawcLjM8zvUwaXha?dl=0) and put it under `MakeItTalk/examples/ckpt`.
122
+ Activate the environment.
123
+
124
+ ```
125
+ source activate foa_env_py2
126
+ ```
127
+
128
+ - create necessary files to animate your cartoon image, i.e.
129
+ `<your_puppet>_open_mouth.txt`, `<your_puppet>_close_mouth.txt`, `<your_puppet>_open_mouth_norm.txt`, `<your_puppet>_scale_shift.txt`, `<your_puppet>_delauney.txt`
130
+
131
+ ```
132
+ python main_gen_new_puppet.py <your_puppet_with_file_extension>
133
+ ```
134
+
135
+ - in details, it takes 3 steps
136
+ - Face-of-art automatic cartoon landmark detection.
137
+ - If it's wrong or not accurate, you can use our tool to drag and refine the landmarks.
138
+ - Estimate the closed mouth landmarks to serve as network input.
139
+ - Delauney triangulate the image with landmarks.
140
+
141
+ - check puppet name `smiling_person_example.png` for an example.
142
+
143
+ | ![img](doc/landmark_adjust.png) | ![img](doc/landmark_closemouth.png) | ![img](doc/landmark_delauney.png)
144
+ | :---: | :---: | :---: |
145
+ | Landmark Adjustment Tool | Closed lips estimation | Delaunay Triangulation |
146
+
147
+ ## Train
148
+
149
+ ### Train Voice Conversion Module
150
+ Todo...
151
+
152
+ ### Train Content Branch
153
+ - Create dataset root directory `<root_dir>`
154
+
155
+ - Dataset: Download preprocessed dataset [[here]](https://drive.google.com/drive/folders/1EwuAy3j1b9Zc1MsidUfxG_pJGc_cV60O?usp=sharing), and put it under `<root_dir>/dump`.
156
+
157
+ - Train script: Run script below. Models will be saved in `<root_dir>/ckpt/<train_instance_name>`.
158
+
159
+ ```shell script
160
+ python main_train_content.py --train --write --root_dir <root_dir> --name <train_instance_name>
161
+ ```
162
+
163
+ ### Train Speaker-Aware Branch
164
+ Todo...
165
+
166
+ ### Train Image-to-Image Translation
167
+
168
+ Todo...
169
+
170
+ ## [License](LICENSE.md)
171
+
172
+ ## Acknowledgement
173
+
174
+ We would like to thank Timothy Langlois for the narration, and
175
+ [Kaizhi Qian](https://scholar.google.com/citations?user=uEpr4C4AAAAJ&hl=en)
176
+ for the help with the [voice conversion module](https://auspicious3000.github.io/icassp-2020-demo/).
177
+ We thank [Jakub Fiser](https://research.adobe.com/person/jakub-fiser/) for implementing the real-time GPU version of the triangle morphing algorithm.
178
+ We thank Daichi Ito for sharing the caricature image and Dave Werner
179
+ for Wilk, the gruff but ultimately lovable puppet.
180
+
181
+ This research is partially funded by NSF (EAGER-1942069)
182
+ and a gift from Adobe. Our experiments were performed in the
183
+ UMass GPU cluster obtained under the Collaborative Fund managed
184
+ by the MassTech Collaborative.
185
+
MakeItTalk/_._/MakeItTalk-main/._MakeItTalk-main_in_audio.wav ADDED
Binary file (156 kB). View file
 
MakeItTalk/_._/MakeItTalk-main/examples/._MakeItTalk-main_examples_in_image.jpg ADDED
MakeItTalk/_._/MakeItTalk/examples/._MakeItTalk_examples_in_audio.wav ADDED
Binary file (156 kB). View file
 
MakeItTalk/_._/MakeItTalk/examples/._MakeItTalk_examples_in_image.jpg ADDED
MakeItTalk/__pycache__/animation_app.cpython-37.pyc ADDED
Binary file (1.19 kB). View file
 
MakeItTalk/animated.py ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # To add a new cell, type '# %%'
3
+ # To add a new markdown cell, type '# %% [markdown]'
4
+ # %%
5
+ import torch
6
+
7
+ # this ensures that the current MacOS version is at least 12.3+
8
+ print(torch.backends.mps.is_available())
9
+ # this ensures that the current current PyTorch installation was built with MPS activated.
10
+ print(torch.backends.mps.is_built())
11
+
12
+
13
+ # %%
14
+ import ipywidgets as widgets
15
+ import glob
16
+ import matplotlib.pyplot as plt
17
+ print("Choose the image name to animate: (saved in folder 'MakeItTalk/examples/')")
18
+ img_list = glob.glob1('examples', '*.jpg')
19
+ img_list.sort()
20
+ img_list = [item.split('.')[0] for item in img_list]
21
+ default_head_name = widgets.Dropdown(options=img_list, value='marlene_v2')
22
+ def on_change(change):
23
+ if change['type'] == 'change' and change['name'] == 'value':
24
+ plt.imshow(plt.imread('MakeItTalk/examples/{}.jpg'.format(default_head_name.value)))
25
+ plt.axis('off')
26
+ plt.show()
27
+ default_head_name.observe(on_change)
28
+ display(default_head_name)
29
+ plt.imshow(plt.imread('MakeItTalk/examples/{}.jpg'.format(default_head_name.value)))
30
+ plt.axis('off')
31
+ plt.show()
32
+
33
+
34
+ # %%
35
+ #@markdown # Animation Controllers
36
+ #@markdown Amplify the lip motion in horizontal direction
37
+ AMP_LIP_SHAPE_X = 2 #@param {type:"slider", min:0.5, max:5.0, step:0.1}
38
+
39
+ #@markdown Amplify the lip motion in vertical direction
40
+ AMP_LIP_SHAPE_Y = 2 #@param {type:"slider", min:0.5, max:5.0, step:0.1}
41
+
42
+ #@markdown Amplify the head pose motion (usually smaller than 1.0, put it to 0. for a static head pose)
43
+ AMP_HEAD_POSE_MOTION = 0.35 #@param {type:"slider", min:0.0, max:1.0, step:0.05}
44
+
45
+ #@markdown Add naive eye blink
46
+ ADD_NAIVE_EYE = True #@param ["False", "True"] {type:"raw"}
47
+
48
+ #@markdown If your image has an opened mouth, put this as True, else False
49
+ CLOSE_INPUT_FACE_MOUTH = True #@param ["False", "True"] {type:"raw"}
50
+
51
+
52
+ #@markdown # Landmark Adjustment
53
+
54
+ #@markdown Adjust upper lip thickness (postive value means thicker)
55
+ UPPER_LIP_ADJUST = -1 #@param {type:"slider", min:-3.0, max:3.0, step:1.0}
56
+
57
+ #@markdown Adjust lower lip thickness (postive value means thicker)
58
+ LOWER_LIP_ADJUST = -1 #@param {type:"slider", min:-3.0, max:3.0, step:1.0}
59
+
60
+ #@markdown Adjust static lip width (in multipication)
61
+ LIP_WIDTH_ADJUST = 1.0 #@param {type:"slider", min:0.8, max:1.2, step:0.01}
62
+
63
+
64
+ # %%
65
+ import sys
66
+ sys.path.append("thirdparty/AdaptiveWingLoss")
67
+ import os, glob
68
+ import numpy as np
69
+ import cv2
70
+ import argparse
71
+ from src.approaches.train_image_translation import Image_translation_block
72
+ import torch
73
+ import pickle
74
+ import face_alignment
75
+ from face_alignment import face_alignment
76
+ from src.autovc.AutoVC_mel_Convertor_retrain_version import AutoVC_mel_Convertor
77
+ import shutil
78
+ import time
79
+ import util.utils as util
80
+ from scipy.signal import savgol_filter
81
+ from src.approaches.train_audio2landmark import Audio2landmark_model
82
+
83
+
84
+ # %%
85
+ sys.stdout = open(os.devnull, 'a')
86
+
87
+ parser = argparse.ArgumentParser()
88
+ parser.add_argument('--jpg', type=str, default='{}.jpg'.format(default_head_name.value))
89
+ parser.add_argument('--close_input_face_mouth', default=CLOSE_INPUT_FACE_MOUTH, action='store_true')
90
+ parser.add_argument('--load_AUTOVC_name', type=str, default='MakeItTalk/examples/ckpt/ckpt_autovc.pth')
91
+ parser.add_argument('--load_a2l_G_name', type=str, default='MakeItTalk/examples/ckpt/ckpt_speaker_branch.pth')
92
+ parser.add_argument('--load_a2l_C_name', type=str, default='MakeItTalk/examples/ckpt/ckpt_content_branch.pth') #ckpt_audio2landmark_c.pth')
93
+ parser.add_argument('--load_G_name', type=str, default='MakeItTalk/examples/ckpt/ckpt_116_i2i_comb.pth') #ckpt_image2image.pth') #ckpt_i2i_finetune_150.pth') #c
94
+ parser.add_argument('--amp_lip_x', type=float, default=AMP_LIP_SHAPE_X)
95
+ parser.add_argument('--amp_lip_y', type=float, default=AMP_LIP_SHAPE_Y)
96
+ parser.add_argument('--amp_pos', type=float, default=AMP_HEAD_POSE_MOTION)
97
+ parser.add_argument('--reuse_train_emb_list', type=str, nargs='+', default=[]) # ['iWeklsXc0H8']) #['45hn7-LXDX8']) #['E_kmpT-EfOg']) #'iWeklsXc0H8', '29k8RtSUjE0', '45hn7-LXDX8',
98
+ parser.add_argument('--add_audio_in', default=False, action='store_true')
99
+ parser.add_argument('--comb_fan_awing', default=False, action='store_true')
100
+ parser.add_argument('--output_folder', type=str, default='examples')
101
+ parser.add_argument('--test_end2end', default=True, action='store_true')
102
+ parser.add_argument('--dump_dir', type=str, default='', help='')
103
+ parser.add_argument('--pos_dim', default=7, type=int)
104
+ parser.add_argument('--use_prior_net', default=True, action='store_true')
105
+ parser.add_argument('--transformer_d_model', default=32, type=int)
106
+ parser.add_argument('--transformer_N', default=2, type=int)
107
+ parser.add_argument('--transformer_heads', default=2, type=int)
108
+ parser.add_argument('--spk_emb_enc_size', default=16, type=int)
109
+ parser.add_argument('--init_content_encoder', type=str, default='')
110
+ parser.add_argument('--lr', type=float, default=1e-3, help='learning rate')
111
+ parser.add_argument('--reg_lr', type=float, default=1e-6, help='weight decay')
112
+ parser.add_argument('--write', default=False, action='store_true')
113
+ parser.add_argument('--segment_batch_size', type=int, default=1, help='batch size')
114
+ parser.add_argument('--emb_coef', default=3.0, type=float)
115
+ parser.add_argument('--lambda_laplacian_smooth_loss', default=1.0, type=float)
116
+ parser.add_argument('--use_11spk_only', default=False, action='store_true')
117
+ parser.add_argument('-f')
118
+ opt_parser = parser.parse_args()
119
+
120
+
121
+ # %%
122
+ img = cv2.imread('MakeItTalk/examples/' + opt_parser.jpg)
123
+ plt.imshow(img)
124
+
125
+
126
+ # %%
127
+ predictor = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='mps', flip_input=True)
128
+ shapes = predictor.get_landmarks(img)
129
+ if (not shapes or len(shapes) != 1):
130
+ print('Cannot detect face landmarks. Exit.')
131
+ exit(-1)
132
+ shape_3d = shapes[0]
133
+
134
+
135
+ # %%
136
+ if(opt_parser.close_input_face_mouth):
137
+ util.close_input_face_mouth(shape_3d)
138
+ shape_3d[48:, 0] = (shape_3d[48:, 0] - np.mean(shape_3d[48:, 0])) * LIP_WIDTH_ADJUST + np.mean(shape_3d[48:, 0]) # wider lips
139
+ shape_3d[49:54, 1] -= UPPER_LIP_ADJUST # thinner upper lip
140
+ shape_3d[55:60, 1] += LOWER_LIP_ADJUST # thinner lower lip
141
+ shape_3d[[37,38,43,44], 1] -=2. # larger eyes
142
+ shape_3d[[40,41,46,47], 1] +=2. # larger eyes
143
+ shape_3d, scale, shift = util.norm_input_face(shape_3d)
144
+
145
+ print("Loaded Image...", file=sys.stderr)
146
+
147
+
148
+ # %%
149
+ au_data = []
150
+ au_emb = []
151
+ ains = glob.glob1('examples', '*.wav')
152
+ ains = [item for item in ains if item != 'tmp.wav']
153
+ ains.sort()
154
+ for ain in ains:
155
+ os.system('ffmpeg -y -loglevel error -i MakeItTalk/examples/{} -ar 16000 MakeItTalk/examples/tmp.wav'.format(ain))
156
+ shutil.copyfile('MakeItTalk/examples/tmp.wav', 'MakeItTalk/examples/{}'.format(ain))
157
+
158
+ # au embedding
159
+ from thirdparty.resemblyer_util.speaker_emb import get_spk_emb
160
+ me, ae = get_spk_emb('MakeItTalk/examples/{}'.format(ain))
161
+ au_emb.append(me.reshape(-1))
162
+
163
+ print('Processing audio file', ain)
164
+ c = AutoVC_mel_Convertor('examples')
165
+
166
+ au_data_i = c.convert_single_wav_to_autovc_input(audio_filename=os.path.join('examples', ain),
167
+ autovc_model_path=opt_parser.load_AUTOVC_name)
168
+ au_data += au_data_i
169
+ if(os.path.isfile('MakeItTalk/examples/tmp.wav')):
170
+ os.remove('MakeItTalk/examples/tmp.wav')
171
+
172
+ print("Loaded audio...", file=sys.stderr)
173
+
174
+
175
+
176
+ # %%
177
+ # landmark fake placeholder
178
+ fl_data = []
179
+ rot_tran, rot_quat, anchor_t_shape = [], [], []
180
+ for au, info in au_data:
181
+ au_length = au.shape[0]
182
+ fl = np.zeros(shape=(au_length, 68 * 3))
183
+ fl_data.append((fl, info))
184
+ rot_tran.append(np.zeros(shape=(au_length, 3, 4)))
185
+ rot_quat.append(np.zeros(shape=(au_length, 4)))
186
+ anchor_t_shape.append(np.zeros(shape=(au_length, 68 * 3)))
187
+
188
+ if(os.path.exists(os.path.join('examples', 'dump', 'random_val_fl.pickle'))):
189
+ os.remove(os.path.join('examples', 'dump', 'random_val_fl.pickle'))
190
+ if(os.path.exists(os.path.join('examples', 'dump', 'random_val_fl_interp.pickle'))):
191
+ os.remove(os.path.join('examples', 'dump', 'random_val_fl_interp.pickle'))
192
+ if(os.path.exists(os.path.join('examples', 'dump', 'random_val_au.pickle'))):
193
+ os.remove(os.path.join('examples', 'dump', 'random_val_au.pickle'))
194
+ if (os.path.exists(os.path.join('examples', 'dump', 'random_val_gaze.pickle'))):
195
+ os.remove(os.path.join('examples', 'dump', 'random_val_gaze.pickle'))
196
+
197
+ with open(os.path.join('examples', 'dump', 'random_val_fl.pickle'), 'wb') as fp:
198
+ pickle.dump(fl_data, fp)
199
+ with open(os.path.join('examples', 'dump', 'random_val_au.pickle'), 'wb') as fp:
200
+ pickle.dump(au_data, fp)
201
+ with open(os.path.join('examples', 'dump', 'random_val_gaze.pickle'), 'wb') as fp:
202
+ gaze = {'rot_trans':rot_tran, 'rot_quat':rot_quat, 'anchor_t_shape':anchor_t_shape}
203
+ pickle.dump(gaze, fp)
204
+
205
+
206
+ # %%
207
+ model = Audio2landmark_model(opt_parser, jpg_shape=shape_3d)
208
+ if(len(opt_parser.reuse_train_emb_list) == 0):
209
+ model.test(au_emb=au_emb)
210
+ else:
211
+ model.test(au_emb=None)
212
+
213
+ print("Audio->Landmark...", file=sys.stderr)
214
+
215
+
216
+ # %%
217
+ fls = glob.glob1('examples', 'pred_fls_*.txt')
218
+ fls.sort()
219
+
220
+ for i in range(0,len(fls)):
221
+ fl = np.loadtxt(os.path.join('examples', fls[i])).reshape((-1, 68,3))
222
+ print(fls[i])
223
+ fl[:, :, 0:2] = -fl[:, :, 0:2]
224
+ fl[:, :, 0:2] = fl[:, :, 0:2] / scale - shift
225
+
226
+ if (ADD_NAIVE_EYE):
227
+ fl = util.add_naive_eye(fl)
228
+
229
+ # additional smooth
230
+ fl = fl.reshape((-1, 204))
231
+ fl[:, :48 * 3] = savgol_filter(fl[:, :48 * 3], 15, 3, axis=0)
232
+ fl[:, 48*3:] = savgol_filter(fl[:, 48*3:], 5, 3, axis=0)
233
+ fl = fl.reshape((-1, 68, 3))
234
+
235
+ ''' STEP 6: Imag2image translation '''
236
+ model = Image_translation_block(opt_parser, single_test=True)
237
+ with torch.no_grad():
238
+ model.single_test(jpg=img, fls=fl, filename=fls[i], prefix=opt_parser.jpg.split('.')[0])
239
+ print('finish image2image gen')
240
+ os.remove(os.path.join('examples', fls[i]))
241
+
242
+ print("{} / {}: Landmark->Face...".format(i+1, len(fls)), file=sys.stderr)
243
+ print("Done!", file=sys.stderr)
244
+
245
+ # %% [markdown]
246
+ # # Generated video from image and sound clip
247
+
248
+ # %%
249
+ from IPython.display import Video
250
+
251
+ Video("MakeItTalk/examples/marlenes_v1.mp4")
252
+
253
+
254
+ # %%
255
+
256
+
257
+
258
+ # %%
259
+ from IPython.display import HTML
260
+ from base64 import b64encode
261
+
262
+ for ain in ains:
263
+ OUTPUT_MP4_NAME = '{}_pred_fls_{}_audio_embed.mp4'.format(
264
+ opt_parser.jpg.split('.')[0],
265
+ ain.split('.')[0]
266
+ )
267
+ mp4 = open('MakeItTalk/examples/{}'.format(OUTPUT_MP4_NAME),'rb').read()
268
+ data_url = "data:video/mp4;base64," + b64encode(mp4).decode()
269
+
270
+ print('Display animation: MakeItTalk/examples/{}'.format(OUTPUT_MP4_NAME), file=sys.stderr)
271
+ display(HTML("""
272
+ <video width=600 controls>
273
+ <source src="%s" type="video/mp4">
274
+ </video>
275
+ """ % data_url))
276
+
277
+
MakeItTalk/app.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import os
3
+ from fastapi import FastAPI
4
+ import gradio as gr
5
+ from PIL import Image as im
6
+ from scipy.io.wavfile import write
7
+
8
+
9
+ def generateVideo(input_img, input_audio):
10
+
11
+ data = im.fromarray(input_img)
12
+
13
+ # saving the final output
14
+ # as a PNG file
15
+ data.save('MakeItTalk/examples/in_image.jpg')
16
+
17
+ write('MakeItTalk/examples/in_audio.wav', input_audio[0], input_audio[1])
18
+
19
+ input_img = 'in_image.jpg'
20
+ input_audio = 'in_audio.wav'
21
+
22
+ os.system(f"python3 main_end2end.py --jpg {input_img}") #add image
23
+
24
+ video_name = 'MakeItTalk/examples/in_image_pred_fls_in_audio_audio_embed.mp4'
25
+
26
+
27
+ return video_name
28
+
29
+
30
+ demo = gr.Interface(
31
+ fn=generateVideo,
32
+ inputs=[gr.Image(shape=(256, 256)), gr.Audio(), ],
33
+ outputs= gr.Video().style(height=256, width=256),
34
+
35
+ )
36
+
37
+
38
+ demo.launch()
MakeItTalk/doc/__init__.py ADDED
File without changes
MakeItTalk/doc/landmark_adjust.png ADDED
MakeItTalk/doc/landmark_closemouth.png ADDED
MakeItTalk/doc/landmark_delauney.png ADDED
MakeItTalk/doc/teaser.png ADDED
MakeItTalk/examples/.DS_Store ADDED
Binary file (10.2 kB). View file
 
MakeItTalk/examples/327-3275260_leonardo-dicaprio-png-famous-actor.png ADDED
MakeItTalk/examples/angelina.jpg ADDED
MakeItTalk/examples/anne.jpg ADDED