Skip to content

Gyh/dev#158

Open
ling0gyh wants to merge 12 commits into
lz/devfrom
gyh/dev
Open

Gyh/dev#158
ling0gyh wants to merge 12 commits into
lz/devfrom
gyh/dev

Conversation

@ling0gyh
Copy link
Copy Markdown
Collaborator

Description:
Add post-processing evaluation and refinement stages to the image2drawio pipeline that detect
uncovered regions and rescue them as fallback image crops.

Changes:

metric_evaluator.py: Content-coverage scoring with three-channel bad-region detection (fine,
coarse, complex) plus banner channel for wide uncovered headers. Includes text-protection
filtering, NMS deduplication, union-coverage check against existing elements, and debug
visualization output.
refinement_processor.py: Fallback rescue for uncovered regions — crops bad regions from the
original image, filters out mostly-white regions, text-stroke regions, and regions already
covered by existing elements, then returns them as image elements for the final XML.
utils.py (sample_fill_stroke): Improved stroke color extraction — detects whether shapes have a
genuine dark border vs anti-aliased edges, avoiding false black stroke colors on colored shapes
(pink, teal, purple, etc.).
utils.py (extract_text_color): Fixed inconsistent bbox clipping bounds.
wf_paper2drawio_sam3.py: Integrated evaluate and refine nodes into the pipeline between
build_elements and render_xml.

This PR improves the editable PPT workflow by restructuring the frontend editable slide pipeline around a schema/canvas rendering
model, adding richer editable components, and supporting native client-side PPTX export.

Changes

  • Added Canvas-based rendering for editable PPT slides, including structured layout nodes, visual specs, and layout IR capture.
  • Added native client-side PPTX export for Canvas slides.
  • Improved editable component support for text, callout/highlight, table, and image blocks.
  • Added inline editing behavior for editable text/list fields directly on the slide preview.
  • Added automatic deletion for empty editable text/callout content.
  • Added support for deleting inserted images with the Delete key.
  • Removed redundant editable PPT theme direction selection and simplified frontend theme controls.
  • Improved placeholder behavior so missing text references no longer appear as visible error text.
  • Moved selection/hover helper labels outside the slide canvas to avoid covering slide content.
  • Adjusted HTML-to-PPTX scaling and export text ratio for better PowerPoint layout fidelity.
  • Extended backend/frontend schema normalization and tests for the editable PPT flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant