Skip to contentSkip to content

Debug Artifact Index

When a translation result looks wrong or you need to report an issue to the developers, enabling “Verbose Logging” (Verbose Logging) makes the app write debug images, JSON, JSX, and log files under BASE_PATH/result/. This index summarizes the complete artifact list, their trigger conditions, and troubleshooting purpose, and links back to the dedicated pages under debugging/; in-depth explanations of individual artifacts are not expanded here.

This index only summarizes and backlinks. Naming rules, directory layout, and the core/conditional artifact overview are in Debug folder naming and overview; the artifact families are covered in depth in Input detection and rearrangement, OCR and text regions, Mask, inpainting and rendering, and Special workflows and WebSocket. Cleanup, sanitization, and sharing are covered in How to read and share a debug run.

What's included

  • This guide only summarizes debug artifacts and trigger conditions; it does not repeat the runtime behavior, parameters, or file-format explanations of the debugging/ pages.
  • Every image-level debug artifact is gated by the cli.verbose master switch (UI: “Verbose Logging” / Verbose Logging); when off, no timestamped image-level debug subfolder is created.
  • The image-level debug subfolder is named {timestamp_ms}-{image_md5_8}-{detection_size}-{target_lang}-{translator}, built by _set_image_context() when each input image starts processing, under BASE_PATH/result/.
  • Artifacts are grouped into “core artifacts” (most common in the normal verbose flow), “conditional artifacts” (generated only under specific settings, detectors, workflows, or modes), and “directory-level/fallback artifacts” (log_*.txt or fallback paths without an image-level subfolder).
  • current code search found no later read-back of these debug file names in the repository: they are terminal diagnostic writes consumed by verbose-enabled operators or by the recipients of issue reports.

How to use it

The full steps for enabling verbose logging in Settings are in Debug folder naming and overview. This guide only records the UI strings directly relevant to this index:

Debug artifact summary

The tables below group the complete set of artifacts the current source can generate under different modes as “core artifacts / conditional artifacts / directory-level and fallback artifacts”. The “In-depth page” column links to the dedicated page for each artifact; the “Stage and trigger condition” column records only statically verified write points and switches.

Core artifacts

The following artifacts are the most common in the normal verbose flow; whether they are actually generated still depends on detection/OCR results and translation progress:

ArtifactStage and trigger conditionContent and troubleshooting purposeIn-depth page
input.png_translate_until_translation() with verbose=TrueInput image before processing; detection/OCR troubleshootingInput detection and rearrangement
mask_raw.pngAfter detection, verbose=True and detection returns ctx.mask_rawRaw detection confidence heatmap with color bar; detection-threshold troubleshootingInput detection and rearrangement
bboxes_unfiltered.pngText lines still exist after detectionUnfiltered text-line boxes on the original image; detection/OCR filtering troubleshootingInput detection and rearrangement
bboxes.pngctx.text_regions exists after OCR and text-line mergingFinal text-block visualization; merging/sorting troubleshootingOCR and text regions
ocrs/<index>.pngOCR implementations, when the text region is not pre-filteredPerspective-cropped OCR inputs; vertical text is rotatedOCR and text regions
inpaint_input.pngctx.mask exists after translationInpainting input previewMask, inpainting and rendering
mask_final.pngSame as aboveFinal mask used for inpainting; mask-extent troubleshootingMask, inpainting and rendering
inpainted.pngAfter inpainting in the normal verbose flowInpainted image; inpainting-result troubleshootingMask, inpainting and rendering
final.png_revert_upscale() called, ctx.result exists, and verboseFinal (or size-reverted) PIL outputMask, inpainting and rendering

Conditional artifacts

The following artifacts are generated only under specific settings, detectors, workflows, or modes; they must not be described as present in every verbose run:

