Spaces:
Paused
Paused
Upload 131 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +58 -0
- CODE_OF_CONDUCT.md +80 -0
- CONTRIBUTING.md +31 -0
- LICENSE +201 -0
- README.md +16 -5
- app.py +626 -0
- checkpoints/download_ckpts.sh +59 -0
- checkpoints/edgetam.pt +3 -0
- convert_weights.py +36 -0
- examples/01_breakdancer.mp4 +3 -0
- examples/01_dog.mp4 +3 -0
- examples/02_cups.mp4 +3 -0
- examples/02_hummingbird.mp4 +3 -0
- examples/03_blocks.mp4 +3 -0
- examples/03_skateboarder.mp4 +3 -0
- examples/04_coffee.mp4 +3 -0
- examples/04_octopus.mp4 +3 -0
- examples/05_default_juggle.mp4 +3 -0
- examples/05_landing_dog_soccer.mp4 +3 -0
- examples/06_pingpong.mp4 +3 -0
- examples/07_snowboarder.mp4 +3 -0
- examples/08_driving.mp4 +3 -0
- examples/09_birdcartoon.mp4 +3 -0
- examples/10_cloth_magic.mp4 +3 -0
- examples/11_polevault.mp4 +3 -0
- examples/12_hideandseek.mp4 +3 -0
- examples/13_butterfly.mp4 +3 -0
- examples/14_social_dog_training.mp4 +3 -0
- examples/15_cricket.mp4 +3 -0
- examples/16_robotarm.mp4 +3 -0
- examples/17_childrendancing.mp4 +3 -0
- examples/18_threedogs.mp4 +3 -0
- examples/19_cyclist.mp4 +3 -0
- examples/20_doughkneading.mp4 +3 -0
- examples/21_biker.mp4 +3 -0
- examples/22_dogskateboarder.mp4 +3 -0
- examples/23_racecar.mp4 +3 -0
- examples/24_clownfish.mp4 +3 -0
- examples/trimmed/01_breakdancer.mp4 +3 -0
- examples/trimmed/01_dog.mp4 +3 -0
- examples/trimmed/02_cups.mp4 +3 -0
- examples/trimmed/02_hummingbird.mp4 +3 -0
- examples/trimmed/03_blocks.mp4 +3 -0
- examples/trimmed/03_skateboarder.mp4 +3 -0
- examples/trimmed/04_coffee.mp4 +3 -0
- examples/trimmed/04_octopus.mp4 +3 -0
- examples/trimmed/05_default_juggle.mp4 +3 -0
- examples/trimmed/05_landing_dog_soccer.mp4 +3 -0
- examples/trimmed/06_pingpong.mp4 +3 -0
- examples/trimmed/07_snowboarder.mp4 +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,61 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
examples/01_breakdancer.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
examples/01_dog.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
examples/02_cups.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
examples/02_hummingbird.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
examples/03_blocks.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
examples/03_skateboarder.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
examples/04_coffee.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
examples/04_octopus.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
examples/05_default_juggle.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
examples/05_landing_dog_soccer.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
examples/06_pingpong.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
examples/07_snowboarder.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
examples/08_driving.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
examples/09_birdcartoon.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
examples/10_cloth_magic.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
examples/11_polevault.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
examples/12_hideandseek.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
examples/13_butterfly.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
examples/14_social_dog_training.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 55 |
+
examples/15_cricket.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
examples/16_robotarm.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
examples/17_childrendancing.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
examples/18_threedogs.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
examples/19_cyclist.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
examples/20_doughkneading.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
examples/21_biker.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
examples/22_dogskateboarder.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
examples/23_racecar.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
examples/24_clownfish.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
examples/trimmed/01_breakdancer.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
examples/trimmed/01_dog.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
examples/trimmed/02_cups.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
examples/trimmed/02_hummingbird.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
examples/trimmed/03_blocks.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
examples/trimmed/03_skateboarder.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
examples/trimmed/04_coffee.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
examples/trimmed/04_octopus.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
examples/trimmed/05_default_juggle.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
examples/trimmed/05_landing_dog_soccer.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
examples/trimmed/06_pingpong.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
examples/trimmed/07_snowboarder.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
examples/trimmed/08_driving.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
examples/trimmed/09_birdcartoon.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
examples/trimmed/10_cloth_magic.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
examples/trimmed/11_polevault.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
examples/trimmed/12_hideandseek.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 82 |
+
examples/trimmed/13_butterfly.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 83 |
+
examples/trimmed/14_social_dog_training.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 84 |
+
examples/trimmed/15_cricket.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 85 |
+
examples/trimmed/16_robotarm.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 86 |
+
examples/trimmed/17_childrendancing.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
examples/trimmed/18_threedogs.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 88 |
+
examples/trimmed/19_cyclist.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 89 |
+
examples/trimmed/20_doughkneading.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
examples/trimmed/21_biker.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
examples/trimmed/22_dogskateboarder.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
examples/trimmed/23_racecar.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 93 |
+
examples/trimmed/24_clownfish.mp4 filter=lfs diff=lfs merge=lfs -text
|
CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 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 make participation in our project and
|
| 7 |
+
our community a harassment-free experience for everyone, regardless of age, body
|
| 8 |
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
| 9 |
+
level of experience, education, socio-economic status, nationality, personal
|
| 10 |
+
appearance, race, religion, or sexual identity and 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 within all project spaces, and it also applies when
|
| 49 |
+
an individual is representing the project or its community in public spaces.
|
| 50 |
+
Examples of representing a project or community include using an official
|
| 51 |
+
project e-mail address, posting via an official social media account, or acting
|
| 52 |
+
as an appointed representative at an online or offline event. Representation of
|
| 53 |
+
a project may be further defined and clarified by project maintainers.
|
| 54 |
+
|
| 55 |
+
This Code of Conduct also applies outside the project spaces when there is a
|
| 56 |
+
reasonable belief that an individual's behavior may have a negative impact on
|
| 57 |
+
the project or its community.
|
| 58 |
+
|
| 59 |
+
## Enforcement
|
| 60 |
+
|
| 61 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
| 62 |
+
reported by contacting the project team at <opensource-conduct@meta.com>. All
|
| 63 |
+
complaints will be reviewed and investigated and will result in a response that
|
| 64 |
+
is deemed necessary and appropriate to the circumstances. The project team is
|
| 65 |
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
| 66 |
+
Further details of specific enforcement policies may be posted separately.
|
| 67 |
+
|
| 68 |
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
| 69 |
+
faith may face temporary or permanent repercussions as determined by other
|
| 70 |
+
members of the project's leadership.
|
| 71 |
+
|
| 72 |
+
## Attribution
|
| 73 |
+
|
| 74 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
| 75 |
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
| 76 |
+
|
| 77 |
+
[homepage]: https://www.contributor-covenant.org
|
| 78 |
+
|
| 79 |
+
For answers to common questions about this code of conduct, see
|
| 80 |
+
https://www.contributor-covenant.org/faq
|
CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributing to EdgeTAM
|
| 2 |
+
We want to make contributing to this project as easy and transparent as
|
| 3 |
+
possible.
|
| 4 |
+
|
| 5 |
+
## Pull Requests
|
| 6 |
+
We actively welcome your pull requests.
|
| 7 |
+
|
| 8 |
+
1. Fork the repo and create your branch from `main`.
|
| 9 |
+
2. If you've added code that should be tested, add tests.
|
| 10 |
+
3. If you've changed APIs, update the documentation.
|
| 11 |
+
4. Ensure the test suite passes.
|
| 12 |
+
5. Make sure your code lints.
|
| 13 |
+
6. If you haven't already, complete the Contributor License Agreement ("CLA").
|
| 14 |
+
|
| 15 |
+
## Contributor License Agreement ("CLA")
|
| 16 |
+
In order to accept your pull request, we need you to submit a CLA. You only need
|
| 17 |
+
to do this once to work on any of Meta's open source projects.
|
| 18 |
+
|
| 19 |
+
Complete your CLA here: <https://code.facebook.com/cla>
|
| 20 |
+
|
| 21 |
+
## Issues
|
| 22 |
+
We use GitHub issues to track public bugs. Please ensure your description is
|
| 23 |
+
clear and has sufficient instructions to be able to reproduce the issue.
|
| 24 |
+
|
| 25 |
+
Meta has a [bounty program](https://bugbounty.meta.com/) for the safe
|
| 26 |
+
disclosure of security bugs. In those cases, please go through the process
|
| 27 |
+
outlined on that page and do not file a public issue.
|
| 28 |
+
|
| 29 |
+
## License
|
| 30 |
+
By contributing to EdgeTAM, you agree that your contributions will be licensed
|
| 31 |
+
under the LICENSE file in the root directory of this source tree.
|
LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
README.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
| 1 |
---
|
| 2 |
-
title: EdgeTAM
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: EdgeTAM
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
short_description: On-Device Track Anything Model
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 15 |
+
|
| 16 |
+
```
|
| 17 |
+
@misc{zhou2025edgetam,
|
| 18 |
+
title={EdgeTAM: On-Device Track Anything Model},
|
| 19 |
+
author={Zhou, Chong and Zhu, Chenchen and Xiong, Yunyang and Suri, Saksham and Xiao, Fanyi and Wu, Lemeng and Krishnamoorthi, Raghuraman and Dai, Bo and Loy, Chen Change and Chandra, Vikas and Soran, Bilge},
|
| 20 |
+
journal={arXiv preprint arXiv:2501.07256},
|
| 21 |
+
year={2025}
|
| 22 |
+
}
|
| 23 |
+
```
|
app.py
ADDED
|
@@ -0,0 +1,626 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
# All rights reserved.
|
| 3 |
+
|
| 4 |
+
# This source code is licensed under the license found in the
|
| 5 |
+
# LICENSE file in the root directory of this source tree.
|
| 6 |
+
|
| 7 |
+
import copy
|
| 8 |
+
import os
|
| 9 |
+
from datetime import datetime
|
| 10 |
+
|
| 11 |
+
import gradio as gr
|
| 12 |
+
|
| 13 |
+
os.environ["TORCH_CUDNN_SDPA_ENABLED"] = "1"
|
| 14 |
+
import tempfile
|
| 15 |
+
|
| 16 |
+
import cv2
|
| 17 |
+
import matplotlib.pyplot as plt
|
| 18 |
+
import numpy as np
|
| 19 |
+
import spaces
|
| 20 |
+
|
| 21 |
+
import torch
|
| 22 |
+
|
| 23 |
+
from moviepy.editor import ImageSequenceClip
|
| 24 |
+
from moviepy.video.io.ffmpeg_writer import FFMPEG_VideoWriter # adding this for MPS compatibility
|
| 25 |
+
from PIL import Image
|
| 26 |
+
from sam2.build_sam import build_sam2_video_predictor
|
| 27 |
+
|
| 28 |
+
# Description
|
| 29 |
+
title = "<center><strong><font size='8'>EdgeTAM<font></strong> <a href='https://github.com/facebookresearch/EdgeTAM'><font size='6'>[GitHub]</font></a> </center>"
|
| 30 |
+
|
| 31 |
+
description_p = """# EdgeTAM is now in transformers, find it [here](https://huggingface.co/yonigozlan/EdgeTAM-hf)
|
| 32 |
+
<ol>
|
| 33 |
+
<li> Upload one video or click one example video</li>
|
| 34 |
+
<li> Click 'include' point type, select the object to segment and track</li>
|
| 35 |
+
<li> Click 'exclude' point type (optional), select the area you want to avoid segmenting and tracking</li>
|
| 36 |
+
<li> Click the 'Track' button to obtain the masked video </li>
|
| 37 |
+
</ol>
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
# examples
|
| 41 |
+
examples = [
|
| 42 |
+
["examples/trimmed/01_dog.mp4"],
|
| 43 |
+
["examples/trimmed/02_cups.mp4"],
|
| 44 |
+
["examples/trimmed/03_blocks.mp4"],
|
| 45 |
+
["examples/trimmed/04_coffee.mp4"],
|
| 46 |
+
["examples/trimmed/05_default_juggle.mp4"],
|
| 47 |
+
["examples/trimmed/01_breakdancer.mp4"],
|
| 48 |
+
["examples/trimmed/02_hummingbird.mp4"],
|
| 49 |
+
["examples/trimmed/03_skateboarder.mp4"],
|
| 50 |
+
["examples/trimmed/04_octopus.mp4"],
|
| 51 |
+
["examples/trimmed/05_landing_dog_soccer.mp4"],
|
| 52 |
+
["examples/trimmed/06_pingpong.mp4"],
|
| 53 |
+
["examples/trimmed/07_snowboarder.mp4"],
|
| 54 |
+
["examples/trimmed/08_driving.mp4"],
|
| 55 |
+
["examples/trimmed/09_birdcartoon.mp4"],
|
| 56 |
+
["examples/trimmed/10_cloth_magic.mp4"],
|
| 57 |
+
["examples/trimmed/11_polevault.mp4"],
|
| 58 |
+
["examples/trimmed/12_hideandseek.mp4"],
|
| 59 |
+
["examples/trimmed/13_butterfly.mp4"],
|
| 60 |
+
["examples/trimmed/14_social_dog_training.mp4"],
|
| 61 |
+
["examples/trimmed/15_cricket.mp4"],
|
| 62 |
+
["examples/trimmed/16_robotarm.mp4"],
|
| 63 |
+
["examples/trimmed/17_childrendancing.mp4"],
|
| 64 |
+
["examples/trimmed/18_threedogs.mp4"],
|
| 65 |
+
["examples/trimmed/19_cyclist.mp4"],
|
| 66 |
+
["examples/trimmed/20_doughkneading.mp4"],
|
| 67 |
+
["examples/trimmed/21_biker.mp4"],
|
| 68 |
+
["examples/trimmed/22_dogskateboarder.mp4"],
|
| 69 |
+
["examples/trimmed/23_racecar.mp4"],
|
| 70 |
+
["examples/trimmed/24_clownfish.mp4"],
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
OBJ_ID = 0
|
| 74 |
+
sam2_checkpoint = "checkpoints/edgetam.pt"
|
| 75 |
+
model_cfg = "edgetam.yaml"
|
| 76 |
+
device = torch.device("mps") if torch.backends.mps.is_available() else torch.device("cpu") # MPS support
|
| 77 |
+
predictor = build_sam2_video_predictor(model_cfg, sam2_checkpoint, device="cpu")
|
| 78 |
+
predictor.to(device)
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
def get_video_fps(video_path):
|
| 82 |
+
# Open the video file
|
| 83 |
+
cap = cv2.VideoCapture(video_path)
|
| 84 |
+
|
| 85 |
+
if not cap.isOpened():
|
| 86 |
+
print("Error: Could not open video.")
|
| 87 |
+
return None
|
| 88 |
+
|
| 89 |
+
# Get the FPS of the video
|
| 90 |
+
fps = cap.get(cv2.CAP_PROP_FPS)
|
| 91 |
+
|
| 92 |
+
return fps
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
def reset_state(inference_state):
|
| 96 |
+
for v in inference_state["point_inputs_per_obj"].values():
|
| 97 |
+
v.clear()
|
| 98 |
+
for v in inference_state["mask_inputs_per_obj"].values():
|
| 99 |
+
v.clear()
|
| 100 |
+
for v in inference_state["output_dict_per_obj"].values():
|
| 101 |
+
v["cond_frame_outputs"].clear()
|
| 102 |
+
v["non_cond_frame_outputs"].clear()
|
| 103 |
+
for v in inference_state["temp_output_dict_per_obj"].values():
|
| 104 |
+
v["cond_frame_outputs"].clear()
|
| 105 |
+
v["non_cond_frame_outputs"].clear()
|
| 106 |
+
inference_state["output_dict"]["cond_frame_outputs"].clear()
|
| 107 |
+
inference_state["output_dict"]["non_cond_frame_outputs"].clear()
|
| 108 |
+
inference_state["consolidated_frame_inds"]["cond_frame_outputs"].clear()
|
| 109 |
+
inference_state["consolidated_frame_inds"]["non_cond_frame_outputs"].clear()
|
| 110 |
+
inference_state["tracking_has_started"] = False
|
| 111 |
+
inference_state["frames_already_tracked"].clear()
|
| 112 |
+
inference_state["obj_id_to_idx"].clear()
|
| 113 |
+
inference_state["obj_idx_to_id"].clear()
|
| 114 |
+
inference_state["obj_ids"].clear()
|
| 115 |
+
inference_state["point_inputs_per_obj"].clear()
|
| 116 |
+
inference_state["mask_inputs_per_obj"].clear()
|
| 117 |
+
inference_state["output_dict_per_obj"].clear()
|
| 118 |
+
inference_state["temp_output_dict_per_obj"].clear()
|
| 119 |
+
return inference_state
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
def reset(
|
| 123 |
+
first_frame,
|
| 124 |
+
all_frames,
|
| 125 |
+
input_points,
|
| 126 |
+
input_labels,
|
| 127 |
+
inference_state,
|
| 128 |
+
):
|
| 129 |
+
first_frame = None
|
| 130 |
+
all_frames = None
|
| 131 |
+
input_points = []
|
| 132 |
+
input_labels = []
|
| 133 |
+
|
| 134 |
+
inference_state = None
|
| 135 |
+
return (
|
| 136 |
+
None,
|
| 137 |
+
gr.update(open=True),
|
| 138 |
+
None,
|
| 139 |
+
None,
|
| 140 |
+
gr.update(value=None, visible=False),
|
| 141 |
+
first_frame,
|
| 142 |
+
all_frames,
|
| 143 |
+
input_points,
|
| 144 |
+
input_labels,
|
| 145 |
+
inference_state,
|
| 146 |
+
)
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
def clear_points(
|
| 150 |
+
first_frame,
|
| 151 |
+
all_frames,
|
| 152 |
+
input_points,
|
| 153 |
+
input_labels,
|
| 154 |
+
inference_state,
|
| 155 |
+
):
|
| 156 |
+
input_points = []
|
| 157 |
+
input_labels = []
|
| 158 |
+
if inference_state and inference_state["tracking_has_started"]:
|
| 159 |
+
inference_state = reset_state(inference_state)
|
| 160 |
+
return (
|
| 161 |
+
first_frame,
|
| 162 |
+
None,
|
| 163 |
+
gr.update(value=None, visible=False),
|
| 164 |
+
first_frame,
|
| 165 |
+
all_frames,
|
| 166 |
+
input_points,
|
| 167 |
+
input_labels,
|
| 168 |
+
inference_state,
|
| 169 |
+
)
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
def preprocess_video_in(
|
| 173 |
+
video_path,
|
| 174 |
+
first_frame,
|
| 175 |
+
all_frames,
|
| 176 |
+
input_points,
|
| 177 |
+
input_labels,
|
| 178 |
+
inference_state,
|
| 179 |
+
):
|
| 180 |
+
if video_path is None:
|
| 181 |
+
return (
|
| 182 |
+
gr.update(open=True), # video_in_drawer
|
| 183 |
+
None, # points_map
|
| 184 |
+
None, # output_image
|
| 185 |
+
gr.update(value=None, visible=False), # output_video
|
| 186 |
+
first_frame,
|
| 187 |
+
all_frames,
|
| 188 |
+
input_points,
|
| 189 |
+
input_labels,
|
| 190 |
+
inference_state,
|
| 191 |
+
)
|
| 192 |
+
|
| 193 |
+
# Read the first frame
|
| 194 |
+
cap = cv2.VideoCapture(video_path)
|
| 195 |
+
if not cap.isOpened():
|
| 196 |
+
print("Error: Could not open video.")
|
| 197 |
+
return (
|
| 198 |
+
gr.update(open=True), # video_in_drawer
|
| 199 |
+
None, # points_map
|
| 200 |
+
None, # output_image
|
| 201 |
+
gr.update(value=None, visible=False), # output_video
|
| 202 |
+
first_frame,
|
| 203 |
+
all_frames,
|
| 204 |
+
input_points,
|
| 205 |
+
input_labels,
|
| 206 |
+
inference_state,
|
| 207 |
+
)
|
| 208 |
+
|
| 209 |
+
frame_number = 0
|
| 210 |
+
_first_frame = None
|
| 211 |
+
all_frames = []
|
| 212 |
+
|
| 213 |
+
while True:
|
| 214 |
+
ret, frame = cap.read()
|
| 215 |
+
if not ret:
|
| 216 |
+
break
|
| 217 |
+
|
| 218 |
+
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
| 219 |
+
frame = np.array(frame)
|
| 220 |
+
|
| 221 |
+
# Store the first frame
|
| 222 |
+
if frame_number == 0:
|
| 223 |
+
_first_frame = frame
|
| 224 |
+
all_frames.append(frame)
|
| 225 |
+
|
| 226 |
+
frame_number += 1
|
| 227 |
+
|
| 228 |
+
cap.release()
|
| 229 |
+
first_frame = copy.deepcopy(_first_frame)
|
| 230 |
+
input_points = []
|
| 231 |
+
input_labels = []
|
| 232 |
+
|
| 233 |
+
predictor.to("cpu")
|
| 234 |
+
inference_state = predictor.init_state(
|
| 235 |
+
offload_video_to_cpu=True,
|
| 236 |
+
offload_state_to_cpu=True,
|
| 237 |
+
video_path=video_path,
|
| 238 |
+
)
|
| 239 |
+
|
| 240 |
+
return [
|
| 241 |
+
gr.update(open=False), # video_in_drawer
|
| 242 |
+
first_frame, # points_map
|
| 243 |
+
None, # output_image
|
| 244 |
+
gr.update(value=None, visible=False), # output_video
|
| 245 |
+
first_frame,
|
| 246 |
+
all_frames,
|
| 247 |
+
input_points,
|
| 248 |
+
input_labels,
|
| 249 |
+
inference_state,
|
| 250 |
+
]
|
| 251 |
+
|
| 252 |
+
|
| 253 |
+
def segment_with_points(
|
| 254 |
+
point_type,
|
| 255 |
+
first_frame,
|
| 256 |
+
all_frames,
|
| 257 |
+
input_points,
|
| 258 |
+
input_labels,
|
| 259 |
+
inference_state,
|
| 260 |
+
evt: gr.SelectData,
|
| 261 |
+
):
|
| 262 |
+
predictor.to("cpu")
|
| 263 |
+
if inference_state:
|
| 264 |
+
inference_state["device"] = predictor.device
|
| 265 |
+
input_points.append(evt.index)
|
| 266 |
+
print(f"TRACKING INPUT POINT: {input_points}")
|
| 267 |
+
|
| 268 |
+
if point_type == "include":
|
| 269 |
+
input_labels.append(1)
|
| 270 |
+
elif point_type == "exclude":
|
| 271 |
+
input_labels.append(0)
|
| 272 |
+
print(f"TRACKING INPUT LABEL: {input_labels}")
|
| 273 |
+
|
| 274 |
+
# Open the image and get its dimensions
|
| 275 |
+
transparent_background = Image.fromarray(first_frame).convert("RGBA")
|
| 276 |
+
w, h = transparent_background.size
|
| 277 |
+
|
| 278 |
+
# Define the circle radius as a fraction of the smaller dimension
|
| 279 |
+
fraction = 0.01 # You can adjust this value as needed
|
| 280 |
+
radius = int(fraction * min(w, h))
|
| 281 |
+
|
| 282 |
+
# Create a transparent layer to draw on
|
| 283 |
+
transparent_layer = np.zeros((h, w, 4), dtype=np.uint8)
|
| 284 |
+
|
| 285 |
+
for index, track in enumerate(input_points):
|
| 286 |
+
if input_labels[index] == 1:
|
| 287 |
+
cv2.circle(transparent_layer, track, radius, (0, 255, 0, 255), -1)
|
| 288 |
+
else:
|
| 289 |
+
cv2.circle(transparent_layer, track, radius, (255, 0, 0, 255), -1)
|
| 290 |
+
|
| 291 |
+
# Convert the transparent layer back to an image
|
| 292 |
+
transparent_layer = Image.fromarray(transparent_layer, "RGBA")
|
| 293 |
+
selected_point_map = Image.alpha_composite(
|
| 294 |
+
transparent_background, transparent_layer
|
| 295 |
+
)
|
| 296 |
+
|
| 297 |
+
# Let's add a positive click at (x, y) = (210, 350) to get started
|
| 298 |
+
points = np.array(input_points, dtype=np.float32)
|
| 299 |
+
# for labels, `1` means positive click and `0` means negative click
|
| 300 |
+
labels = np.array(input_labels, dtype=np.int32)
|
| 301 |
+
_, _, out_mask_logits = predictor.add_new_points(
|
| 302 |
+
inference_state=inference_state,
|
| 303 |
+
frame_idx=0,
|
| 304 |
+
obj_id=OBJ_ID,
|
| 305 |
+
points=points,
|
| 306 |
+
labels=labels,
|
| 307 |
+
)
|
| 308 |
+
|
| 309 |
+
mask_image = show_mask((out_mask_logits[0] > 0.0).cpu().numpy())
|
| 310 |
+
first_frame_output = Image.alpha_composite(transparent_background, mask_image)
|
| 311 |
+
|
| 312 |
+
torch.cuda.empty_cache()
|
| 313 |
+
return (
|
| 314 |
+
selected_point_map,
|
| 315 |
+
first_frame_output,
|
| 316 |
+
first_frame,
|
| 317 |
+
all_frames,
|
| 318 |
+
input_points,
|
| 319 |
+
input_labels,
|
| 320 |
+
inference_state,
|
| 321 |
+
)
|
| 322 |
+
|
| 323 |
+
|
| 324 |
+
def show_mask(mask, obj_id=None, random_color=False, convert_to_image=True):
|
| 325 |
+
if random_color:
|
| 326 |
+
color = np.concatenate([np.random.random(3), np.array([0.6])], axis=0)
|
| 327 |
+
else:
|
| 328 |
+
cmap = plt.get_cmap("tab10")
|
| 329 |
+
cmap_idx = 0 if obj_id is None else obj_id
|
| 330 |
+
color = np.array([*cmap(cmap_idx)[:3], 0.6])
|
| 331 |
+
h, w = mask.shape[-2:]
|
| 332 |
+
mask = mask.reshape(h, w, 1) * color.reshape(1, 1, -1)
|
| 333 |
+
mask = (mask * 255).astype(np.uint8)
|
| 334 |
+
if convert_to_image:
|
| 335 |
+
mask = Image.fromarray(mask, "RGBA")
|
| 336 |
+
return mask
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
@spaces.GPU(duration=60)
|
| 340 |
+
def propagate_to_all(
|
| 341 |
+
video_in,
|
| 342 |
+
all_frames,
|
| 343 |
+
input_points,
|
| 344 |
+
inference_state,
|
| 345 |
+
):
|
| 346 |
+
# Set boolean for cuda or mps support
|
| 347 |
+
use_cuda = torch.cuda.is_available()
|
| 348 |
+
use_mps = torch.backends.mps.is_available() and torch.backends.mps.is_built()
|
| 349 |
+
|
| 350 |
+
if use_cuda:
|
| 351 |
+
if torch.cuda.get_device_properties(0).major >= 8:
|
| 352 |
+
torch.backends.cuda.matmul.allow_tf32 = True
|
| 353 |
+
torch.backends.cudnn.allow_tf32 = True
|
| 354 |
+
autocast_kwargs = dict(device_type="cuda", dtype=torch.bfloat16)
|
| 355 |
+
|
| 356 |
+
elif use_mps:
|
| 357 |
+
autocast_kwargs = dict(device_type="mps", dtype=torch.float16)
|
| 358 |
+
|
| 359 |
+
with torch.autocast(**autocast_kwargs):
|
| 360 |
+
|
| 361 |
+
if use_cuda:
|
| 362 |
+
predictor.to("cuda")
|
| 363 |
+
elif use_mps:
|
| 364 |
+
predictor.to("mps")
|
| 365 |
+
|
| 366 |
+
if inference_state:
|
| 367 |
+
inference_state["device"] = predictor.device
|
| 368 |
+
|
| 369 |
+
if len(input_points) == 0 or video_in is None or inference_state is None:
|
| 370 |
+
return None
|
| 371 |
+
# run propagation throughout the video and collect the results in a dict
|
| 372 |
+
video_segments = (
|
| 373 |
+
{}
|
| 374 |
+
) # video_segments contains the per-frame segmentation results
|
| 375 |
+
print("starting propagate_in_video")
|
| 376 |
+
for out_frame_idx, out_obj_ids, out_mask_logits in predictor.propagate_in_video(
|
| 377 |
+
inference_state
|
| 378 |
+
):
|
| 379 |
+
video_segments[out_frame_idx] = {
|
| 380 |
+
out_obj_id: (out_mask_logits[i] > 0.0).cpu().numpy()
|
| 381 |
+
for i, out_obj_id in enumerate(out_obj_ids)
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
# obtain the segmentation results every few frames
|
| 385 |
+
vis_frame_stride = 1
|
| 386 |
+
|
| 387 |
+
output_frames = []
|
| 388 |
+
for out_frame_idx in range(0, len(video_segments), vis_frame_stride):
|
| 389 |
+
transparent_background = Image.fromarray(all_frames[out_frame_idx]).convert(
|
| 390 |
+
"RGBA"
|
| 391 |
+
)
|
| 392 |
+
out_mask = video_segments[out_frame_idx][OBJ_ID]
|
| 393 |
+
mask_image = show_mask(out_mask)
|
| 394 |
+
output_frame = Image.alpha_composite(transparent_background, mask_image)
|
| 395 |
+
output_frame = output_frame.convert("RGB")
|
| 396 |
+
output_frame = np.array(output_frame)
|
| 397 |
+
output_frames.append(output_frame)
|
| 398 |
+
|
| 399 |
+
if use_cuda:
|
| 400 |
+
torch.cuda.empty_cache()
|
| 401 |
+
|
| 402 |
+
# Create a video clip from the image sequence
|
| 403 |
+
original_fps = get_video_fps(video_in)
|
| 404 |
+
fps = float(original_fps) # Frames per second
|
| 405 |
+
# Write the result to a file
|
| 406 |
+
unique_id = datetime.now().strftime("%Y%m%d%H%M%S")
|
| 407 |
+
final_vid_output_path = f"output_video_{unique_id}.mp4"
|
| 408 |
+
final_vid_output_path = os.path.join(
|
| 409 |
+
tempfile.gettempdir(), final_vid_output_path
|
| 410 |
+
)
|
| 411 |
+
|
| 412 |
+
# Write the result to a file using moviepy ImageSequenceClip
|
| 413 |
+
if use_cuda:
|
| 414 |
+
clip = ImageSequenceClip(output_frames, fps=fps)
|
| 415 |
+
clip.write_videofile(final_vid_output_path, codec="libx264")
|
| 416 |
+
|
| 417 |
+
# Write the result to a file using moviepy FFMPEG_VideoWriter for MPS compatibility
|
| 418 |
+
elif use_mps:
|
| 419 |
+
clip_array = output_frames # list of RGB numpy arrays
|
| 420 |
+
size = clip_array[0].shape[1], clip_array[0].shape[0] # (width, height)
|
| 421 |
+
writer = FFMPEG_VideoWriter(final_vid_output_path, size, fps=fps, codec="libx264")
|
| 422 |
+
|
| 423 |
+
for frame in clip_array:
|
| 424 |
+
writer.write_frame(frame)
|
| 425 |
+
|
| 426 |
+
writer.close()
|
| 427 |
+
|
| 428 |
+
return gr.update(value=final_vid_output_path)
|
| 429 |
+
|
| 430 |
+
|
| 431 |
+
def update_ui():
|
| 432 |
+
return gr.update(visible=True)
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
with gr.Blocks() as demo:
|
| 436 |
+
first_frame = gr.State()
|
| 437 |
+
all_frames = gr.State()
|
| 438 |
+
input_points = gr.State([])
|
| 439 |
+
input_labels = gr.State([])
|
| 440 |
+
inference_state = gr.State()
|
| 441 |
+
|
| 442 |
+
with gr.Column():
|
| 443 |
+
# Title
|
| 444 |
+
gr.Markdown(title)
|
| 445 |
+
with gr.Row():
|
| 446 |
+
|
| 447 |
+
with gr.Column():
|
| 448 |
+
# Instructions
|
| 449 |
+
gr.Markdown(description_p)
|
| 450 |
+
|
| 451 |
+
with gr.Accordion("Input Video", open=True) as video_in_drawer:
|
| 452 |
+
video_in = gr.Video(label="Input Video", format="mp4")
|
| 453 |
+
|
| 454 |
+
with gr.Row():
|
| 455 |
+
point_type = gr.Radio(
|
| 456 |
+
label="point type",
|
| 457 |
+
choices=["include", "exclude"],
|
| 458 |
+
value="include",
|
| 459 |
+
scale=2,
|
| 460 |
+
)
|
| 461 |
+
propagate_btn = gr.Button("Track", scale=1, variant="primary")
|
| 462 |
+
clear_points_btn = gr.Button("Clear Points", scale=1)
|
| 463 |
+
reset_btn = gr.Button("Reset", scale=1)
|
| 464 |
+
|
| 465 |
+
points_map = gr.Image(
|
| 466 |
+
label="Frame with Point Prompt", type="numpy", interactive=False
|
| 467 |
+
)
|
| 468 |
+
|
| 469 |
+
with gr.Column():
|
| 470 |
+
gr.Markdown("# Try some of the examples below ⬇️")
|
| 471 |
+
gr.Examples(
|
| 472 |
+
examples=examples,
|
| 473 |
+
inputs=[
|
| 474 |
+
video_in,
|
| 475 |
+
],
|
| 476 |
+
examples_per_page=8,
|
| 477 |
+
)
|
| 478 |
+
gr.Markdown("\n\n\n\n\n\n\n\n\n\n\n")
|
| 479 |
+
gr.Markdown("\n\n\n\n\n\n\n\n\n\n\n")
|
| 480 |
+
gr.Markdown("\n\n\n\n\n\n\n\n\n\n\n")
|
| 481 |
+
output_image = gr.Image(label="Reference Mask")
|
| 482 |
+
|
| 483 |
+
output_video = gr.Video(visible=False)
|
| 484 |
+
|
| 485 |
+
# When new video is uploaded
|
| 486 |
+
video_in.upload(
|
| 487 |
+
fn=preprocess_video_in,
|
| 488 |
+
inputs=[
|
| 489 |
+
video_in,
|
| 490 |
+
first_frame,
|
| 491 |
+
all_frames,
|
| 492 |
+
input_points,
|
| 493 |
+
input_labels,
|
| 494 |
+
inference_state,
|
| 495 |
+
],
|
| 496 |
+
outputs=[
|
| 497 |
+
video_in_drawer, # Accordion to hide uploaded video player
|
| 498 |
+
points_map, # Image component where we add new tracking points
|
| 499 |
+
output_image,
|
| 500 |
+
output_video,
|
| 501 |
+
first_frame,
|
| 502 |
+
all_frames,
|
| 503 |
+
input_points,
|
| 504 |
+
input_labels,
|
| 505 |
+
inference_state,
|
| 506 |
+
],
|
| 507 |
+
queue=False,
|
| 508 |
+
)
|
| 509 |
+
|
| 510 |
+
video_in.change(
|
| 511 |
+
fn=preprocess_video_in,
|
| 512 |
+
inputs=[
|
| 513 |
+
video_in,
|
| 514 |
+
first_frame,
|
| 515 |
+
all_frames,
|
| 516 |
+
input_points,
|
| 517 |
+
input_labels,
|
| 518 |
+
inference_state,
|
| 519 |
+
],
|
| 520 |
+
outputs=[
|
| 521 |
+
video_in_drawer, # Accordion to hide uploaded video player
|
| 522 |
+
points_map, # Image component where we add new tracking points
|
| 523 |
+
output_image,
|
| 524 |
+
output_video,
|
| 525 |
+
first_frame,
|
| 526 |
+
all_frames,
|
| 527 |
+
input_points,
|
| 528 |
+
input_labels,
|
| 529 |
+
inference_state,
|
| 530 |
+
],
|
| 531 |
+
queue=False,
|
| 532 |
+
)
|
| 533 |
+
|
| 534 |
+
# triggered when we click on image to add new points
|
| 535 |
+
points_map.select(
|
| 536 |
+
fn=segment_with_points,
|
| 537 |
+
inputs=[
|
| 538 |
+
point_type, # "include" or "exclude"
|
| 539 |
+
first_frame,
|
| 540 |
+
all_frames,
|
| 541 |
+
input_points,
|
| 542 |
+
input_labels,
|
| 543 |
+
inference_state,
|
| 544 |
+
],
|
| 545 |
+
outputs=[
|
| 546 |
+
points_map, # updated image with points
|
| 547 |
+
output_image,
|
| 548 |
+
first_frame,
|
| 549 |
+
all_frames,
|
| 550 |
+
input_points,
|
| 551 |
+
input_labels,
|
| 552 |
+
inference_state,
|
| 553 |
+
],
|
| 554 |
+
queue=False,
|
| 555 |
+
)
|
| 556 |
+
|
| 557 |
+
# Clear every points clicked and added to the map
|
| 558 |
+
clear_points_btn.click(
|
| 559 |
+
fn=clear_points,
|
| 560 |
+
inputs=[
|
| 561 |
+
first_frame,
|
| 562 |
+
all_frames,
|
| 563 |
+
input_points,
|
| 564 |
+
input_labels,
|
| 565 |
+
inference_state,
|
| 566 |
+
],
|
| 567 |
+
outputs=[
|
| 568 |
+
points_map,
|
| 569 |
+
output_image,
|
| 570 |
+
output_video,
|
| 571 |
+
first_frame,
|
| 572 |
+
all_frames,
|
| 573 |
+
input_points,
|
| 574 |
+
input_labels,
|
| 575 |
+
inference_state,
|
| 576 |
+
],
|
| 577 |
+
queue=False,
|
| 578 |
+
)
|
| 579 |
+
|
| 580 |
+
reset_btn.click(
|
| 581 |
+
fn=reset,
|
| 582 |
+
inputs=[
|
| 583 |
+
first_frame,
|
| 584 |
+
all_frames,
|
| 585 |
+
input_points,
|
| 586 |
+
input_labels,
|
| 587 |
+
inference_state,
|
| 588 |
+
],
|
| 589 |
+
outputs=[
|
| 590 |
+
video_in,
|
| 591 |
+
video_in_drawer,
|
| 592 |
+
points_map,
|
| 593 |
+
output_image,
|
| 594 |
+
output_video,
|
| 595 |
+
first_frame,
|
| 596 |
+
all_frames,
|
| 597 |
+
input_points,
|
| 598 |
+
input_labels,
|
| 599 |
+
inference_state,
|
| 600 |
+
],
|
| 601 |
+
queue=False,
|
| 602 |
+
)
|
| 603 |
+
|
| 604 |
+
propagate_btn.click(
|
| 605 |
+
fn=update_ui,
|
| 606 |
+
inputs=[],
|
| 607 |
+
outputs=output_video,
|
| 608 |
+
queue=False,
|
| 609 |
+
).then(
|
| 610 |
+
fn=propagate_to_all,
|
| 611 |
+
inputs=[
|
| 612 |
+
video_in,
|
| 613 |
+
all_frames,
|
| 614 |
+
input_points,
|
| 615 |
+
inference_state,
|
| 616 |
+
],
|
| 617 |
+
outputs=[
|
| 618 |
+
output_video,
|
| 619 |
+
],
|
| 620 |
+
concurrency_limit=10,
|
| 621 |
+
queue=False,
|
| 622 |
+
)
|
| 623 |
+
|
| 624 |
+
|
| 625 |
+
# demo.queue()
|
| 626 |
+
demo.launch()
|
checkpoints/download_ckpts.sh
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 4 |
+
# All rights reserved.
|
| 5 |
+
|
| 6 |
+
# This source code is licensed under the license found in the
|
| 7 |
+
# LICENSE file in the root directory of this source tree.
|
| 8 |
+
|
| 9 |
+
# Use either wget or curl to download the checkpoints
|
| 10 |
+
if command -v wget &> /dev/null; then
|
| 11 |
+
CMD="wget"
|
| 12 |
+
elif command -v curl &> /dev/null; then
|
| 13 |
+
CMD="curl -L -O"
|
| 14 |
+
else
|
| 15 |
+
echo "Please install wget or curl to download the checkpoints."
|
| 16 |
+
exit 1
|
| 17 |
+
fi
|
| 18 |
+
|
| 19 |
+
# Define the URLs for SAM 2 checkpoints
|
| 20 |
+
# SAM2_BASE_URL="https://dl.fbaipublicfiles.com/segment_anything_2/072824"
|
| 21 |
+
# sam2_hiera_t_url="${SAM2_BASE_URL}/sam2_hiera_tiny.pt"
|
| 22 |
+
# sam2_hiera_s_url="${SAM2_BASE_URL}/sam2_hiera_small.pt"
|
| 23 |
+
# sam2_hiera_b_plus_url="${SAM2_BASE_URL}/sam2_hiera_base_plus.pt"
|
| 24 |
+
# sam2_hiera_l_url="${SAM2_BASE_URL}/sam2_hiera_large.pt"
|
| 25 |
+
|
| 26 |
+
# Download each of the four checkpoints using wget
|
| 27 |
+
# echo "Downloading sam2_hiera_tiny.pt checkpoint..."
|
| 28 |
+
# $CMD $sam2_hiera_t_url || { echo "Failed to download checkpoint from $sam2_hiera_t_url"; exit 1; }
|
| 29 |
+
|
| 30 |
+
# echo "Downloading sam2_hiera_small.pt checkpoint..."
|
| 31 |
+
# $CMD $sam2_hiera_s_url || { echo "Failed to download checkpoint from $sam2_hiera_s_url"; exit 1; }
|
| 32 |
+
|
| 33 |
+
# echo "Downloading sam2_hiera_base_plus.pt checkpoint..."
|
| 34 |
+
# $CMD $sam2_hiera_b_plus_url || { echo "Failed to download checkpoint from $sam2_hiera_b_plus_url"; exit 1; }
|
| 35 |
+
|
| 36 |
+
# echo "Downloading sam2_hiera_large.pt checkpoint..."
|
| 37 |
+
# $CMD $sam2_hiera_l_url || { echo "Failed to download checkpoint from $sam2_hiera_l_url"; exit 1; }
|
| 38 |
+
|
| 39 |
+
# Define the URLs for SAM 2.1 checkpoints
|
| 40 |
+
SAM2p1_BASE_URL="https://dl.fbaipublicfiles.com/segment_anything_2/092824"
|
| 41 |
+
sam2p1_hiera_t_url="${SAM2p1_BASE_URL}/sam2.1_hiera_tiny.pt"
|
| 42 |
+
sam2p1_hiera_s_url="${SAM2p1_BASE_URL}/sam2.1_hiera_small.pt"
|
| 43 |
+
sam2p1_hiera_b_plus_url="${SAM2p1_BASE_URL}/sam2.1_hiera_base_plus.pt"
|
| 44 |
+
sam2p1_hiera_l_url="${SAM2p1_BASE_URL}/sam2.1_hiera_large.pt"
|
| 45 |
+
|
| 46 |
+
# SAM 2.1 checkpoints
|
| 47 |
+
echo "Downloading sam2.1_hiera_tiny.pt checkpoint..."
|
| 48 |
+
$CMD $sam2p1_hiera_t_url || { echo "Failed to download checkpoint from $sam2p1_hiera_t_url"; exit 1; }
|
| 49 |
+
|
| 50 |
+
echo "Downloading sam2.1_hiera_small.pt checkpoint..."
|
| 51 |
+
$CMD $sam2p1_hiera_s_url || { echo "Failed to download checkpoint from $sam2p1_hiera_s_url"; exit 1; }
|
| 52 |
+
|
| 53 |
+
echo "Downloading sam2.1_hiera_base_plus.pt checkpoint..."
|
| 54 |
+
$CMD $sam2p1_hiera_b_plus_url || { echo "Failed to download checkpoint from $sam2p1_hiera_b_plus_url"; exit 1; }
|
| 55 |
+
|
| 56 |
+
echo "Downloading sam2.1_hiera_large.pt checkpoint..."
|
| 57 |
+
$CMD $sam2p1_hiera_l_url || { echo "Failed to download checkpoint from $sam2p1_hiera_l_url"; exit 1; }
|
| 58 |
+
|
| 59 |
+
echo "All checkpoints are downloaded successfully."
|
checkpoints/edgetam.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ed2d4850b8792c239689b043c47046ec239b6e808a3d9b6ae676c803fd8780df
|
| 3 |
+
size 56116523
|
convert_weights.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
| 2 |
+
# All rights reserved.
|
| 3 |
+
|
| 4 |
+
# This source code is licensed under the license found in the
|
| 5 |
+
# LICENSE file in the root directory of this source tree.
|
| 6 |
+
|
| 7 |
+
import argparse
|
| 8 |
+
|
| 9 |
+
import torch
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def main(args):
|
| 13 |
+
sd = torch.load(args.src, map_location="cpu")["model"]
|
| 14 |
+
sd = {k: v for k, v in sd.items() if "teacher" not in k}
|
| 15 |
+
sd = {
|
| 16 |
+
k.replace("backbone.vision_backbone", "image_encoder"): v for k, v in sd.items()
|
| 17 |
+
}
|
| 18 |
+
sd = {k.replace("mlp.fc1", "mlp.layers.0"): v for k, v in sd.items()}
|
| 19 |
+
sd = {k.replace("mlp.fc2", "mlp.layers.1"): v for k, v in sd.items()}
|
| 20 |
+
sd = {k.replace("convs", "neck.convs"): v for k, v in sd.items()}
|
| 21 |
+
sd = {
|
| 22 |
+
k.replace("transformer.encoder", "memory_attention"): v for k, v in sd.items()
|
| 23 |
+
}
|
| 24 |
+
sd = {k.replace("maskmem_backbone", "memory_encoder"): v for k, v in sd.items()}
|
| 25 |
+
sd = {k.replace("maskmem_backbone", "memory_encoder"): v for k, v in sd.items()}
|
| 26 |
+
sd = {k.replace("mlp.lin1", "mlp.layers.0"): v for k, v in sd.items()}
|
| 27 |
+
sd = {k.replace("mlp.lin2", "mlp.layers.1"): v for k, v in sd.items()}
|
| 28 |
+
torch.save({"model": sd}, args.src.replace(".pt", "_converted.pt"))
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
if __name__ == "__main__":
|
| 32 |
+
parser = argparse.ArgumentParser()
|
| 33 |
+
parser.add_argument("--src", type=str, required=True)
|
| 34 |
+
args = parser.parse_args()
|
| 35 |
+
|
| 36 |
+
main(args)
|
examples/01_breakdancer.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f6b15f61e741576f658e41939d0109f15f012691a62a86820418d3ae10d1f04
|
| 3 |
+
size 5251367
|
examples/01_dog.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21425eb9b7fce7d3fb23fa17b1c07bcbe99ba9e64e3b5347d8052ba6d9c38924
|
| 3 |
+
size 1738970
|
examples/02_cups.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6320759eede8c82c7d43fe1cc569f3a389758ec37b2b1dc9e9b7b4ce4110ab13
|
| 3 |
+
size 2543710
|
examples/02_hummingbird.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79018494f7cda9ea1fc57bc474fd468ba1291624d85a1b74312029013ed9eb1e
|
| 3 |
+
size 1098274
|
examples/03_blocks.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2868f2c62f5cfa28dabbe925fae95da7f896531630a0627e5edbc784ea42413d
|
| 3 |
+
size 1808832
|
examples/03_skateboarder.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8403b992e4c114cf01ccb56c95aeba58d38aac16a5d7611580c1ceb5ef0f3ca
|
| 3 |
+
size 2132383
|
examples/04_coffee.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f9a439a8bf66910db3e2a9d9ea853bc24c760c8d4ca227f4c33051b1cef28c03
|
| 3 |
+
size 1177415
|
examples/04_octopus.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d705ebd61259495da51e254cba576b2362310033099173e7781624c14fc51e3d
|
| 3 |
+
size 4395411
|
examples/05_default_juggle.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60d23773ad50389a5c2df9ba4ab05e9b4d39d21dfa7b75d15b46666ff7a4e2bb
|
| 3 |
+
size 1842699
|
examples/05_landing_dog_soccer.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65d828933e37694b47d8d22573d812a8b838b22b722a17af362a50daecfe92d9
|
| 3 |
+
size 2774490
|
examples/06_pingpong.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c5ba5fcd0abd07701f030bbdbeed937f56bd0950103a13dad664fc66a264f98
|
| 3 |
+
size 1341363
|
examples/07_snowboarder.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:28108f8ae296c2b97b48768ab5efe556d57c3b631cb7d86be3b012a93fdc35ae
|
| 3 |
+
size 3579270
|
examples/08_driving.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6752358cdb184ce27e157ba9c7622dba0596ad8c9951c013ff2d027802079ae1
|
| 3 |
+
size 1353646
|
examples/09_birdcartoon.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89b3adfc1972b4a400fab3cc52da30a4bd6ee87feb7d3b5ee00e1030885f7f92
|
| 3 |
+
size 1839837
|
examples/10_cloth_magic.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:407ed3c96d070d4da764f4ae6a114b0ade5bce4fe8900a43c118ff2d636032c5
|
| 3 |
+
size 1377117
|
examples/11_polevault.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86e7ca662e5282796b1af115c76afb15d81d2ce33a15a12504c90b0831e53911
|
| 3 |
+
size 1712657
|
examples/12_hideandseek.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82fe69d56a9fa3c228e2dd4a4db05c36db36b75a2b132409400fb1f4af1102c9
|
| 3 |
+
size 2799452
|
examples/13_butterfly.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:284bb1cf4d6520d0ee1e7f3b0f100e38943410031c7f994a5f8fd95930ccdc02
|
| 3 |
+
size 2434416
|
examples/14_social_dog_training.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e364b566cfb8ef28f53615a15bf4079bdb1c6dada49828954706c8b6a96ac3f
|
| 3 |
+
size 1810664
|
examples/15_cricket.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e9a7b88ba84dcc16defe2845f6c3b47cc4d2ef25e5752e87721b79ac3540e1e9
|
| 3 |
+
size 4976505
|
examples/16_robotarm.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f79112ba6937ddccc4be748d6a2ca64822ac85cdbbdeba7a7dc4e58ebfa2ce80
|
| 3 |
+
size 3575535
|
examples/17_childrendancing.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff42b6651f65431e967c810c24ebbaea1425524055735e932638e3843b42f55d
|
| 3 |
+
size 5722084
|
examples/18_threedogs.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76f5ad121c6e10b9ed6b8ea3453efe66c48952fabc964c3b1d9ab3fda0d8b5be
|
| 3 |
+
size 4254672
|
examples/19_cyclist.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c862441a39dd9c5ad823fc1709737208f923d3676cfa13d6567451b2d01f34f
|
| 3 |
+
size 2471696
|
examples/20_doughkneading.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1eaefb076968272b3e6c04def0ef8fd99524f53bfade63c58a54e4dc47fa8af9
|
| 3 |
+
size 1943984
|
examples/21_biker.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bd0799a3a5ae035f26c326baa2ae0906cb8ac57c3016cb4c0ca04959c442c08
|
| 3 |
+
size 1031840
|
examples/22_dogskateboarder.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e44764e451cce362511ff9f8774d98f5c2f971567397ec1def9d71f52767833
|
| 3 |
+
size 3948915
|
examples/23_racecar.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df58709b52635efdb09a0ce2a3a60fa2ac7111413c004d206639dca9e1487cd0
|
| 3 |
+
size 5147963
|
examples/24_clownfish.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e60c4972915e1c8537801e2805b7729338c4a122d759028ade59703d18972d81
|
| 3 |
+
size 4649052
|
examples/trimmed/01_breakdancer.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e96c0fb3f79535fabfdf27d1286cc1c1af1218213698196ccc87667c8f9056c
|
| 3 |
+
size 1402940
|
examples/trimmed/01_dog.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e30a0e6d5b81fd70193c9f2ac4d524d9ef8b4263c44b6baf03e28863be2d68a1
|
| 3 |
+
size 518123
|
examples/trimmed/02_cups.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4cab006ce7d04c739cbab529f0861f10facc1b60b6ef2b70e5028fd1af33503
|
| 3 |
+
size 664176
|
examples/trimmed/02_hummingbird.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a3a40c0ec3ee8c221756ecedbfc919507a454f4f2f8348836d2d555ca8972b3
|
| 3 |
+
size 459145
|
examples/trimmed/03_blocks.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:840e69406c05932b5711d0bba515ed4ed291577b919d3f2aa022648801777ad9
|
| 3 |
+
size 559806
|
examples/trimmed/03_skateboarder.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:232dfc328c7906ea386a92feb9a88e0096eb3f7877a5f899994f176b3a675cee
|
| 3 |
+
size 839995
|
examples/trimmed/04_coffee.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:115d7214b03312f9917d3050ebb5b4e70119a8610d82e801ab6bd500a0939e7c
|
| 3 |
+
size 507639
|
examples/trimmed/04_octopus.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0a6cd2db1a885bfb91532bf196975dabb374bdd3fca1250c6e23a5b8d316ea5d
|
| 3 |
+
size 1133299
|
examples/trimmed/05_default_juggle.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d55cc44516f83a6dac63e50c90149ed754cdd105c40406136a7caf1e0f511664
|
| 3 |
+
size 679890
|
examples/trimmed/05_landing_dog_soccer.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76e7f8a7c0fbab56d8a300a0a3876a0e7f420f0262ae157738d051ed9db1a9f8
|
| 3 |
+
size 1083006
|
examples/trimmed/06_pingpong.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37b2e0dada7a9ffed562ba72a341105e3101c0d8da836f301c082a63996e8a36
|
| 3 |
+
size 454685
|
examples/trimmed/07_snowboarder.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4861b03ccf4433c35f3de8c24ff736478687b3c489030fa7e726183fb8bf1d10
|
| 3 |
+
size 1386306
|