Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
218 changes: 218 additions & 0 deletions dataflow_agent/toolkits/postertool/config/poster_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
# poster layout configuration

layout:
# dimensions (inches)
poster_margin: 1.0
column_spacing: 1.0
title_height_fraction: 0.18 # fraction of ( title height / effective height)

# spacing
section_spacing: 1.0
element_spacing: 0.2
title_to_content_spacing: 0.4

# padding
text_padding:
left_right: 0.3
top_bottom: 0.3

# visual elements
visual_spacing:
below_visual: 0.3
side_padding: 0.3

typography:
fonts:
title: "Helvetica Neue"
authors: "Arial"
section_title: "Helvetica Neue"
body_text: "Arial"

sizes: # points
title: 100
authors: 72
section_title: 64
body_text: 44
min_font_size: 36

line_spacing: 1.0
paragraph_spacing: 0.0

colors:
# defaults
fallback_theme: "#1E3A8A"
fallback_text: "#000000"
fallback_background: "#FFFFFF"

# color variants
mono_light:
saturation: 0.04 # 4%
brightness: 0.94 # 94%

mono_dark:
saturation_range: [0.5, 0.6]
saturation_default: 0.6

contrast_color:
saturation: 0.85
brightness_start: 0.50
brightness_step: 0.05
brightness_max: 0.90
wcag_contrast_ratio: 4.5 # WCAG AA standard

complementary:
hue_offset: 0.5 # 180 degrees
intensity_reduction: 0.7

# adjustments
saturation_adjustments:
light_increase: 0.3
light_brightness: 0.25
dark_decrease: 0.2
contrast_saturation: 0.6
contrast_brightness: 0.75

# hsv bounds
hsv_bounds:
saturation_min: 0.2
saturation_max: 1.0
brightness_min: 0.2
brightness_max: 1.0

# srgb gamma
srgb:
gamma_threshold: 0.03928
gamma_divisor: 1.055
gamma_offset: 0.055
gamma_exponent: 2.4

# luminance weights (BT.709)
luminance_weights:
red: 0.2126
green: 0.7152
blue: 0.0722

# color constants
constants:
max_rgb: 255
white_rgb: [255, 255, 255]
black_text: "#000000"
white_text: "#FFFFFF"
brightness_threshold: 128
gamma_linear_divisor: 12.92
# perceived brightness weights
red_weight: 299
green_weight: 587
blue_weight: 114
brightness_divisor: 1000

text_measurement:
# binary search
min_height: 0.1 # inches
max_height: 20.0 # inches
precision: 0.001

# margins (must match renderer)
margins:
left: 0.3
right: 0.3
top: 0.3
bottom: 0.3

newline_offset_ratio: 1.0 # font_size/72 per newline

pdf_processing: # for marker PDF converter
batch_sizes:
recognition: 4
layout: 4
detection: 4
table_rec: 4
ocr_error: 4
equation: 4

max_section_words: 1000

rendering:
logo_spacing: 0.5 # inches
logo_margin: 0.2
debug_borders: False
slide_layout_index: 6 # blank slide
default_shape_fill: "#FFFFFF"

# spacing presets
spacing_presets:
tight:
text_margin: 0.03
visual_margin: 0.05
section_margin: 0.1
element_spacing: 0.1

normal:
text_margin: 0.05
visual_margin: 0.1
section_margin: 0.15
element_spacing: 0.15

loose:
text_margin: 0.1
visual_margin: 0.2
section_margin: 0.2
element_spacing: 0.2

# column balancing
column_balancing:
target_utilization: 0.9 # 90%
overflow_threshold: 1.0
underuse_threshold: 0.7
max_adjustment_ratio: 0.3 # 30%

# height estimation
section_estimation:
base_title_height: 1.5 # inches
bullet_point_height: 0.8
visual_spacing_ratio: 0.1

# validation
validation:
max_section_count: 8
min_section_count: 5
max_title_words: 4
min_text_content_items: 2
max_llm_attempts: 3

