sketchkit.image2sketch.PhotoSketchModel¶
- class sketchkit.image2sketch.PhotoSketchModel(*, checkpoint_dir: str | PathLike | None = None, model_name: str = 'pretrained', auto_download: bool = True, device: str | device | None = None, input_size: int = 256)[source]¶
High level wrapper around the PhotoSketch Pix2Pix generator.
- __init__(*, checkpoint_dir: str | PathLike | None = None, model_name: str = 'pretrained', auto_download: bool = True, device: str | device | None = None, input_size: int = 256) None[source]¶
Methods
__init__(*[, checkpoint_dir, model_name, ...])Ensure that the pretrained PhotoSketch weights exist locally.
generate(image, *[, size])Generate sketch images for the provided image input(s).
generate_batch(images, *[, size])Generate sketches for a batch of images.
Attributes