-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.py
More file actions
63 lines (54 loc) · 3.71 KB
/
Copy pathconfig.example.py
File metadata and controls
63 lines (54 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# config.example.py - Configuration template
# Copy this file to config.py and fill in your actual values
# Video input path
INPUT_VIDEO_PATH = "/path/to/your/input/video.mp4"
# Test asset directories (private, not committed to repo)
TEST_VIDEO_DIR = "/path/to/your/private/test_videos/"
ANNOTATION_DIR = "/path/to/your/private/annotations/"
# Output configuration
OUTPUT_FORMAT = "json" # Options: json, csv, parquet
OUTPUT_DIR = "./output/"
# Threshold configuration (adjust based on animation style)
DURATION_SHORT_THRESHOLD = 2.0 # Seconds, upper bound for short shots
DURATION_MEDIUM_THRESHOLD = 5.0 # Seconds, upper bound for medium shots
TONE_HIGH_KEY_THRESHOLD = 180 # Grayscale value, threshold for high key
TONE_LOW_KEY_THRESHOLD = 70 # Grayscale value, threshold for low key
COLOR_LOW_SAT_THRESHOLD = 0.3 # Saturation, threshold for low saturation
COLOR_HIGH_SAT_THRESHOLD = 0.7 # Saturation, threshold for high saturation
COLOR_WARM_RATIO_THRESHOLD = 1.15 # Warm/cool ratio threshold for warm shots
COLOR_COOL_RATIO_THRESHOLD = 0.85 # Warm/cool ratio threshold for cool shots
MOTION_STATIC_THRESHOLD = 1.0 # Optical flow magnitude, threshold for static motion
MOTION_ACTIVE_THRESHOLD = 5.0 # Optical flow magnitude, threshold for active motion
# Segment generation parameters (MVP v2)
SEGMENT_WINDOW_SIZE = 5 # Number of shots per analysis window
SEGMENT_WINDOW_STEP = 1 # Step between consecutive windows
SEGMENT_PACE_THRESHOLD = 0.4 # Cutting rate above this → fast pace
SEGMENT_REGULARITY_THRESHOLD = 0.5 # Rhythm regularity above this → regular
SEGMENT_REVIEW_CONFIDENCE_THRESHOLD = 0.35 # Confidence below this → needs_review
# Review persistence
REVIEW_DB_PATH = "reviews.db" # SQLite database path for segment review storage
# Line analysis — directional classification
LINE_EDGE_LOW_THRESHOLD = 80 # Canny edge low threshold
LINE_EDGE_HIGH_THRESHOLD = 160 # Canny edge high threshold
LINE_HORIZONTAL_ANGLE_TOLERANCE = 20.0 # Degrees from 0° to count as horizontal
LINE_VERTICAL_ANGLE_TOLERANCE = 20.0 # Degrees from 90° to count as vertical
LINE_CURVED_MIN_RATIO = 0.35 # Min unexplained-edge ratio to consider curved
LINE_MIXED_MARGIN_THRESHOLD = 0.15 # Min margin between top two buckets to avoid mixed
LINE_REVIEW_CONFIDENCE_THRESHOLD = 0.35 # Confidence below this → line_needs_review
LINE_MIN_LINE_LENGTH_RATIO = 0.15 # Min line segment length as ratio of min(w,h)
# Shape analysis — visual-family classification
SHAPE_EDGE_LOW_THRESHOLD = 80 # Canny edge low threshold
SHAPE_EDGE_HIGH_THRESHOLD = 160 # Canny edge high threshold
SHAPE_MIN_CONTOUR_AREA_RATIO = 0.0005 # Ignore tiny contours below this image-area ratio (lowered to 0.0005 to handle detailed animation backgrounds)
SHAPE_MIN_EVIDENCE_COVERAGE = 0.002 # Minimum contour coverage needed before shape evidence is accepted
SHAPE_CURVILINEAR_CIRCULARITY_THRESHOLD = 0.55 # Circularity above this favors curvilinear
SHAPE_MIXED_MARGIN_THRESHOLD = 0.15 # Min margin between rectilinear/curvilinear evidence
SHAPE_REVIEW_CONFIDENCE_THRESHOLD = 0.35 # Confidence below this → shape_needs_review
# Space analysis — coarse spatial depth classification
SPACE_EDGE_LOW_THRESHOLD = 80 # Canny edge low threshold
SPACE_EDGE_HIGH_THRESHOLD = 160 # Canny edge high threshold
SPACE_MIN_CONTOUR_AREA_RATIO = 0.0015 # Ignore tiny contours below this image-area ratio
SPACE_LAYERED_THRESHOLD = 0.35 # Layer cue score above this → layered or higher
SPACE_DEEP_PERSPECTIVE_THRESHOLD = 0.45 # Perspective cue score above this contributes to deep
SPACE_STRONG_PERSPECTIVE_THRESHOLD = 0.75 # P above this alone (with weak layer) forces deep classification (always reviewable)
SPACE_REVIEW_CONFIDENCE_THRESHOLD = 0.35 # Confidence below this → space_needs_review