target_finder_toolkit.semanticpointing module¶
Semantic Pointing Demo¶
This module demonstrates the Semantic Pointing interaction technique using the TargetFinder toolkit.
Notes
This script is for demonstration purposes only.
It is not part of the core TargetFinder API, but illustrates how the toolkit can support advanced interaction techniques.
- target_finder_toolkit.semanticpointing.semantic_pointing(detector, display=False, disable_accel=False)¶
Launch the Semantic Pointing overlay with a given detector.
The overlay draws a fake cursor whose speed dynamically changes depending on proximity to detected widgets. This alters their motor-space representation, making them easier to acquire.
- Parameters:
detector (TargetFinder) – Initialized TargetFinder (YOLO model loaded).
display (bool, optional) – If True, highlight the target box and its motor-space area (S×W). Defaults to False.
disable_accel (bool, optional) – If True, disable OS mouse acceleration. Defaults to False.
- Keyboard shortcuts:
b: Toggle between Semantic Pointing and the normal system cursor.
q: Quit the program.
- Returns:
Blocks until the Qt application is closed.
- Return type:
None
- Parameters:
detector (TargetFinder)
- target_finder_toolkit.semanticpointing.main()¶
Command-line entry point for the Semantic Pointing demo.
- CLI arguments:
- –model-path (str, optional): Path to YOLO .pt weights.
Defaults to
best.ptin the package.- –change-thresh (int, optional): Screen-change L2 threshold on a
down-scaled frame. Higher = less sensitive. Default:
100.- –capture-interval (float, optional): Delay in seconds between captures.
Lower = higher refresh rate, more CPU/GPU. Default:
1/30.- –confidence (float, optional): YOLO confidence threshold in
[0, 1]. Default:
0.28.- –iou (float, optional): IoU threshold for YOLO NMS in
[0, 1]. Controls overlap merging. Default:
0.3.
–disable-accel (flag): Disable system mouse acceleration.
–display (flag): Show the target bounding box and its motor-space area.
- Keyboard shortcuts:
b: Toggle between Semantic Pointing and the normal system cursor.
q: Quit the program.
Example:
semanticpointing --disable-accel --display --confidence 0.4- Returns:
Starts the Qt event loop until exit.