Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Track Anything Colab Demo #43

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions Track_Anything_Colab.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"\n",
"![](https://github.com/gaomingqi/Track-Anything/raw/master/assets/track-anything-logo.jpg)\n",
"Track-Anything is a flexible and interactive tool for video object tracking and segmentation. It is developed upon Segment Anything, can specify anything to track and segment via user clicks only. During tracking, users can flexibly change the objects they wanna track or correct the region of interest if there are any ambiguities. These characteristics enable Track-Anything to be suitable for:\n",
"\n",
"Video object tracking and segmentation with shot changes.\n",
"Visualized development and data annnotation for video object tracking and segmentation.\n",
"Object-centric downstream video tasks, such as video inpainting and editing.\n",
"\n",
"Gradio demo for Track Anything, a flexible and interactive tool for video object tracking, segmentation, and inpainting. I To use it, simply upload your video, or click one of the examples to load them. Code: https://github.com/gaomingqi/Track-Anything.\n",
"\n",
"![Track-Anything](https://github.com/gaomingqi/Track-Anything/raw/master/assets/avengers.gif)"
],
"metadata": {
"id": "9OQc9BRbhVHI"
}
},
{
"cell_type": "markdown",
"source": [
"# Install Track Anything"
],
"metadata": {
"id": "WVllODe7irKM"
}
},
{
"cell_type": "code",
"source": [
"!git clone https://github.com/healthonrails/Track-Anything.git"
],
"metadata": {
"id": "zsXKJlem1hfC"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"%cd Track-Anything/"
],
"metadata": {
"id": "AZJloa631pNe",
"outputId": "d1290ecb-cbbc-4b78-c977-4bd8a3c17d43",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"/content/Track-Anything\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!pip install -r requirements.txt"
],
"metadata": {
"id": "h9yC07-m1t14"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Run the Gradio demo for Track Anything"
],
"metadata": {
"id": "O_nxc4jei057"
}
},
{
"cell_type": "code",
"source": [
"!python app.py --device cuda:0"
],
"metadata": {
"id": "yF4aXRIx12XP"
},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"colab": {
"name": "Welcome To Colaboratory",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"accelerator": "GPU",
"gpuClass": "standard"
},
"nbformat": 4,
"nbformat_minor": 0
}
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,5 +596,5 @@ def generate_video_from_frames(frames, output_path, fps=30):
# cache_examples=True,
)
iface.queue(concurrency_count=1)
iface.launch(debug=True, enable_queue=True, server_port=args.port, server_name="0.0.0.0")
# iface.launch(debug=True, enable_queue=True)
iface.launch(debug=True, enable_queue=True, server_port=args.port, server_name="0.0.0.0", share=True)
# iface.launch(debug=True, enable_queue=True)