All Projects → williamfzc → Stagesepx

williamfzc / Stagesepx

Licence: mit
detect stages in video automatically

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Stagesepx

Pcp
Performance Co-Pilot
Stars: ✭ 716 (+144.37%)
Mutual labels:  lightweight, performance
Electron Global
One Electron instance for multiple apps
Stars: ✭ 129 (-55.97%)
Mutual labels:  lightweight, app
Uplot
📈 A small, fast chart for time series, lines, areas, ohlc & bars
Stars: ✭ 6,808 (+2223.55%)
Mutual labels:  lightweight, performance
Lightkeeper
Run Lighthouse tests in Pull Requests for multiple URLs with custom budgets
Stars: ✭ 83 (-71.67%)
Mutual labels:  performance, app
Api
Minimal, extremely fast, lightweight Ruby framework for HTTP APIs
Stars: ✭ 252 (-13.99%)
Mutual labels:  lightweight, performance
Viperhtml
Isomorphic hyperHTML
Stars: ✭ 318 (+8.53%)
Mutual labels:  lightweight, performance
Torchlambda
Lightweight tool to deploy PyTorch models to AWS Lambda
Stars: ✭ 83 (-71.67%)
Mutual labels:  lightweight, performance
Pytorch classification
利用pytorch实现图像分类的一个完整的代码,训练,预测,TTA,模型融合,模型部署,cnn提取特征,svm或者随机森林等进行分类,模型蒸馏,一个完整的代码
Stars: ✭ 395 (+34.81%)
Mutual labels:  image-classification, svm
Quick Picture Viewer
🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.
Stars: ✭ 237 (-19.11%)
Mutual labels:  lightweight, app
Taskr
A fast, concurrency-focused task automation tool.
Stars: ✭ 2,421 (+726.28%)
Mutual labels:  lightweight, performance
Quick Screen Recorder
Lightweight desktop screen recorder for Windows.
Stars: ✭ 80 (-72.7%)
Mutual labels:  lightweight, app
Bag-of-Visual-Words
🎒 Bag of Visual words (BoW) approach for object classification and detection in images together with SIFT feature extractor and SVM classifier.
Stars: ✭ 39 (-86.69%)
Mutual labels:  svm, image-classification
Cms
GleezCMS - A Light, Simple, Flexible Content Management System
Stars: ✭ 200 (-31.74%)
Mutual labels:  lightweight, performance
Yalla
YallaJS, ES6 Templating Engine.
Stars: ✭ 253 (-13.65%)
Mutual labels:  lightweight, performance
Hyperhtml
A Fast & Light Virtual DOM Alternative
Stars: ✭ 2,872 (+880.2%)
Mutual labels:  lightweight, performance
Web Tooling Benchmark
JavaScript benchmark for common web developer workloads
Stars: ✭ 290 (-1.02%)
Mutual labels:  performance
Minit
A WordPress plugin to combine CSS and Javascript files.
Stars: ✭ 293 (+0%)
Mutual labels:  performance
Spark
spark is a performance profiling plugin/mod for Minecraft clients, servers and proxies.
Stars: ✭ 287 (-2.05%)
Mutual labels:  performance
Default Passive Events
Makes {passive: true} by default when EventListenerOptions are supported
Stars: ✭ 285 (-2.73%)
Mutual labels:  performance
Webpack Libs Optimizations
Using a library in your webpack project? Here’s how to optimize it
Stars: ✭ 3,187 (+987.71%)
Mutual labels:  performance

stage sep(aration) x

detect stages in video automatically


Type Status
package version PyPI version
python version PyPI - Python Version
auto test CI Status
code maintainability Maintainability Language grade: Python
code coverage codecov
docker build status Docker Cloud Automated build Docker Cloud Build Status
code style Code style: black

2020/05/21:目前,该项目已经达到一个较为稳定的状态,并顺利在多家头部公司、团队落地,作为正式工具存在。Bug跟踪与建议请优先通过 issue 联系我,感谢所有支持过这个项目的人。欢迎有心优化的同学、落地成功的团队共同建设:)


English README here

这段视频展示了一个应用的完整启动过程:

video_readme.gif

将视频传递给 stagesepx,它将自动分析拆解,得到视频中所有的阶段。包括变化的过程及其耗时,以及在稳定的阶段停留的时长:

taobao_startup.png

你可以据此得到每个阶段对应的精确耗时。

跨端运作

当然,它是天然跨端的,例如web端。甚至,任何端:

sugar.gif

sugar

高准确度

与视频一致的高准确度。以秒表为例:

accuracy.png

可以看到,与秒表的表现几乎没有差异。请注意,这里的准确度指的是 stagesepx 能够精确还原视频本身的数据与表现。而对于现象(例如某某时间点出现什么状态)而言,准确度很大程度上取决于视频本身,如fps/分辨率等。

彻底解耦 & 可编程

