feat: adapt to neroued_vectorizer v0.2.0 with V1/V2 pipeline selection#44
Open
Neroued wants to merge 1 commit into
Open
feat: adapt to neroued_vectorizer v0.2.0 with V1/V2 pipeline selection#44Neroued wants to merge 1 commit into
Neroued wants to merge 1 commit into
Conversation
Neroued
commented
Mar 31, 2026
Owner
Author
Neroued
left a comment
There was a problem hiding this comment.
Code Review — PR #44: feat: adapt to neroued_vectorizer v0.2.0 with V1/V2 pipeline selection
web/frontend/src/domain/vectorize/normalizeVectorizeParams.ts
- Warning: L9, L20 — 本地 fallback 默认值仍然是旧版本的
min_region_area=10、max_merge_color_dist=150,而这次 PR 把 v0.2.0 / V2 的默认值切到了 50 和 200。结合VectorizePanel.vue里提交时仍以defaultVectorizeParams作为 normalize fallback(L91-L92),一旦/api/v1/vectorize/defaults请求失败,就会把过期默认值发给后端,导致“默认 V2 参数”和文档描述不一致。建议把本地默认值同步到新后端默认值,或提交时改用mergedDefaults作为 fallback,避免服务端 defaults 不可用时退回旧参数。
Reviewed at: 97c2dbb | Files: 8 | Findings: 0 critical, 1 warning, 0 info
Add pipeline_mode parameter to vectorize API, allowing users to choose between V1 (boundary-graph + cutout) and V2 (stacking model + depth ordering) algorithms. V2 is the new default. Backend: - VectorizeDefaults() returns pipeline_mode and newly exposed fields - BuildVectorizeConfig() parses pipeline_mode, slic_compactness, enable_subpixel_refine, subpixel_max_displacement, enable_depth_validation - Range validation and debug logging for all new parameters Frontend: - Pipeline mode radio selector at top of vectorize settings panel - V1-only parameters (smoothness, segmentation section, thin line radius, detail level) hidden when V2 is selected via v-if - New V1 advanced params: slic_compactness, enable_subpixel_refine, subpixel_max_displacement - i18n keys for zh-CN and en locales Docs: - development.md vectorize parameter table updated with pipeline_mode column and all new parameters Made-with: Cursor
97c2dbb to
2479ebc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pipeline_modeparameter throughout the stack (API, frontend types, normalization, UI) with V2 as the new default.slic_compactness,enable_subpixel_refine,subpixel_max_displacement) in the advanced settings panel.Changes
Backend (
server_facade.cpp)VectorizeDefaults(): returnspipeline_mode: "v2"and newly exposed fieldsBuildVectorizeConfig(): parsespipeline_modestring to enum, parses new fields, adds range validationpipeline_modeFrontend
types.ts:PipelineModetype alias, 4 new fields onVectorizeParamsnormalizeVectorizeParams.ts: defaults topipeline_mode: 'v2', normalization for new fieldsVectorizePanel.vue: radio group for V1/V2 selection,v-if="isV1"on V1-only sections (smoothness, segmentation panel, thin line radius, detail level)zh-CN.ts/en.ts: i18n keys for pipeline mode and new parametersDocs
docs/development.md: vectorize parameter table restructured with "Applicable" column (V1/V2/V1+V2)Test plan
GET /api/v1/vectorize/defaultsreturnspipeline_mode: "v2"and all new fieldspipeline_mode: "v1"— confirm V1 pipeline is usedpipeline_mode: "v2"(or omit) — confirm V2 pipeline is usedMade with Cursor