markup: move work files to a per-cat subdir
This commit is contained in:
@ -76,9 +76,11 @@ def find_shapes(image_path):
|
||||
return img.width, img.height, bboxes
|
||||
|
||||
|
||||
def write_debug_image(subdir, cat_name, page_num, prods, scribbles):
|
||||
def write_debug_image(subdir, name, page_num, prods, scribbles):
|
||||
"""Draw an image with boxes for products, images, and shapes."""
|
||||
path = os.path.join(WORKDIR, subdir, f"{cat_name}-debug-page{page_num:03d}.png")
|
||||
dir = os.path.join(WORKDIR, subdir, name)
|
||||
ensure_dir(dir)
|
||||
path = os.path.join(dir, f"debug-page{page_num:03d}.png")
|
||||
|
||||
pagew = int(11*72)
|
||||
pageh = int(8.5*72)
|
||||
|
||||
Reference in New Issue
Block a user