sketchkit.vectorization.LineDrawer.CNNVE package¶
Subpackages¶
- sketchkit.vectorization.LineDrawer.CNNVE.network package
- sketchkit.vectorization.LineDrawer.CNNVE.utils package
Submodules¶
sketchkit.vectorization.LineDrawer.CNNVE.CNNVE module¶
- class sketchkit.vectorization.LineDrawer.CNNVE.CNNVE.CNNVE(device='cuda')[source]¶
Bases:
objectA class for image vectorization using the CNNVE method.
- model¶
The loaded line extraction model.
- bat_process(indir)[source]¶
Batch processes all PNG files in a directory.
For each file *.png in indir, it creates an output directory indir/output/… and calls process_single_image.
- Parameters:
indir (str) – The directory containing PNG files to process.
- process_single_image(fname, outdir, iter_id=0, merge_or_onepath={})[source]¶
Main processing pipeline to build a graph, segment strokes, and merge them.
- Parameters:
fname (str) – The file path of the input PNG image.
outdir (str) – The directory to save output and intermediate files.
iter_id (int, optional) – Iteration ID. Defaults to 0.
merge_or_onepath (dict, optional) – Dictionary to pass merge/path info.
Module contents¶
- class sketchkit.vectorization.LineDrawer.CNNVE.CNNVE(device='cuda')[source]¶
Bases:
objectA class for image vectorization using the CNNVE method.
- model¶
The loaded line extraction model.
- bat_process(indir)[source]¶
Batch processes all PNG files in a directory.
For each file *.png in indir, it creates an output directory indir/output/… and calls process_single_image.
- Parameters:
indir (str) – The directory containing PNG files to process.
- process_single_image(fname, outdir, iter_id=0, merge_or_onepath={})[source]¶
Main processing pipeline to build a graph, segment strokes, and merge them.
- Parameters:
fname (str) – The file path of the input PNG image.
outdir (str) – The directory to save output and intermediate files.
iter_id (int, optional) – Iteration ID. Defaults to 0.
merge_or_onepath (dict, optional) – Dictionary to pass merge/path info.