flash-detector-cpu 0.1.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.
- flash_detector_cpu-0.1.0/PKG-INFO +60 -0
- flash_detector_cpu-0.1.0/README.md +47 -0
- flash_detector_cpu-0.1.0/pyproject.toml +27 -0
- flash_detector_cpu-0.1.0/setup.cfg +4 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu/__init__.py +3 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu/_launch.py +31 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu/bin/flash-detector.exe +0 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu.egg-info/PKG-INFO +60 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu.egg-info/SOURCES.txt +10 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu.egg-info/dependency_links.txt +1 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu.egg-info/entry_points.txt +2 -0
- flash_detector_cpu-0.1.0/src/flash_detector_cpu.egg-info/top_level.txt +2 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flash-detector-cpu
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Screen flash detector CLI (bundled flash-detector.exe for Windows)
|
|
5
|
+
Author: flash-detector-cpu contributors
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Topic :: Multimedia :: Video
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# flash-detector
|
|
15
|
+
|
|
16
|
+
C++ port of the hypium_perf **ImageFlashAnalyzer** pipeline (template similarity, `VideoSceneParser`, stable / motional / special analyzers, merge). Built with **CMake** and **vcpkg** (OpenCV, nlohmann-json, cxxopts).
|
|
17
|
+
|
|
18
|
+
## Build (Windows, static)
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
cd D:\Documents\Github\flash-detector-cpu-version
|
|
22
|
+
$env:VCPKG_ROOT = "<your-vcpkg-root>"
|
|
23
|
+
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md
|
|
24
|
+
cmake --build build --config Release
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The executable is `build\Release\flash-detector.exe` (or `build\flash-detector.exe` depending on generator).
|
|
28
|
+
|
|
29
|
+
To enable more video formats, add the `ffmpeg` feature to `opencv4` in `vcpkg.json` (longer build).
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
flash-detector.exe --type <dir|video|image|list> --input <path> [--input <path>...] --output out.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| `--type` | `--input` |
|
|
38
|
+
|----------|-----------|
|
|
39
|
+
| `dir` | Directory of images (non-recursive, like Python `iterdir`) |
|
|
40
|
+
| `video` | Video file (frames decoded to temporary PNGs under `%TEMP%`) |
|
|
41
|
+
| `image` | Two paths: `--input prev.png --input next.png` |
|
|
42
|
+
| `list` | Text file, one image path per line |
|
|
43
|
+
|
|
44
|
+
Options:
|
|
45
|
+
|
|
46
|
+
- `--sort numeric-stem` (default) or `--sort lex` for directory ordering.
|
|
47
|
+
- `--fps` — override video FPS when probing fails.
|
|
48
|
+
- `--frame-interval-ms` — if non-zero, `image_time = index * interval` for dir/list.
|
|
49
|
+
- `--config params.json` — optional JSON keys: `step_name`, `operation_type`, `swipe_type`, `action_type`, `scene_type`, `is_lock_special`, `video_start_timestamp`, `blurred_image_time_list` (array of int64).
|
|
50
|
+
|
|
51
|
+
Set `operation_type` to `normal_swipe` (and optionally `action_type` to `side_swipe`) in config to enable **SwipeMotionalAnalyzer** on animator segments.
|
|
52
|
+
|
|
53
|
+
## Output JSON
|
|
54
|
+
|
|
55
|
+
- `version`, `input_type`, `findings[]`
|
|
56
|
+
- Each finding: `flash_type`, `scene`, `start_time_ms`, `end_time_ms`, `start_frame`, `end_frame`, `path_start`, `path_end`, etc.
|
|
57
|
+
|
|
58
|
+
## Reference
|
|
59
|
+
|
|
60
|
+
Algorithm source: `perf_analyzer/kpi_ability/flash/` in the hypium_perf tree (`ImageFlashAnalyzer`, `VideoSceneParser`, `PureStableAnalyzer`, `SwipeMotionalAnalyzer`, `FollowHandAnalyzer`).
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# flash-detector
|
|
2
|
+
|
|
3
|
+
C++ port of the hypium_perf **ImageFlashAnalyzer** pipeline (template similarity, `VideoSceneParser`, stable / motional / special analyzers, merge). Built with **CMake** and **vcpkg** (OpenCV, nlohmann-json, cxxopts).
|
|
4
|
+
|
|
5
|
+
## Build (Windows, static)
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
cd D:\Documents\Github\flash-detector-cpu-version
|
|
9
|
+
$env:VCPKG_ROOT = "<your-vcpkg-root>"
|
|
10
|
+
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md
|
|
11
|
+
cmake --build build --config Release
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The executable is `build\Release\flash-detector.exe` (or `build\flash-detector.exe` depending on generator).
|
|
15
|
+
|
|
16
|
+
To enable more video formats, add the `ffmpeg` feature to `opencv4` in `vcpkg.json` (longer build).
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
flash-detector.exe --type <dir|video|image|list> --input <path> [--input <path>...] --output out.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| `--type` | `--input` |
|
|
25
|
+
|----------|-----------|
|
|
26
|
+
| `dir` | Directory of images (non-recursive, like Python `iterdir`) |
|
|
27
|
+
| `video` | Video file (frames decoded to temporary PNGs under `%TEMP%`) |
|
|
28
|
+
| `image` | Two paths: `--input prev.png --input next.png` |
|
|
29
|
+
| `list` | Text file, one image path per line |
|
|
30
|
+
|
|
31
|
+
Options:
|
|
32
|
+
|
|
33
|
+
- `--sort numeric-stem` (default) or `--sort lex` for directory ordering.
|
|
34
|
+
- `--fps` — override video FPS when probing fails.
|
|
35
|
+
- `--frame-interval-ms` — if non-zero, `image_time = index * interval` for dir/list.
|
|
36
|
+
- `--config params.json` — optional JSON keys: `step_name`, `operation_type`, `swipe_type`, `action_type`, `scene_type`, `is_lock_special`, `video_start_timestamp`, `blurred_image_time_list` (array of int64).
|
|
37
|
+
|
|
38
|
+
Set `operation_type` to `normal_swipe` (and optionally `action_type` to `side_swipe`) in config to enable **SwipeMotionalAnalyzer** on animator segments.
|
|
39
|
+
|
|
40
|
+
## Output JSON
|
|
41
|
+
|
|
42
|
+
- `version`, `input_type`, `findings[]`
|
|
43
|
+
- Each finding: `flash_type`, `scene`, `start_time_ms`, `end_time_ms`, `start_frame`, `end_frame`, `path_start`, `path_end`, etc.
|
|
44
|
+
|
|
45
|
+
## Reference
|
|
46
|
+
|
|
47
|
+
Algorithm source: `perf_analyzer/kpi_ability/flash/` in the hypium_perf tree (`ImageFlashAnalyzer`, `VideoSceneParser`, `PureStableAnalyzer`, `SwipeMotionalAnalyzer`, `FollowHandAnalyzer`).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "flash-detector-cpu"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Screen flash detector CLI (bundled flash-detector.exe for Windows)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
authors = [{ name = "flash-detector-cpu contributors" }]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Operating System :: Microsoft :: Windows",
|
|
17
|
+
"Topic :: Multimedia :: Video",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
flash-detector = "flash_detector_cpu._launch:main"
|
|
22
|
+
|
|
23
|
+
[tool.setuptools.packages.find]
|
|
24
|
+
where = ["src"]
|
|
25
|
+
|
|
26
|
+
[tool.setuptools.package-data]
|
|
27
|
+
flash_detector_cpu = ["bin/flash-detector.exe"]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Run the bundled native executable with the same argv (Windows)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main() -> None:
|
|
11
|
+
if sys.platform != "win32":
|
|
12
|
+
print("flash-detector-cpu: bundled binary is Windows-only (flash-detector.exe).", file=sys.stderr)
|
|
13
|
+
sys.exit(2)
|
|
14
|
+
|
|
15
|
+
here = Path(__file__).resolve().parent
|
|
16
|
+
exe = here / "bin" / "flash-detector.exe"
|
|
17
|
+
if not exe.is_file():
|
|
18
|
+
print(f"flash-detector-cpu: missing bundled executable: {exe}", file=sys.stderr)
|
|
19
|
+
print("Install from a wheel built with publish.bat, or rebuild the C++ target.", file=sys.stderr)
|
|
20
|
+
sys.exit(2)
|
|
21
|
+
|
|
22
|
+
argv = [str(exe)] + sys.argv[1:]
|
|
23
|
+
try:
|
|
24
|
+
os.execv(str(exe), argv)
|
|
25
|
+
except OSError as e:
|
|
26
|
+
print(f"flash-detector-cpu: failed to start {exe}: {e}", file=sys.stderr)
|
|
27
|
+
sys.exit(1)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
if __name__ == "__main__":
|
|
31
|
+
main()
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flash-detector-cpu
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Screen flash detector CLI (bundled flash-detector.exe for Windows)
|
|
5
|
+
Author: flash-detector-cpu contributors
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Topic :: Multimedia :: Video
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# flash-detector
|
|
15
|
+
|
|
16
|
+
C++ port of the hypium_perf **ImageFlashAnalyzer** pipeline (template similarity, `VideoSceneParser`, stable / motional / special analyzers, merge). Built with **CMake** and **vcpkg** (OpenCV, nlohmann-json, cxxopts).
|
|
17
|
+
|
|
18
|
+
## Build (Windows, static)
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
cd D:\Documents\Github\flash-detector-cpu-version
|
|
22
|
+
$env:VCPKG_ROOT = "<your-vcpkg-root>"
|
|
23
|
+
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md
|
|
24
|
+
cmake --build build --config Release
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The executable is `build\Release\flash-detector.exe` (or `build\flash-detector.exe` depending on generator).
|
|
28
|
+
|
|
29
|
+
To enable more video formats, add the `ffmpeg` feature to `opencv4` in `vcpkg.json` (longer build).
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
flash-detector.exe --type <dir|video|image|list> --input <path> [--input <path>...] --output out.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| `--type` | `--input` |
|
|
38
|
+
|----------|-----------|
|
|
39
|
+
| `dir` | Directory of images (non-recursive, like Python `iterdir`) |
|
|
40
|
+
| `video` | Video file (frames decoded to temporary PNGs under `%TEMP%`) |
|
|
41
|
+
| `image` | Two paths: `--input prev.png --input next.png` |
|
|
42
|
+
| `list` | Text file, one image path per line |
|
|
43
|
+
|
|
44
|
+
Options:
|
|
45
|
+
|
|
46
|
+
- `--sort numeric-stem` (default) or `--sort lex` for directory ordering.
|
|
47
|
+
- `--fps` — override video FPS when probing fails.
|
|
48
|
+
- `--frame-interval-ms` — if non-zero, `image_time = index * interval` for dir/list.
|
|
49
|
+
- `--config params.json` — optional JSON keys: `step_name`, `operation_type`, `swipe_type`, `action_type`, `scene_type`, `is_lock_special`, `video_start_timestamp`, `blurred_image_time_list` (array of int64).
|
|
50
|
+
|
|
51
|
+
Set `operation_type` to `normal_swipe` (and optionally `action_type` to `side_swipe`) in config to enable **SwipeMotionalAnalyzer** on animator segments.
|
|
52
|
+
|
|
53
|
+
## Output JSON
|
|
54
|
+
|
|
55
|
+
- `version`, `input_type`, `findings[]`
|
|
56
|
+
- Each finding: `flash_type`, `scene`, `start_time_ms`, `end_time_ms`, `start_frame`, `end_frame`, `path_start`, `path_end`, etc.
|
|
57
|
+
|
|
58
|
+
## Reference
|
|
59
|
+
|
|
60
|
+
Algorithm source: `perf_analyzer/kpi_ability/flash/` in the hypium_perf tree (`ImageFlashAnalyzer`, `VideoSceneParser`, `PureStableAnalyzer`, `SwipeMotionalAnalyzer`, `FollowHandAnalyzer`).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
src/flash_detector_cpu/__init__.py
|
|
4
|
+
src/flash_detector_cpu/_launch.py
|
|
5
|
+
src/flash_detector_cpu.egg-info/PKG-INFO
|
|
6
|
+
src/flash_detector_cpu.egg-info/SOURCES.txt
|
|
7
|
+
src/flash_detector_cpu.egg-info/dependency_links.txt
|
|
8
|
+
src/flash_detector_cpu.egg-info/entry_points.txt
|
|
9
|
+
src/flash_detector_cpu.egg-info/top_level.txt
|
|
10
|
+
src/flash_detector_cpu/bin/flash-detector.exe
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|