Skip to main content

Windows CPU build: bundled flicker-detector.exe, web server, and HTTP client (no C++/TS/web source in the package).

Project description

flicker-detector-cpu(Windows CPU 后端)

本发行版是 flicker-detector[cpu]CPU 后端:PyPI 项目名为 flicker-detector-cpu(名称里不能写方括号 [])。捆绑 flicker-detector.exeflicker-detector-server.exeflicker-detector-client.exe,由包内薄启动器 execv 调用(不含 C++ / 前端 / 服务端 Python 源码)。

  • 要求:Python ≥ 3.10,操作系统 Windows 64 位

推荐安装(与命令名一致)

py -m pip install "flicker-detector[cpu]"

会安装 flicker-detector(元包)与 flicker-detector-cpu(本 wheel)。仅要后端、不要元包时:

py -m pip install flicker-detector-cpu

安装后可直接使用下列命令(与 python -m pip show -f flicker-detector-cpuflicker_detector_bundle\bin\ 下 exe 等价)。

GPU 后端(未来):将另有 flicker-detector-gpu;届时元包会提供 flicker-detector[gpu],命令名仍为下面三个,请勿同时安装 [cpu][gpu](脚本会冲突)。


1. flicker-detector — 本地命令行检测

本机对图片目录、视频、两帧对比或路径列表做闪屏/异常画面检测,输出 JSON

flicker-detector --type <dir|video|image|list> --input <路径> [--input <路径>...] --output <结果.json>
  • --typedir(图片目录,不递归)、video(单个视频)、image(需两个 --input 前后帧)、list(文本文件每行一图路径)。
  • 可选门限、JSON 配置等见帮助:
flicker-detector --help

2. flicker-detector-server — Web 服务与浏览器界面

启动 HTTP 服务,在浏览器里上传素材、查看检测结果并可做人工反馈;任务与记录默认落在 exe 旁的 flicker_detector_web_data(可用环境变量改写)。若仍使用旧目录名,可设置 FLICKER_DETECTOR_WEB_DATA 或沿用 FLASH_DETECTOR_WEB_DATA 指向原路径。

默认在浏览器打开:

http://127.0.0.1:8765

2.1 页面与功能

区域 作用
工作台 上传视频文件夹(整目录图片)或多张图片;查看任务进度、统计、findings 列表;点开单条可预览起止帧、时间范围;可对每条结果标记 人工确认(正确 / 错误)
检测记录 历史任务表格:支持按时间范围、状态、输入类型、客户端 IP、检出数量、故障类型、是否已反馈等筛选;行可展开查看与工作台类似的详情;点击任务可在新标签打开单任务页。
趋势图(检测记录页上方) 请求量 / 检出量 按时间粒度(分钟〜月)统计。
反馈趋势图(单独一块) 用户反馈率反馈正确率;可按 故障类型(flash_type) 筛选,默认全部类型

2.2 常用环境变量

优先读取 FLICKER_*;未设置时仍接受旧名 FLASH_* / IMAGE_FLASH_DETECTOR_EXE(便于升级)。

变量(新) 旧名(仍有效) 含义
FLICKER_DETECTOR_EXE IMAGE_FLASH_DETECTOR_EXE 检测程序路径(可选)
FLICKER_DETECTOR_BIND FLASH_DETECTOR_BIND 监听地址,默认 127.0.0.1
FLICKER_DETECTOR_PORT FLASH_DETECTOR_PORT 端口,默认 8765
FLICKER_DETECTOR_WEB_DATA FLASH_DETECTOR_WEB_DATA SQLite 与上传缓存目录
FLICKER_DETECTOR_MAX_UPLOAD_MB FLASH_DETECTOR_MAX_UPLOAD_MB 单次上传总大小上限(MB)
FLICKER_DETECTOR_MAX_CONCURRENT_JOBS FLASH_DETECTOR_MAX_CONCURRENT_JOBS 并发检测任务数
FLICKER_DETECTOR_JOB_TIMEOUT_SEC FLASH_DETECTOR_JOB_TIMEOUT_SEC 单任务子进程超时(秒)
FLICKER_DETECTOR_TRUST_PROXY FLASH_DETECTOR_TRUST_PROXY 设为 1 时从 X-Forwarded-For 取客户端 IP

示例:

$env:FLICKER_DETECTOR_PORT = "9000"
flicker-detector-server

3. flicker-detector-client — 远程提交检测(B/S)

任意能访问服务地址的机器上,把本地视频或图片上传到已在运行的 flicker-detector-server,由服务端调用检测 exe;不需要在客户端安装检测主程序。

flicker-detector-client --mode <video|sequence|folder> --url <服务根地址> [选项] <路径...>
--mode 含义 路径参数
video 单个视频 恰好一个视频文件
sequence 有序图片序列 至少两张图
folder 图片目录(会遍历子目录中的图片) 恰好一个目录

常用选项(完整列表见 flicker-detector-client --help):

  • --url:服务地址,如 http://192.168.1.10:8765
  • --output:将最终任务 JSON 写入文件;不写则打印到标准输出
  • --poll:轮询间隔(秒)
  • --timeout / --http-timeout / --upload-timeout:超时控制
  • --quiet:少打印进度
  • --skip-health:跳过启动前健康检查

示例:

flicker-detector-client --mode video --url http://127.0.0.1:8765 clip.mp4
flicker-detector-client --mode sequence --url http://127.0.0.1:8765 .\a.png .\b.png .\c.png
flicker-detector-client --mode folder --url http://192.168.1.10:8765 --output result.json D:\shots\seq1

退出码0 成功;1 任务失败;2 网络/HTTP/解析错误;3 参数或本地路径错误;4 等待超时。


4. 其他说明

  • 若命令提示缺少捆绑 exe,请从 PyPI 重新安装 win_amd64 wheel(项目名 flicker-detector-cpu,或通过 flicker-detector[cpu])。
  • 算法细节、自编译、源码级 Web 开发见 GitHub 仓库 flicker-detector-cpu 中的主 README.md(本页仅说明 pip 安装后的三个入口与界面)。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flicker_detector_cpu-1.0.1-py3-none-win_amd64.whl (39.4 MB view details)

Uploaded Python 3Windows x86-64

File details

Details for the file flicker_detector_cpu-1.0.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: flicker_detector_cpu-1.0.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 39.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for flicker_detector_cpu-1.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c5eec3161092b136cd9a09e353ccec589a5066cf3df98741516d2399e00c1db5
MD5 b4a8f1fbd2e66c3cdec481ad31eb55e9
BLAKE2b-256 95134aac3563997c8d0bed7780df9d7af3bf37780a5658f955ece9a09bc2451a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page