autosegmentor 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autosegmentor-3.0.0/PKG-INFO +161 -0
- autosegmentor-3.0.0/README.md +111 -0
- autosegmentor-3.0.0/autosegmentor/__init__.py +5 -0
- autosegmentor-3.0.0/autosegmentor/_version.py +3 -0
- autosegmentor-3.0.0/autosegmentor/core/AutoSegmentorEngine.py +551 -0
- autosegmentor-3.0.0/autosegmentor/core/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/file_management/FileManager.py +49 -0
- autosegmentor-3.0.0/autosegmentor/file_management/FrameExtractor.py +70 -0
- autosegmentor-3.0.0/autosegmentor/file_management/FrameHandler.py +56 -0
- autosegmentor-3.0.0/autosegmentor/file_management/ImageCopier.py +71 -0
- autosegmentor-3.0.0/autosegmentor/file_management/ImageOverlayProcessor.py +82 -0
- autosegmentor-3.0.0/autosegmentor/file_management/KeypointTracker.py +7 -0
- autosegmentor-3.0.0/autosegmentor/file_management/MaskProcessor.py +223 -0
- autosegmentor-3.0.0/autosegmentor/file_management/PoseExporter.py +246 -0
- autosegmentor-3.0.0/autosegmentor/file_management/VideoCreator.py +58 -0
- autosegmentor-3.0.0/autosegmentor/file_management/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/models/SAM/AppConfig.py +73 -0
- autosegmentor-3.0.0/autosegmentor/models/SAM/SAM2Model.py +53 -0
- autosegmentor-3.0.0/autosegmentor/models/SAM/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/models/Tracking/CoTrackerPredictor.py +287 -0
- autosegmentor-3.0.0/autosegmentor/models/Tracking/LKKeypointTracker.py +131 -0
- autosegmentor-3.0.0/autosegmentor/models/Tracking/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/models/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/models/model_info.py +69 -0
- autosegmentor-3.0.0/autosegmentor/pipeline.py +232 -0
- autosegmentor-3.0.0/autosegmentor/tests/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/tests/integration/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/tests/integration/test_pipeline.py +142 -0
- autosegmentor-3.0.0/autosegmentor/tests/ui/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/tests/ui/test_annotation_window.py +474 -0
- autosegmentor-3.0.0/autosegmentor/tests/ui/test_point_move.py +86 -0
- autosegmentor-3.0.0/autosegmentor/tests/ui/test_setup_dialog.py +275 -0
- autosegmentor-3.0.0/autosegmentor/tests/unit/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/tests/unit/test_config.py +82 -0
- autosegmentor-3.0.0/autosegmentor/tests/unit/test_engine_cotracker_fallback.py +153 -0
- autosegmentor-3.0.0/autosegmentor/tests/unit/test_file_management.py +145 -0
- autosegmentor-3.0.0/autosegmentor/tests/unit/test_lk_tracker.py +81 -0
- autosegmentor-3.0.0/autosegmentor/tools/__init__.py +1 -0
- autosegmentor-3.0.0/autosegmentor/tools/demo_registry.py +75 -0
- autosegmentor-3.0.0/autosegmentor/tools/export_yolo_pose.py +216 -0
- autosegmentor-3.0.0/autosegmentor/tools/main_app.py +171 -0
- autosegmentor-3.0.0/autosegmentor/tools/visualize_pose_images.py +244 -0
- autosegmentor-3.0.0/autosegmentor/tools/visualize_pose_video.py +202 -0
- autosegmentor-3.0.0/autosegmentor/ui/AnnotationCanvas.py +739 -0
- autosegmentor-3.0.0/autosegmentor/ui/AnnotationManager.py +283 -0
- autosegmentor-3.0.0/autosegmentor/ui/ExportDialog.py +340 -0
- autosegmentor-3.0.0/autosegmentor/ui/MainWindow.py +1461 -0
- autosegmentor-3.0.0/autosegmentor/ui/NavigationManager.py +273 -0
- autosegmentor-3.0.0/autosegmentor/ui/SetupDialog.py +632 -0
- autosegmentor-3.0.0/autosegmentor/ui/SidePanel.py +712 -0
- autosegmentor-3.0.0/autosegmentor/ui/UITheme.py +538 -0
- autosegmentor-3.0.0/autosegmentor/ui/UserInteraction.py +498 -0
- autosegmentor-3.0.0/autosegmentor/ui/__init__.py +0 -0
- autosegmentor-3.0.0/autosegmentor/ui/logger_config.py +27 -0
- autosegmentor-3.0.0/autosegmentor.egg-info/PKG-INFO +161 -0
- autosegmentor-3.0.0/autosegmentor.egg-info/SOURCES.txt +93 -0
- autosegmentor-3.0.0/autosegmentor.egg-info/dependency_links.txt +1 -0
- autosegmentor-3.0.0/autosegmentor.egg-info/entry_points.txt +3 -0
- autosegmentor-3.0.0/autosegmentor.egg-info/requires.txt +31 -0
- autosegmentor-3.0.0/autosegmentor.egg-info/top_level.txt +4 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/SAM_2.md +224 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/_C.pyd +0 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/__init__.py +12 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/automatic_mask_generator.py +454 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/build_sam.py +126 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/csrc/connected_components.cu +289 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/__init__.py +5 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/backbones/__init__.py +5 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/backbones/hieradet.py +291 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/backbones/image_encoder.py +133 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/backbones/utils.py +95 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/memory_attention.py +169 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/memory_encoder.py +181 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/position_encoding.py +221 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/sam/__init__.py +5 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/sam/mask_decoder.py +295 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/sam/prompt_encoder.py +182 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/sam/transformer.py +360 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/sam2_base.py +829 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/modeling/sam2_utils.py +149 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/sam2_image_predictor.py +466 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/sam2_video_predictor.py +958 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/utils/__init__.py +5 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/utils/amg.py +348 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/utils/misc.py +302 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2/utils/transforms.py +118 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2_configs/__init__.py +1 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2_configs/sam2_hiera_b+.yaml +113 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2_configs/sam2_hiera_l.yaml +117 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2_configs/sam2_hiera_s.yaml +116 -0
- autosegmentor-3.0.0/external/segment_anything_2/sam2_configs/sam2_hiera_t.yaml +118 -0
- autosegmentor-3.0.0/pyproject.toml +84 -0
- autosegmentor-3.0.0/run_main.py +119 -0
- autosegmentor-3.0.0/setup.cfg +4 -0
- autosegmentor-3.0.0/setup.py +30 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: autosegmentor
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Auto-labeling ecosystem converting raw video into YOLO-ready datasets using SAM2 + CoTracker3.
|
|
5
|
+
Author-email: Thippeswamy <thippeswamy636408@gmai.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/thippeswammy/AutoSegmentor
|
|
8
|
+
Project-URL: Repository, https://github.com/thippeswammy/AutoSegmentor
|
|
9
|
+
Project-URL: Issues, https://github.com/thippeswammy/AutoSegmentor/issues
|
|
10
|
+
Keywords: computer-vision,sam2,cotracker,yolo,segmentation,pose,auto-labeling
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: numpy>=1.24
|
|
23
|
+
Requires-Dist: opencv-python>=4.8
|
|
24
|
+
Requires-Dist: opencv-python-headless>=4.8
|
|
25
|
+
Requires-Dist: PyYAML>=6.0
|
|
26
|
+
Requires-Dist: torch>=2.0
|
|
27
|
+
Requires-Dist: torchvision>=0.15
|
|
28
|
+
Requires-Dist: PyQt5>=5.15
|
|
29
|
+
Requires-Dist: ultralytics>=8.0
|
|
30
|
+
Requires-Dist: albumentations>=1.3
|
|
31
|
+
Requires-Dist: Pillow>=10.0
|
|
32
|
+
Requires-Dist: scipy>=1.10
|
|
33
|
+
Requires-Dist: matplotlib>=3.7
|
|
34
|
+
Requires-Dist: GPUtil>=1.4
|
|
35
|
+
Requires-Dist: google-genai>=1.0
|
|
36
|
+
Requires-Dist: google-generativeai>=0.8
|
|
37
|
+
Requires-Dist: onnx>=1.16
|
|
38
|
+
Requires-Dist: onnxruntime-gpu>=1.18
|
|
39
|
+
Requires-Dist: hydra-core>=1.1
|
|
40
|
+
Requires-Dist: omegaconf>=2.1
|
|
41
|
+
Requires-Dist: platformdirs>=4.0
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-qt>=4.2; extra == "dev"
|
|
45
|
+
Requires-Dist: pyinstaller>=6.0; extra == "dev"
|
|
46
|
+
Provides-Extra: cuda
|
|
47
|
+
Requires-Dist: flash-attn>=2.0; extra == "cuda"
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
|
|
50
|
+
|
|
51
|
+
# AutoSegmentor
|
|
52
|
+
|
|
53
|
+
[](https://github.com/thippeswammy/AutoSegmentor)
|
|
54
|
+
[](https://thippeswammy.github.io/AutoSegmentor/)
|
|
55
|
+
[](https://drive.google.com/file/d/1Y19lwf_IIuzwVe-3j9vX0uicV_iWbrHZ/view?usp=sharing)
|
|
56
|
+
|
|
57
|
+
<video controls preload="metadata" width="720" poster="https://raw.githubusercontent.com/thippeswammy/AutoSegmentor/master/assets/cat_poster.jpg">
|
|
58
|
+
<source src="https://media.githubusercontent.com/media/thippeswammy/AutoSegmentor/master/assets/AutoSegmenterCat.mp4" type="video/mp4">
|
|
59
|
+
</video>
|
|
60
|
+
|
|
61
|
+
_AutoSegmentor is a state-of-the-art auto-labeling ecosystem that bridges the gap between raw video footage and structured AI datasets. By integrating Meta AI's **Segment Anything Model 2 (SAM2)** with high-precision tracking like **CoTracker3**, it enables users to generate pixel-perfect masks and pose estimation data for long, complex videos with minimal manual interaction._
|
|
62
|
+
|
|
63
|
+
**📖 [Full documentation, demos, and architecture guide →](https://thippeswammy.github.io/AutoSegmentor/)**
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ✨ Features
|
|
68
|
+
|
|
69
|
+
- **Professional Desktop UI**: A fully-featured PyQt5 application with multi-window support, integrated property panels, and real-time visualization.
|
|
70
|
+
- **Interactive Annotation**: Point and box-based multi-class annotation with a high-fidelity zoom system for precision.
|
|
71
|
+
- **Advanced Tracking (CoTracker3)**: Robust keypoint tracking across frames — an alternative to Optical Flow for complex scenes.
|
|
72
|
+
- **Real-time Mask Propagation**: Propagate annotations across batches of frames using SAM2's temporal memory.
|
|
73
|
+
- **Async Processing Engine**: Background execution of GPU tasks keeps the UI responsive during heavy inference.
|
|
74
|
+
- **YOLO Dataset Creation**: One export covers **object detection (bbox)**, **instance segmentation**, and **pose estimation** simultaneously, with integrated augmentation.
|
|
75
|
+
|
|
76
|
+
## 🚀 Quickstart
|
|
77
|
+
|
|
78
|
+
Tested on **Windows 11** and **Ubuntu 22.04/24.04**. Full walkthrough (prerequisites,
|
|
79
|
+
manual install path, troubleshooting):
|
|
80
|
+
**[Installation guide →](https://thippeswammy.github.io/AutoSegmentor/installation/)**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone --recursive https://github.com/thippeswammy/AutoSegmentor.git
|
|
84
|
+
cd AutoSegmentor
|
|
85
|
+
python -m venv .venv && source .venv/bin/activate # or .venv\Scripts\Activate.ps1 on Windows
|
|
86
|
+
python install.py
|
|
87
|
+
python run_main.py --demo cat
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`install.py` is a single cross-platform script that installs dependencies, initializes
|
|
91
|
+
submodules, downloads the SAM2 + CoTracker3 checkpoints, and runs a GPU diagnostic — see
|
|
92
|
+
`python install.py --help` for flags to skip or isolate individual steps.
|
|
93
|
+
|
|
94
|
+
## 🎬 Demos
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
python run_main.py --demo list # cat, road
|
|
98
|
+
python run_main.py --demo cat
|
|
99
|
+
python run_main.py --demo road
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
See **[Demos →](https://thippeswammy.github.io/AutoSegmentor/demos/)** for what each bundled
|
|
103
|
+
demo shows. The `road` demo (SAM2 segmentation only, no pose tracking):
|
|
104
|
+
|
|
105
|
+
<video controls preload="metadata" width="720" poster="https://raw.githubusercontent.com/thippeswammy/AutoSegmentor/master/assets/road_poster.jpg">
|
|
106
|
+
<source src="https://media.githubusercontent.com/media/thippeswammy/AutoSegmentor/master/assets/AutoSegmenterRoad.mp4" type="video/mp4">
|
|
107
|
+
</video>
|
|
108
|
+
|
|
109
|
+
**Using your own video?** Drop it in `workspace/VideoInputs/` and just run
|
|
110
|
+
`python run_main.py` (no `--demo`) — a Setup Dialog opens where you pick the video and
|
|
111
|
+
configure SAM2/CoTracker3, run mode, and pose classes, then the same annotation workflow
|
|
112
|
+
as the demos takes over. See the
|
|
113
|
+
**[Installation guide →](https://thippeswammy.github.io/AutoSegmentor/installation/#running-on-your-own-video-not-a-demo)**
|
|
114
|
+
for details.
|
|
115
|
+
|
|
116
|
+
## ⌨️ Annotation Controls
|
|
117
|
+
|
|
118
|
+
| Action | Control |
|
|
119
|
+
| :--- | :--- |
|
|
120
|
+
| **Foreground Point** | Left Click |
|
|
121
|
+
| **Background Point** | Right Click |
|
|
122
|
+
| **Undo / Redo** | `Ctrl + Z` / `Ctrl + Y` |
|
|
123
|
+
| **Navigate Frames** | `A` / `D` or `Left` / `Right` |
|
|
124
|
+
| **Turbo Scroll** | `Shift + A` / `Shift + D` |
|
|
125
|
+
| **Batch Navigation** | `[` / `]` |
|
|
126
|
+
| **Change Class (1-10)** | Keys `1` to `0` |
|
|
127
|
+
| **Instance Management** | `Tab` (Next) / `Shift + Tab` (Prev) |
|
|
128
|
+
| **Toggle Mask Overlay** | `M` |
|
|
129
|
+
| **Process Batch** | `Enter` / `Return` |
|
|
130
|
+
| **Save Progress** | `Ctrl + S` |
|
|
131
|
+
| **Export Dataset** | `Ctrl + E` |
|
|
132
|
+
|
|
133
|
+
## 🏗️ Architecture
|
|
134
|
+
|
|
135
|
+
A PyQt5 annotation UI drives a background engine wrapping SAM2 (mask propagation) and
|
|
136
|
+
CoTracker3 (keypoint tracking), with a separate downstream toolchain (`DatasetManager/`)
|
|
137
|
+
turning verified annotations into YOLO-format training data. For the full call flow,
|
|
138
|
+
diagram, and package breakdown, see the
|
|
139
|
+
**[Architecture guide →](https://thippeswammy.github.io/AutoSegmentor/architecture/)**.
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
AutoSegmentor/
|
|
143
|
+
├── run_main.py # Main entry point
|
|
144
|
+
├── install.py # One-shot setup (deps, submodules, checkpoints, GPU check)
|
|
145
|
+
├── autosegmentor/ # Core application package (core, ui, models, file_management, tools)
|
|
146
|
+
├── DatasetManager/ # Dataset export & synthesis — see the Dataset Manager guide
|
|
147
|
+
├── workspace/ # Project workspace (videos in, datasets/logs out)
|
|
148
|
+
├── external/ # Vendored SAM2 + CoTracker3
|
|
149
|
+
├── demo/ # Bundled demo footage + session configs
|
|
150
|
+
└── docs/ # Source for the documentation site
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Acknowledgements
|
|
154
|
+
|
|
155
|
+
- [Meta AI's SAM2](https://github.com/facebookresearch/segment-anything-2)
|
|
156
|
+
- [CoTracker Team](https://github.com/facebookresearch/co-tracker)
|
|
157
|
+
- All open-source contributors to the PyTorch and PyQt ecosystems.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
**Built with ❤️ for the Computer Vision community.**
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# AutoSegmentor
|
|
2
|
+
|
|
3
|
+
[](https://github.com/thippeswammy/AutoSegmentor)
|
|
4
|
+
[](https://thippeswammy.github.io/AutoSegmentor/)
|
|
5
|
+
[](https://drive.google.com/file/d/1Y19lwf_IIuzwVe-3j9vX0uicV_iWbrHZ/view?usp=sharing)
|
|
6
|
+
|
|
7
|
+
<video controls preload="metadata" width="720" poster="https://raw.githubusercontent.com/thippeswammy/AutoSegmentor/master/assets/cat_poster.jpg">
|
|
8
|
+
<source src="https://media.githubusercontent.com/media/thippeswammy/AutoSegmentor/master/assets/AutoSegmenterCat.mp4" type="video/mp4">
|
|
9
|
+
</video>
|
|
10
|
+
|
|
11
|
+
_AutoSegmentor is a state-of-the-art auto-labeling ecosystem that bridges the gap between raw video footage and structured AI datasets. By integrating Meta AI's **Segment Anything Model 2 (SAM2)** with high-precision tracking like **CoTracker3**, it enables users to generate pixel-perfect masks and pose estimation data for long, complex videos with minimal manual interaction._
|
|
12
|
+
|
|
13
|
+
**📖 [Full documentation, demos, and architecture guide →](https://thippeswammy.github.io/AutoSegmentor/)**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## ✨ Features
|
|
18
|
+
|
|
19
|
+
- **Professional Desktop UI**: A fully-featured PyQt5 application with multi-window support, integrated property panels, and real-time visualization.
|
|
20
|
+
- **Interactive Annotation**: Point and box-based multi-class annotation with a high-fidelity zoom system for precision.
|
|
21
|
+
- **Advanced Tracking (CoTracker3)**: Robust keypoint tracking across frames — an alternative to Optical Flow for complex scenes.
|
|
22
|
+
- **Real-time Mask Propagation**: Propagate annotations across batches of frames using SAM2's temporal memory.
|
|
23
|
+
- **Async Processing Engine**: Background execution of GPU tasks keeps the UI responsive during heavy inference.
|
|
24
|
+
- **YOLO Dataset Creation**: One export covers **object detection (bbox)**, **instance segmentation**, and **pose estimation** simultaneously, with integrated augmentation.
|
|
25
|
+
|
|
26
|
+
## 🚀 Quickstart
|
|
27
|
+
|
|
28
|
+
Tested on **Windows 11** and **Ubuntu 22.04/24.04**. Full walkthrough (prerequisites,
|
|
29
|
+
manual install path, troubleshooting):
|
|
30
|
+
**[Installation guide →](https://thippeswammy.github.io/AutoSegmentor/installation/)**
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone --recursive https://github.com/thippeswammy/AutoSegmentor.git
|
|
34
|
+
cd AutoSegmentor
|
|
35
|
+
python -m venv .venv && source .venv/bin/activate # or .venv\Scripts\Activate.ps1 on Windows
|
|
36
|
+
python install.py
|
|
37
|
+
python run_main.py --demo cat
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`install.py` is a single cross-platform script that installs dependencies, initializes
|
|
41
|
+
submodules, downloads the SAM2 + CoTracker3 checkpoints, and runs a GPU diagnostic — see
|
|
42
|
+
`python install.py --help` for flags to skip or isolate individual steps.
|
|
43
|
+
|
|
44
|
+
## 🎬 Demos
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
python run_main.py --demo list # cat, road
|
|
48
|
+
python run_main.py --demo cat
|
|
49
|
+
python run_main.py --demo road
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
See **[Demos →](https://thippeswammy.github.io/AutoSegmentor/demos/)** for what each bundled
|
|
53
|
+
demo shows. The `road` demo (SAM2 segmentation only, no pose tracking):
|
|
54
|
+
|
|
55
|
+
<video controls preload="metadata" width="720" poster="https://raw.githubusercontent.com/thippeswammy/AutoSegmentor/master/assets/road_poster.jpg">
|
|
56
|
+
<source src="https://media.githubusercontent.com/media/thippeswammy/AutoSegmentor/master/assets/AutoSegmenterRoad.mp4" type="video/mp4">
|
|
57
|
+
</video>
|
|
58
|
+
|
|
59
|
+
**Using your own video?** Drop it in `workspace/VideoInputs/` and just run
|
|
60
|
+
`python run_main.py` (no `--demo`) — a Setup Dialog opens where you pick the video and
|
|
61
|
+
configure SAM2/CoTracker3, run mode, and pose classes, then the same annotation workflow
|
|
62
|
+
as the demos takes over. See the
|
|
63
|
+
**[Installation guide →](https://thippeswammy.github.io/AutoSegmentor/installation/#running-on-your-own-video-not-a-demo)**
|
|
64
|
+
for details.
|
|
65
|
+
|
|
66
|
+
## ⌨️ Annotation Controls
|
|
67
|
+
|
|
68
|
+
| Action | Control |
|
|
69
|
+
| :--- | :--- |
|
|
70
|
+
| **Foreground Point** | Left Click |
|
|
71
|
+
| **Background Point** | Right Click |
|
|
72
|
+
| **Undo / Redo** | `Ctrl + Z` / `Ctrl + Y` |
|
|
73
|
+
| **Navigate Frames** | `A` / `D` or `Left` / `Right` |
|
|
74
|
+
| **Turbo Scroll** | `Shift + A` / `Shift + D` |
|
|
75
|
+
| **Batch Navigation** | `[` / `]` |
|
|
76
|
+
| **Change Class (1-10)** | Keys `1` to `0` |
|
|
77
|
+
| **Instance Management** | `Tab` (Next) / `Shift + Tab` (Prev) |
|
|
78
|
+
| **Toggle Mask Overlay** | `M` |
|
|
79
|
+
| **Process Batch** | `Enter` / `Return` |
|
|
80
|
+
| **Save Progress** | `Ctrl + S` |
|
|
81
|
+
| **Export Dataset** | `Ctrl + E` |
|
|
82
|
+
|
|
83
|
+
## 🏗️ Architecture
|
|
84
|
+
|
|
85
|
+
A PyQt5 annotation UI drives a background engine wrapping SAM2 (mask propagation) and
|
|
86
|
+
CoTracker3 (keypoint tracking), with a separate downstream toolchain (`DatasetManager/`)
|
|
87
|
+
turning verified annotations into YOLO-format training data. For the full call flow,
|
|
88
|
+
diagram, and package breakdown, see the
|
|
89
|
+
**[Architecture guide →](https://thippeswammy.github.io/AutoSegmentor/architecture/)**.
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
AutoSegmentor/
|
|
93
|
+
├── run_main.py # Main entry point
|
|
94
|
+
├── install.py # One-shot setup (deps, submodules, checkpoints, GPU check)
|
|
95
|
+
├── autosegmentor/ # Core application package (core, ui, models, file_management, tools)
|
|
96
|
+
├── DatasetManager/ # Dataset export & synthesis — see the Dataset Manager guide
|
|
97
|
+
├── workspace/ # Project workspace (videos in, datasets/logs out)
|
|
98
|
+
├── external/ # Vendored SAM2 + CoTracker3
|
|
99
|
+
├── demo/ # Bundled demo footage + session configs
|
|
100
|
+
└── docs/ # Source for the documentation site
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Acknowledgements
|
|
104
|
+
|
|
105
|
+
- [Meta AI's SAM2](https://github.com/facebookresearch/segment-anything-2)
|
|
106
|
+
- [CoTracker Team](https://github.com/facebookresearch/co-tracker)
|
|
107
|
+
- All open-source contributors to the PyTorch and PyQt ecosystems.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
**Built with ❤️ for the Computer Vision community.**
|