Name | dance-video-toolkit JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | AI-powered dance video processing toolkit for filtering multi-person videos and splitting dance clips |
upload_time | 2025-08-09 14:09:22 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License
Copyright (c) 2024 Dance Video Toolkit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
dance
video
ai
pose-detection
video-processing
yolo
ultralytics
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 舞蹈视频处理工具包 🎯
简洁高效的舞蹈视频处理工具包,专注于两个核心功能:过滤多人视频和切分舞蹈片段。
## 🚀 核心功能
### 功能1: 过滤多人视频
- **智能检测**: 自动识别视频中的舞者人数
- **批量过滤**: 标记多人视频,保留单人舞蹈
- **结果记录**: 自动生成过滤报告
### 功能2: 切分舞蹈视频
- **精准识别**: 基于上半身+臀部+大腿的严格检测
- **自动切分**: 智能识别舞蹈片段并提取
- **长度过滤**: 自动丢弃小于5秒的短片段
- **模型优化**: 支持多种YOLOv8模型,自动GPU加速
## 📦 安装
```bash
# 安装依赖
pip install -r requirements.in
# 确保FFmpeg已安装
ffmpeg -version
```
## 🎯 快速开始
### 功能1:过滤多人视频
```bash
# 过滤目录中的多人视频
python dance_toolkit.py /path/to/videos --mode filter
# 递归处理子目录
python dance_toolkit.py /path/to/videos --mode filter --recursive
```
### 功能2:切分舞蹈视频
```bash
# 切分舞蹈视频
python dance_toolkit.py /path/to/videos --mode split
# 同时过滤多人并切分
python dance_toolkit.py /path/to/videos --mode both
# 处理单个文件
python dance_toolkit.py video.mp4 --mode split
```
## ⚙️ 高级配置
```bash
# 自定义参数
python dance_toolkit.py /path/to/videos \
--mode split \
--model yolov8m-pose.pt \
--min-duration 8.0 \
--sample-interval 2 \
--output my_output \
--debug
```
### 参数说明
| 参数 | 默认值 | 说明 |
|------|--------|------|
| `--mode` | split | 处理模式: filter/split/both |
| `--model` | yolov8n-pose.pt | 姿势检测模型 |
| `--min-duration` | 5.0 | 最小时长(秒),小于此值丢弃 |
| `--sample-interval` | 3 | 采样间隔(秒) |
| `--recursive` | False | 递归处理子目录 |
| `--debug` | False | 启用调试模式 |
## 📊 检测逻辑
### 舞蹈检测标准
- **上半身**: 肩膀关键点有效
- **臀部**: 臀部关键点有效
- **大腿**: 臀部关键点有效(代表大腿出现)
- **置信度**: > 0.5
### 模型选择
- `yolov8n-pose.pt` - 超轻量,速度最快
- `yolov8s-pose.pt` - 小模型,平衡性能
- `yolov8m-pose.pt` - 中等模型,精度更好
- `yolov8l-pose.pt` - 大模型,高精度
- `yolov8x-pose.pt` - 超大模型,最高精度
## 📁 输出结构
```
output/
├── logs/
│ └── dance_toolkit_YYYYMMDD_HHMMSS.log
├── filter_results.json # 过滤结果记录
├── 【视频名】/
│ ├── clip_001_0s-15s.mp4
│ ├── clip_002_25s-40s.mp4
│ └── processing_info.json
└── ...
```
## 🎬 使用场景
1. **舞蹈教学**: 提取干净的教学片段
2. **内容创作**: 准备舞蹈素材
3. **数据清洗**: 过滤掉多人干扰视频
4. **批量处理**: 大规模视频整理
## 📈 性能优化
- CPU/GPU自动选择
- 稀疏采样减少处理时间
- 流式复制保持视频质量
- 批处理支持
Raw data
{
"_id": null,
"home_page": null,
"name": "dance-video-toolkit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "dance, video, ai, pose-detection, video-processing, yolo, ultralytics",
"author": null,
"author_email": "Dance Toolkit Team <dance@example.com>",
"download_url": "https://files.pythonhosted.org/packages/46/d9/4acc68c1f1951b870d26a48345d6611ca21eb1d955a2eb1cb19dbff336e1/dance_video_toolkit-1.0.0.tar.gz",
"platform": null,
"description": "# \u821e\u8e48\u89c6\u9891\u5904\u7406\u5de5\u5177\u5305 \ud83c\udfaf\n\n\u7b80\u6d01\u9ad8\u6548\u7684\u821e\u8e48\u89c6\u9891\u5904\u7406\u5de5\u5177\u5305\uff0c\u4e13\u6ce8\u4e8e\u4e24\u4e2a\u6838\u5fc3\u529f\u80fd\uff1a\u8fc7\u6ee4\u591a\u4eba\u89c6\u9891\u548c\u5207\u5206\u821e\u8e48\u7247\u6bb5\u3002\n\n## \ud83d\ude80 \u6838\u5fc3\u529f\u80fd\n\n### \u529f\u80fd1: \u8fc7\u6ee4\u591a\u4eba\u89c6\u9891\n- **\u667a\u80fd\u68c0\u6d4b**: \u81ea\u52a8\u8bc6\u522b\u89c6\u9891\u4e2d\u7684\u821e\u8005\u4eba\u6570\n- **\u6279\u91cf\u8fc7\u6ee4**: \u6807\u8bb0\u591a\u4eba\u89c6\u9891\uff0c\u4fdd\u7559\u5355\u4eba\u821e\u8e48\n- **\u7ed3\u679c\u8bb0\u5f55**: \u81ea\u52a8\u751f\u6210\u8fc7\u6ee4\u62a5\u544a\n\n### \u529f\u80fd2: \u5207\u5206\u821e\u8e48\u89c6\u9891\n- **\u7cbe\u51c6\u8bc6\u522b**: \u57fa\u4e8e\u4e0a\u534a\u8eab+\u81c0\u90e8+\u5927\u817f\u7684\u4e25\u683c\u68c0\u6d4b\n- **\u81ea\u52a8\u5207\u5206**: \u667a\u80fd\u8bc6\u522b\u821e\u8e48\u7247\u6bb5\u5e76\u63d0\u53d6\n- **\u957f\u5ea6\u8fc7\u6ee4**: \u81ea\u52a8\u4e22\u5f03\u5c0f\u4e8e5\u79d2\u7684\u77ed\u7247\u6bb5\n- **\u6a21\u578b\u4f18\u5316**: \u652f\u6301\u591a\u79cdYOLOv8\u6a21\u578b\uff0c\u81ea\u52a8GPU\u52a0\u901f\n\n## \ud83d\udce6 \u5b89\u88c5\n\n```bash\n# \u5b89\u88c5\u4f9d\u8d56\npip install -r requirements.in\n\n# \u786e\u4fddFFmpeg\u5df2\u5b89\u88c5\nffmpeg -version\n```\n\n## \ud83c\udfaf \u5feb\u901f\u5f00\u59cb\n\n### \u529f\u80fd1\uff1a\u8fc7\u6ee4\u591a\u4eba\u89c6\u9891\n```bash\n# \u8fc7\u6ee4\u76ee\u5f55\u4e2d\u7684\u591a\u4eba\u89c6\u9891\npython dance_toolkit.py /path/to/videos --mode filter\n\n# \u9012\u5f52\u5904\u7406\u5b50\u76ee\u5f55\npython dance_toolkit.py /path/to/videos --mode filter --recursive\n```\n\n### \u529f\u80fd2\uff1a\u5207\u5206\u821e\u8e48\u89c6\u9891\n```bash\n# \u5207\u5206\u821e\u8e48\u89c6\u9891\npython dance_toolkit.py /path/to/videos --mode split\n\n# \u540c\u65f6\u8fc7\u6ee4\u591a\u4eba\u5e76\u5207\u5206\npython dance_toolkit.py /path/to/videos --mode both\n\n# \u5904\u7406\u5355\u4e2a\u6587\u4ef6\npython dance_toolkit.py video.mp4 --mode split\n```\n\n## \u2699\ufe0f \u9ad8\u7ea7\u914d\u7f6e\n\n```bash\n# \u81ea\u5b9a\u4e49\u53c2\u6570\npython dance_toolkit.py /path/to/videos \\\n --mode split \\\n --model yolov8m-pose.pt \\\n --min-duration 8.0 \\\n --sample-interval 2 \\\n --output my_output \\\n --debug\n```\n\n### \u53c2\u6570\u8bf4\u660e\n\n| \u53c2\u6570 | \u9ed8\u8ba4\u503c | \u8bf4\u660e |\n|------|--------|------|\n| `--mode` | split | \u5904\u7406\u6a21\u5f0f: filter/split/both |\n| `--model` | yolov8n-pose.pt | \u59ff\u52bf\u68c0\u6d4b\u6a21\u578b |\n| `--min-duration` | 5.0 | \u6700\u5c0f\u65f6\u957f(\u79d2)\uff0c\u5c0f\u4e8e\u6b64\u503c\u4e22\u5f03 |\n| `--sample-interval` | 3 | \u91c7\u6837\u95f4\u9694(\u79d2) |\n| `--recursive` | False | \u9012\u5f52\u5904\u7406\u5b50\u76ee\u5f55 |\n| `--debug` | False | \u542f\u7528\u8c03\u8bd5\u6a21\u5f0f |\n\n## \ud83d\udcca \u68c0\u6d4b\u903b\u8f91\n\n### \u821e\u8e48\u68c0\u6d4b\u6807\u51c6\n- **\u4e0a\u534a\u8eab**: \u80a9\u8180\u5173\u952e\u70b9\u6709\u6548\n- **\u81c0\u90e8**: \u81c0\u90e8\u5173\u952e\u70b9\u6709\u6548\n- **\u5927\u817f**: \u81c0\u90e8\u5173\u952e\u70b9\u6709\u6548\uff08\u4ee3\u8868\u5927\u817f\u51fa\u73b0\uff09\n- **\u7f6e\u4fe1\u5ea6**: > 0.5\n\n### \u6a21\u578b\u9009\u62e9\n- `yolov8n-pose.pt` - \u8d85\u8f7b\u91cf\uff0c\u901f\u5ea6\u6700\u5feb\n- `yolov8s-pose.pt` - \u5c0f\u6a21\u578b\uff0c\u5e73\u8861\u6027\u80fd\n- `yolov8m-pose.pt` - \u4e2d\u7b49\u6a21\u578b\uff0c\u7cbe\u5ea6\u66f4\u597d\n- `yolov8l-pose.pt` - \u5927\u6a21\u578b\uff0c\u9ad8\u7cbe\u5ea6\n- `yolov8x-pose.pt` - \u8d85\u5927\u6a21\u578b\uff0c\u6700\u9ad8\u7cbe\u5ea6\n\n## \ud83d\udcc1 \u8f93\u51fa\u7ed3\u6784\n\n```\noutput/\n\u251c\u2500\u2500 logs/\n\u2502 \u2514\u2500\u2500 dance_toolkit_YYYYMMDD_HHMMSS.log\n\u251c\u2500\u2500 filter_results.json # \u8fc7\u6ee4\u7ed3\u679c\u8bb0\u5f55\n\u251c\u2500\u2500 \u3010\u89c6\u9891\u540d\u3011/\n\u2502 \u251c\u2500\u2500 clip_001_0s-15s.mp4\n\u2502 \u251c\u2500\u2500 clip_002_25s-40s.mp4\n\u2502 \u2514\u2500\u2500 processing_info.json\n\u2514\u2500\u2500 ...\n```\n\n## \ud83c\udfac \u4f7f\u7528\u573a\u666f\n\n1. **\u821e\u8e48\u6559\u5b66**: \u63d0\u53d6\u5e72\u51c0\u7684\u6559\u5b66\u7247\u6bb5\n2. **\u5185\u5bb9\u521b\u4f5c**: \u51c6\u5907\u821e\u8e48\u7d20\u6750\n3. **\u6570\u636e\u6e05\u6d17**: \u8fc7\u6ee4\u6389\u591a\u4eba\u5e72\u6270\u89c6\u9891\n4. **\u6279\u91cf\u5904\u7406**: \u5927\u89c4\u6a21\u89c6\u9891\u6574\u7406\n\n## \ud83d\udcc8 \u6027\u80fd\u4f18\u5316\n\n- CPU/GPU\u81ea\u52a8\u9009\u62e9\n- \u7a00\u758f\u91c7\u6837\u51cf\u5c11\u5904\u7406\u65f6\u95f4\n- \u6d41\u5f0f\u590d\u5236\u4fdd\u6301\u89c6\u9891\u8d28\u91cf\n- \u6279\u5904\u7406\u652f\u6301\n\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 Dance Video Toolkit\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "AI-powered dance video processing toolkit for filtering multi-person videos and splitting dance clips",
"version": "1.0.0",
"project_urls": {
"Documentation": "https://github.com/yourusername/dance-video-toolkit/blob/main/README.md",
"Homepage": "https://github.com/yourusername/dance-video-toolkit",
"Issues": "https://github.com/yourusername/dance-video-toolkit/issues",
"Repository": "https://github.com/yourusername/dance-video-toolkit.git"
},
"split_keywords": [
"dance",
" video",
" ai",
" pose-detection",
" video-processing",
" yolo",
" ultralytics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e137573cf8cb830cb1d3097338b5053ca7a8199c40b399c7e11ff10837be444d",
"md5": "deecc700b20b46666e6dfa556f8ba7f1",
"sha256": "d9ba8fe8c6e854abc756599711b62e7c0dbb6ac6109a889f67972bfdacf1bcdb"
},
"downloads": -1,
"filename": "dance_video_toolkit-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "deecc700b20b46666e6dfa556f8ba7f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 19583,
"upload_time": "2025-08-09T14:09:21",
"upload_time_iso_8601": "2025-08-09T14:09:21.084498Z",
"url": "https://files.pythonhosted.org/packages/e1/37/573cf8cb830cb1d3097338b5053ca7a8199c40b399c7e11ff10837be444d/dance_video_toolkit-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "46d94acc68c1f1951b870d26a48345d6611ca21eb1d955a2eb1cb19dbff336e1",
"md5": "5d3fda6aa5c6cadec5050e29d307b5d1",
"sha256": "12f46c31a83aeb67f609630ff1e2fd5ba5b9031c0baa693f1607b24c75c8aace"
},
"downloads": -1,
"filename": "dance_video_toolkit-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "5d3fda6aa5c6cadec5050e29d307b5d1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 18697,
"upload_time": "2025-08-09T14:09:22",
"upload_time_iso_8601": "2025-08-09T14:09:22.494777Z",
"url": "https://files.pythonhosted.org/packages/46/d9/4acc68c1f1951b870d26a48345d6611ca21eb1d955a2eb1cb19dbff336e1/dance_video_toolkit-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-09 14:09:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "dance-video-toolkit",
"github_not_found": true,
"lcname": "dance-video-toolkit"
}