ArtifactTrigger conditionContent and troubleshooting purposeIn-depth page
bboxes_unfiltered_labeled.pngocr.merge_special_require_full_wrap=True and the label drawer receives non-empty text linesIndexed/labeled text-line boxes; model-assisted merging troubleshootingInput detection and rearrangement
bboxes_with_scores.png, mask_binary.pngDetector third return value is a score-box/binary-mask debug tupleDetection score boxes and their companion binary maskInput detection and rearrangement
hybrid_detection_boxes.pngDetector third return value is an image and detector.use_yolo_obb=TrueMerged main-detection and YOLO OBB boxes; hybrid detection troubleshootingInput detection and rearrangement
rearrange_<index>.pngDefault/DBConvNext/CTD detectors trigger the rearrangement planSquare padded batches before detection; long-image rearrangement troubleshootingInput detection and rearrangement
yolo_rearrange_<index>.pnguse_yolo_obb=True and YOLO OBB gets a rearrangement planSingle YOLO OBB rearrangement patchInput detection and rearrangement
mask_bubble_clip_debug.pnglimit_mask_dilation_to_bubble_mask=True and a non-empty model bubble mask is obtainedOverlay of bubbles, before/after clipping, and protected areasMask, inpainting and rendering
balloon_fill_boxes.pnglayout_mode='balloon_fill' and the renderer returns a non-empty debug viewRenderer debug view of the balloon-fill layout; typesetting troubleshootingMask, inpainting and rendering
chinese_linebreak_debug.jsonSame as above and non-empty line-break records accumulatedChinese line-break records; may contain source/translation text, sanitize before sharingMask, inpainting and rendering
replace_debug_match.jpg, debug_extracted_text.png, inpainted.pngReplace-translation workflow with verboseMatch boxes/overlap info, extracted text, and the replace-flow inpainted imageSpecial workflows and WebSocket
ws_final.png, ws_render_in.png, ws_render_out.png, ws_mask.png, ws_inmask.png, ws_output.pngWebSocket mode with verboseWS rendering intermediate/final PNGsSpecial workflows and WebSocket
<input-stem>_photoshop_script.jsxPSD export with verbose or script_only=TruePhotoshop automation script; may contain layer text and file paths, sanitize before sharingSpecial workflows and WebSocket

Directory-level and fallback artifacts

The following artifacts are not inside the image-level subfolder, or use a fallback path without an image-level subfolder:

ArtifactTrigger conditionContent and troubleshooting purposeIn-depth page
log_<yyyyMMddHHmmss>.txtQt UI startup or CLI local log initializationApp-level run log; not part of a per-image debug subfolderDebug folder naming and overview
result/ocrs/<index>.pngDirect OCR calls without the environment variable set, with verboseOCR crop fallback path without an image-level subfolderOCR and text regions
result/rearrange_<index>.pngRearrangement without a result_path_fn callbackRearrangement fallback path without an image-level subfolderInput detection and rearrangement
result/yolo_rearrange_<index>.pngYOLO OBB rearrangement without a result_path_fn callbackYOLO rearrangement fallback path without an image-level subfolderInput detection and rearrangement
flowchart LR
    V["cli.verbose enabled\n(Verbose Logging)"] --> SUB["BASE_PATH/result/ image-level subfolder"]
    SUB --> A["Detection and rearrangement\ninput / mask_raw / bboxes* / rearrange*"]
    SUB --> B["OCR and text regions\nocrs/ / bboxes.png"]
    SUB --> C["Mask, inpainting and rendering\ninpaint_input / mask_final / inpainted / final"]
    SUB --> D["Special workflows\nreplace translation / ws_* / JSX"]
    A --> P1["debugging/input-detection-and-rearrangement"]
    B --> P2["debugging/ocr-and-text-regions"]
    C --> P3["debugging/mask-inpainting-and-rendering"]
    D --> P4["debugging/special-workflows-and-websocket"]
    L["App-level log_*.txt\n(Qt UI / CLI local)"] --> P5["debugging/folder-naming-and-overview"]

The diagram only shows the “trigger -> artifact family -> documentation page” ownership; it does not mean every verbose run generates every artifact. Early exits with no text, failures/cancellations, and special workflows skip the corresponding stages.

Trigger-condition quick reference

Trigger conditionArtifacts generatedIn-depth page
cli.verbose enabledImage-level debug subfolder and all artifacts inside itDebug folder naming and overview
Detector third return value is a score-box/binary-mask debug tuplebboxes_with_scores.png, mask_binary.pngInput detection and rearrangement
detector.use_yolo_obb=Truehybrid_detection_boxes.png, yolo_rearrange_<index>.pngInput detection and rearrangement
Aspect ratio/detection size satisfies the rearrangement plan (default/DBConvNext/CTD)rearrange_<index>.pngInput detection and rearrangement
ocr.merge_special_require_full_wrap=Truebboxes_unfiltered_labeled.pngInput detection and rearrangement
limit_mask_dilation_to_bubble_mask=True and a non-empty bubble mask is obtainedmask_bubble_clip_debug.pngMask, inpainting and rendering
layout_mode='balloon_fill' and the renderer returns a non-empty debug viewballoon_fill_boxes.png, chinese_linebreak_debug.jsonMask, inpainting and rendering
Replace-translation workflowreplace_debug_match.jpg, debug_extracted_text.png, inpainted.pngSpecial workflows and WebSocket
WebSocket modews_final.png and the other ws_*.pngSpecial workflows and WebSocket
PSD export (verbose or script_only=True)<input-stem>_photoshop_script.jsxSpecial workflows and WebSocket
Qt UI startup / CLI local initializationlog_<yyyyMMddHHmmss>.txtDebug folder naming and overview

