|
@@ -88,6 +88,7 @@ class BasePreprocessor(BaseAdapter):
|
|
|
processing_params=params,
|
|
processing_params=params,
|
|
|
image_format=opts.get("image_format") or "png",
|
|
image_format=opts.get("image_format") or "png",
|
|
|
save_compare=opts.get("save_compare", True),
|
|
save_compare=opts.get("save_compare", True),
|
|
|
|
|
+ subdir=opts.get("subdir", "watermark_removal"),
|
|
|
)
|
|
)
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
|
logger.warning(f"Watermark debug save failed: {e}")
|
|
logger.warning(f"Watermark debug save failed: {e}")
|
|
@@ -441,6 +442,8 @@ class BaseLayoutDetector(BaseAdapter):
|
|
|
output_dir = self.config.get('output_dir')
|
|
output_dir = self.config.get('output_dir')
|
|
|
if output_dir is None:
|
|
if output_dir is None:
|
|
|
output_dir = self._layout_debug_options().get('output_dir')
|
|
output_dir = self._layout_debug_options().get('output_dir')
|
|
|
|
|
+ if output_dir is not None:
|
|
|
|
|
+ output_dir = str(output_dir)
|
|
|
|
|
|
|
|
page_name = getattr(self, 'page_name', None)
|
|
page_name = getattr(self, 'page_name', None)
|
|
|
if page_name is None:
|
|
if page_name is None:
|
|
@@ -471,7 +474,7 @@ class BaseLayoutDetector(BaseAdapter):
|
|
|
page_name,
|
|
page_name,
|
|
|
suffix=suffix,
|
|
suffix=suffix,
|
|
|
subdir=opts.get('subdir', 'layout_detection'),
|
|
subdir=opts.get('subdir', 'layout_detection'),
|
|
|
- image_format=opts.get('image_format', 'jpg'),
|
|
|
|
|
|
|
+ image_format=opts.get('image_format', 'png'),
|
|
|
save_json=bool(opts.get('save_json', True)),
|
|
save_json=bool(opts.get('save_json', True)),
|
|
|
)
|
|
)
|
|
|
|
|
|