screenshot-vision-algorithm 0.3.1__tar.gz → 0.3.2__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.
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/PKG-INFO +1 -1
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/pyproject.toml +1 -1
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/__init__.py +0 -1
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/card_bbox.py +12 -15
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm.egg-info/PKG-INFO +1 -1
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/README.md +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/setup.cfg +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/_config.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/avatar_column.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/badge_detection.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/phash_utils.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/speaker_band.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/template_matching.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/algorithms/title_ocr.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/merge/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/merge/multipage.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/ocr/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/ocr/avatar_guard.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/ocr/badge_ocr.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/ocr/nickname_binding.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/ocr/text_ocr_adapter.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/profiles/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/profiles/android.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/profiles/harmony.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/profiles/ios.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/chat_back_chevron.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/chat_input_emoji_smile.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/chat_input_plus.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/chat_input_voice.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/chat_title_more_dots.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/favorite_label.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/new_messages_hint_suffix.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/unread_divider_hint.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/unread_divider_hint_v2_textonly.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/wechat/templates/android/8.0.69/wechat_note_header.png +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/xhs/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/android/zhihu/__init__.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/logging.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm/png_utils.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm.egg-info/SOURCES.txt +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm.egg-info/dependency_links.txt +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm.egg-info/requires.txt +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/src/screenshot_vision_algorithm.egg-info/top_level.txt +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/tests/test_card_bbox.py +0 -0
- {screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/tests/test_package.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: screenshot_vision_algorithm
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Multi-platform screenshot vision algorithms: WeChat (card bbox, speaker bands, avatar detection, OCR helpers), XHS & Zhihu (planned)
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "screenshot_vision_algorithm"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "Multi-platform screenshot vision algorithms: WeChat (card bbox, speaker bands, avatar detection, OCR helpers), XHS & Zhihu (planned)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
from screenshot_vision_algorithm._config import Platform, WeChatVersion, Profile
|
|
4
4
|
|
|
5
5
|
from screenshot_vision_algorithm.android.wechat.algorithms.card_bbox import (
|
|
6
|
-
TAP_ANTI_DETECT_X_JITTER_PX,
|
|
7
6
|
_compute_exact_card_and_bubble_bboxes,
|
|
8
7
|
_compute_exact_card_bboxes,
|
|
9
8
|
BubbleBbox,
|
|
@@ -83,11 +83,6 @@ REFERENCE_RESUME_CARD_TOP_GAP_BASELINE: int = 542
|
|
|
83
83
|
#: **相对 screencap + OpenCV**,性能可忽略。
|
|
84
84
|
PROCESSED_CARD_MATCH_MIN_OVERLAP_RATIO: float = 0.70
|
|
85
85
|
|
|
86
|
-
#: Anti-detection horizontal jitter (px @ 1080 baseline) applied by
|
|
87
|
-
#: ``enter_note`` on every tap attempt: ``tap_x = click_x ± random(0..15)``.
|
|
88
|
-
#: Y is never jittered (speaker attribution depends on exact Y).
|
|
89
|
-
TAP_ANTI_DETECT_X_JITTER_PX: int = 15
|
|
90
|
-
|
|
91
86
|
#: 3b gap 合并/延长判别距离(px @ 1080 baseline,运行时 ×scale_w):
|
|
92
87
|
#: 收藏锚点落在同一竖线相邻两 zone 的间隙时,取锚点下方第一条横线,
|
|
93
88
|
#: 横线与下方 zone 起点距离 ≤ 本值 → 两 zone 同卡(被收藏标签行打断),合并;
|
|
@@ -502,7 +497,7 @@ def _compute_exact_card_and_bubble_bboxes(
|
|
|
502
497
|
if exact_y2 <= exact_y1 or exact_y2 - exact_y1 < 80:
|
|
503
498
|
continue
|
|
504
499
|
|
|
505
|
-
click_x =
|
|
500
|
+
click_x = screen_w // 2
|
|
506
501
|
click_y = min(screen_h - 1, max(0, hit.y + hit.h // 2))
|
|
507
502
|
midline = screen_w / 2.0
|
|
508
503
|
click_side = "left" if click_x < midline else "right"
|
|
@@ -648,10 +643,11 @@ def derive_cards(
|
|
|
648
643
|
ordered = sorted(hits, key=lambda h: h.y)
|
|
649
644
|
|
|
650
645
|
# New algorithm: vline-segment + hline-boundary (PRD S6). When the
|
|
651
|
-
# pipeline ran successfully its verdict is final —
|
|
652
|
-
# (no containing zone → "点对卡、记错框" guard)
|
|
653
|
-
# by the legacy fixed-offset fallback.
|
|
654
|
-
#
|
|
646
|
+
# pipeline ran successfully with non-empty cards its verdict is final —
|
|
647
|
+
# an anchor it dropped (no containing zone → "点对卡、记错框" guard)
|
|
648
|
+
# must NOT be resurrected by the legacy fixed-offset fallback. When the
|
|
649
|
+
# pipeline produces no cards (e.g. variance texture insufficient),
|
|
650
|
+
# legacy fixed-offset serves as a reasonable fallback.
|
|
655
651
|
if chat_img is not None and len(ordered) > 0:
|
|
656
652
|
try:
|
|
657
653
|
exact_cards = _compute_exact_card_bboxes(
|
|
@@ -660,9 +656,11 @@ def derive_cards(
|
|
|
660
656
|
except Exception:
|
|
661
657
|
pass
|
|
662
658
|
else:
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
659
|
+
if exact_cards:
|
|
660
|
+
return drop_top_clamped_false_positive_cards(
|
|
661
|
+
exact_cards, scale_w=scale_w,
|
|
662
|
+
)
|
|
663
|
+
# exact_cards empty → fall through to legacy
|
|
666
664
|
|
|
667
665
|
# Legacy: fixed-offset algorithm
|
|
668
666
|
top_offset = int(round(FAVORITE_TO_CARD_TOP_OFFSET_BASELINE * scale_w))
|
|
@@ -681,7 +679,7 @@ def derive_cards(
|
|
|
681
679
|
if card_bottom <= card_top:
|
|
682
680
|
continue
|
|
683
681
|
|
|
684
|
-
click_x =
|
|
682
|
+
click_x = screen_w // 2
|
|
685
683
|
click_y = min(screen_h - 1, max(0, hit.y + hit.h // 2))
|
|
686
684
|
midline = screen_w / 2
|
|
687
685
|
click_side = "left" if click_x < midline else "right"
|
|
@@ -979,7 +977,6 @@ __all__ = [
|
|
|
979
977
|
"GAP_HLINE_TO_NEXT_ZONE_MAX_BASELINE",
|
|
980
978
|
"PROCESSED_CARD_MATCH_MIN_OVERLAP_RATIO",
|
|
981
979
|
"REFERENCE_RESUME_CARD_TOP_GAP_BASELINE",
|
|
982
|
-
"TAP_ANTI_DETECT_X_JITTER_PX",
|
|
983
980
|
"FavoriteLabelHit",
|
|
984
981
|
"ThumbnailCard",
|
|
985
982
|
"TrackedCard",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: screenshot_vision_algorithm
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Multi-platform screenshot vision algorithms: WeChat (card bbox, speaker bands, avatar detection, OCR helpers), XHS & Zhihu (planned)
|
|
5
5
|
License: MIT
|
|
6
6
|
Requires-Python: >=3.10
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/tests/test_card_bbox.py
RENAMED
|
File without changes
|
{screenshot_vision_algorithm-0.3.1 → screenshot_vision_algorithm-0.3.2}/tests/test_package.py
RENAMED
|
File without changes
|