sketchkit.ordering.LineDrawer

class sketchkit.ordering.LineDrawer(method='CNNVE', device='cpu')[source]

Implementation of LineDrawer: Stroke-Level Process Reconstruction of Complex Line Art Based on Human Perception.

This method uses a reference video to recover the drawing order of a vector sketch by matching static vector strokes to the video frames where they first appear.

__init__(method='CNNVE', device='cpu')[source]

Initialize the LineDrawer with the specified method and device.

Parameters:
  • method – Backend method. Currently only “CNNVE” is supported.

  • device – Device to use for computation. “cuda” is recommended for better performance.

Raises:

ValueError – If an unsupported method is specified.

Methods

__init__([method, device])

Initialize the LineDrawer with the specified method and device.

create([method, device])

Create an instance of the specified ordering method.

run(img, ref_video_path)

Run LineDrawer to determine the drawing order using the reference video.