Debugging page map

Debugging pageArtifacts and topics it covers
Debug folder naming and overviewSubfolder naming rule, result/ layout, core/conditional artifact overview, log_*.txt
Input detection and rearrangementinput.png, mask_raw.png, bboxes*, hybrid_detection_boxes.png, rearrange_*, yolo_rearrange_*
OCR and text regionsocrs/, bboxes.png, OCR crop inputs and numbering behavior
Mask, inpainting and renderinginpaint_input.png, mask_final.png, inpainted.png, mask_bubble_clip_debug.png, balloon_fill_boxes.png, chinese_linebreak_debug.json, final.png
Special workflows and WebSocketReplace-translation artifacts, ws_*.png, <input-stem>_photoshop_script.jsx
How to read and share a debug runArtifact cleanup, sanitization, and sharing of logs and directories

How to use this reference

  • The image-level debug subfolder depends on cli.verbose, the image context, and result_sub_folder; missing any of them falls back to a path without an image-level subfolder (BASE_PATH/result/<artifact>).
  • BASE_PATH points to different locations in frozen packaged runs versus source runs (executable directory vs repository root); keep this in mind when comparing across machines.
  • The tables above are the complete set the current source can generate under different modes, not the files every run necessarily produces; conditional artifacts must not be written as always present.
  • All debug images, OCR crops, line-break JSON, JSX, and logs may contain user images, source/translation text, box coordinates, or local paths; sanitize them before sharing and never package them for upload directly.
  • This index does not replace the debugging/ pages; parameter mechanics, file formats, and runtime behavior are covered by the corresponding feature and debugging pages.

Developer Guide

Option matrix

UI call keyEnglish actual valueSimplified Chinese actual value
GeneralGeneral通用
label_verboseVerbose Logging详细日志
Open log folderOpen log folder打开日志文件夹

The full bilingual text of the desc_cli_verbose description panel (including the “When enabled, Qt UI writes these items under result/ …” wording and its difference from the actual code naming rule) is recorded verbatim in Debug folder naming and overview and is not repeated here.

File/directoryFormat and namingDescription
BASE_PATH/result/directoryRoot of verbose debug artifacts
BASE_PATH/result/<image-level subfolder>/directoryOne per input image; naming rule on the folder-naming page
BASE_PATH/result/<image-level subfolder>/ocrs/directoryOCR crop inputs, <index>.png
BASE_PATH/result/log_<yyyyMMddHHmmss>.txtUTF-8 text logQt UI / CLI run log, app level
Image-level artifacts (input.png, bboxes.png, mask_raw.png, inpaint_input.png, mask_final.png, inpainted.png, final.png, etc.)PNGTerminal diagnostic writes for manual troubleshooting
Conditional artifacts (JSON/JSX/JPG, etc.)see the debugging pagesTrigger conditions in “Debug artifact summary”

Code locations

LayerFileWhat was checked
Path contractmanga_translator/manga_translator.py (_result_path(), _set_image_context(), write points)Four path branches, subfolder naming, and core/conditional artifact write points
Detection and rearrangementmanga_translator/detection/*.py, manga_translator/utils/generic.py (det_rearrange_forward()), manga_translator/detection/yolo_obb.pyTriggers for bboxes*, hybrid_detection_boxes.png, rearrange_*, yolo_rearrange_*
OCRmanga_translator/ocr/model_32px.py, model_48px.py, model_48px_ctc.py, model_manga_ocr.py, model_paddleocr.py, manga_translator/manga_translator.py (_run_ocr())ocrs/ subfolder, numbering, and 200px compression behavior
Mask/inpainting/renderingmanga_translator/mask_refinement/__init__.py, manga_translator/manga_translator.pymask_bubble_clip_debug.png, inpaint_input.png, mask_final.png, inpainted.png, balloon_fill_boxes.png, chinese_linebreak_debug.json, final.png
Special workflowsmanga_translator/utils/replace_translation.py, manga_translator/mode/ws.py, manga_translator/utils/photoshop_export.pyReplace translation, ws_*.png, and PSD JSX artifacts
App-level logsdesktop_qt_ui/main.py, manga_translator/mode/local.pyGeneration of log_<yyyyMMddHHmmss>.txt
UI/i18ndesktop_qt_ui/ui/main_page/settings_tab_layout.json, desktop_qt_ui/ui/main_page/dynamic_settings.py, desktop_qt_ui/locales/en_US.json, zh_CN.jsonActual values of label_verbose, desc_cli_verbose, Open log folder
Research baselinedoc/wiki/research/phase0-debug-artifact-path-trace.md, phase0-related-files-formats-debug-safety.md, phase0-page-coverage-matrix.mdArtifact inventory, path contract, and coverage matrix