# utilization thresholds
utilization_thresholds:
overflow_warning: 1.0 # 100%
overflow_critical: 1.1 # 110%
underutilized: 0.7 # 70%
high_visual_density: 0.8 # 80%
low_visual_density: 0.2 # 20%

# layout constants
layout_constants:
title_padding: 0.3 # inches
section_padding: 0.3
visual_padding: 0.3
default_logo_aspect_ratio: 1.0
section_bottom_margin: 1.5
text_margin_renderer: 0.3

# powerpoint
powerpoint:
slide_layout_blank: 6
debug_border_width_pt: 2
text_frame_positioning:
default_left: 1
default_top: 1

# indentation
indentation:
secondary_bullet_char: "\u25e6" # ◦
secondary_level: 1
primary_level: 0

# llm
llm:
temperature: 0.7
max_tokens: 4096
max_retries: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
You are an expert specializing in designing automated academic poster.

**Primary Task:** Analyze the provided research paper and autonomously design and generate a complete, professional academic poster.

**Key Guidelines:**
- **Fixed Dimensions:** The final poster layout must be exactly 1536 pixels wide and 1024 pixels high.
- **Content Fidelity:** All content (text, figures, tables) must be extracted or summarized exclusively from the source paper. Do not invent or infer information.
- **Visual Design:** The poster must be visually appealing. Apply a clean and professional theme consistently across all elements.
- **Layout Design:** The layout must be well-balanced, effectively utilizing the available space. Actively avoid element overflow and large, underutilized blank areas.

**Required Structure & Content:**
- **Header:** Must include the full paper title and a complete list of all authors.
- **Body:** The main content area must be organized into distinct sections. These sections should feature a well-balanced and carefully arranged composition of:
- Concise text summaries.
- high-quality figures from paper pdf.
- Key data tables from paper pdf.

**Output Format**:
The final output must be a single PNG image file with dimensions of 1536x1024 pixels.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Classify visual assets by column-aware poster placement and research role:

Available visuals with captions:
{{ visuals_list }}

Classify each visual into exactly one category based on column-specific poster design:

**Column-Aware Categories:**
1. **"key_visual"** - Most important method visual representing core research innovation (max 1, middle column)
2. **"problem_illustration"** - Visuals showing research problem, challenges, or motivation (left column introduction)
3. **"method_workflow"** - Method architecture, system diagrams, algorithmic workflows (middle column method)
4. **"main_results"** - Primary experimental results, performance tables, key findings (right column)
5. **"comparative_results"** - Baseline comparisons, ablation studies, validation charts (right column)
6. **"supporting"** - Background concepts, supplementary analysis, minor details (flexible placement)

**Classification Guidelines:**
- **Problem Context**: Figures showing "what's wrong" or "why this matters" → problem_illustration
- **Method Core**: Most important technical diagram → key_visual
- **Method Details**: Architecture/workflow diagrams → method_workflow
- **Primary Evidence**: Main performance results → main_results
- **Validation Evidence**: Comparisons with baselines → comparative_results
- **Background/Supplementary**: Minor or supporting content → supporting

Consider:
- Visual content and research narrative role
- Optimal column placement for logical flow
- Visual impact and audience comprehension

Required JSON output:
{
"key_visual": "visual_id or null",
"problem_illustration": ["visual_id1", ...],
"method_workflow": ["visual_id1", ...],
"main_results": ["visual_id1", ...],
"comparative_results": ["visual_id1", ...],
"supporting": ["visual_id1", ...]
}

Ensure every visual_id appears exactly once across all categories.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Analyze this research figure and extract a professional theme color for poster design.

Look for:
1. Prominent colors used in key data elements (lines, bars, points, regions)
2. Colors that represent important data or findings
3. Professional colors suitable for academic posters
4. Avoid background colors (white/gray) and overly bright colors

Choose colors that are:
- Professional and readable on white backgrounds
- Suitable for text highlighting and accents
- Representative of the research content

Return ONLY a JSON object:
{
"theme_color": "#RRGGBB",
"color_name": "descriptive name",
"reasoning": "why this color was chosen from the figure"
}

Default to professional navy (#1E3A8A) if no suitable color is found.
Loading