如果比起报告,更希望亲自处理原始数据,进而进行二次开发,你可以直接将 report 部分去除。如此做,你将得到一个 python 对象供你随意使用。它提供了大量的API,例如转换成字典:

{
	"data": [{
		"data": null,
		"frame_id": 1,
		"stage": "0",
		"timestamp": 0.0,
		"video_path": "../demo.mp4"
	}, {
		"data": null,
		"frame_id": 2,
		"stage": "0",
		"timestamp": 0.04,
		"video_path": "../demo.mp4"
	}, {
		"data": null,
		"frame_id": 3,
		"stage": "0",
		"timestamp": 0.08,
		"video_path": "../demo.mp4"
	}, {
	
  ...

从这个字典中我们可以知道,每一帧分别对应的:

  • 被分类到哪一个类别
  • 时间戳
  • 帧编号
  • ...

用户可以随意处理这些数据,无论是保存或是交给下一段代码。

完整自动化支持 & 规模化

  • 既然它是可编程的,那么它必然是朝着彻底替代人力的方向演进的。这也是它最强大的特性;
  • 它允许用户利用自己的训练集进行模型训练,利用神经网络进行规模化、全自动化的特定阶段耗时计算;
  • 此方案能够被广泛应用到各类业务迭代中,与持续集成配合,有效降低人力消耗;
  • 一些方向参考:
    • 为你的应用建立高频次的性能回归测试,形成benchmark
    • 对模型进行补足,为一系列同类应用(如小程序、小游戏,etc.)构建巡检能力
    • ...

具体可参见 将 stagesepx 应用到实际业务中


  • 标准模式下无需前置训练与学习
  • 更少的代码需要
  • 高度可配置化,适应不同场景
  • 支持与其他框架结合,融入你的业务
  • 所有你需要的,只是一个视频

开始

正式使用

在正式落地时,推荐使用 完整的python脚本 而不是命令行,以保证更高的可编程性。完整的落地例子另外单独开了一个 repo 存放,传送门。 请一定配合 这篇文章 使用,基本能解决90%的问题。

命令行

你也可以直接通过命令行使用,而无需编写脚本:

stagesepx analyse your_video.mp4 report.html

基于此,你可以非常方便地利用 shell 建立工作流。以 android 为例:

adb shell screenrecord --time-limit 10 /sdcard/demo.mp4
adb pull /sdcard/demo.mp4 .
stagesepx analyse demo.mp4 report.html

关于结果不准确的问题请参考 #46

配置化运行(0.15.0)

当然,通常因为场景差异,我们需要对参数进行修改使其达到更好的效果。这使得用户需要投入一些精力在脚本编写上。在 0.15.0 之后,配置化运行的加入使用户能够在不需要编写脚本的情况下直接使用所有能力,大大降低了接入门槛。

{
  "output": ".",
  "video": {
    "path": "./PATH_TO_YOUR/VIDEO.mp4",
    "fps": 30
  }
}

命令行运行:

stagesepx run YOUR_CONFIG.json

即可达到与脚本相同的效果。其他的配置项可以参考:work_with_stagesepx

安装

标准版(pypi)

pip install stagesepx

预览版(github):

pip install --upgrade git+https://github.com/williamfzc/stagesepx.git

常见问题

最终我还是决定通过 issue 面板维护所有的 Q&A ,毕竟问题的提出与回复是一个强交互过程。如果在查看下列链接之后你的问题依旧没有得到解答:

  • 新建issue
  • 或在相关的 issue 下进行追问与补充
  • 你的提问将不止帮助到你一个人 :)

问题列表:

不仅是问题,如果有任何建议与交流想法,同样可以通过 issue 面板找到我。我们每天都会查看 issue 面板,无需担心跟进不足。

相关文章

架构

structure

参与项目

规划

在 1.0版本 之前,我们接下来的工作主要分为下面几个部分:

标准化

随着越来越多的业务落地,我们开始思考它是否能够作为行业级别的方案。

  • [x] 基于实验室数据的准确度对比(未公开)
  • [x] 规范且适合落地的例子
  • [ ] 边界情况下的确认
  • [x] 代码覆盖率 95%+
  • [ ] API参数相关文档

新需求的收集与开发

该部分由 issue 面板管理。

贡献代码

欢迎感兴趣的同学为这个项目添砖加瓦,三个必备步骤:

  • 请在开始编码前留个 issue 告知你想完成的功能,因为可能这个功能已经在开发中或者已有;
  • commit规范我们严格遵守 约定式提交
  • 该repo有较为完善的单测与CI以保障整个项目的质量,在过去的迭代中发挥了巨大的作用。所以请为你新增的代码同步新增单元测试(具体写法请参考 tests 中的已有用例)。

联系我们

Changelog / History

see CHANGELOG.md

Thanks

Thank you JetBrains for supporting the project with free product licenses.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].